如何在Vuetify Table-Data(标题)中更改组文本

发布于 2025-01-30 16:38:16 字数 366 浏览 0 评论 0 原文

如何用其他语言更改组文本? 图片

所以,这是我的v-data-table组件。而且我需要在footer.page-text或group.header等诸如in inf in inf offoots.poge-text.header之类的地方进行自定义语言。

但是IDK如何访问标题中的“组”文本以更改我需要的语言 代码屏幕

How can i change group text in other language? picture

So, this is my v-data-table component. And I need customize language at places like in footer.page-text or group.header.

But idk how get access to "group"-text in headers to change on my language that i need
Code screen

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

战皆罪 2025-02-06 16:38:16

不幸的是,此特定文本当前是不可锁定的,因为它在Vuetify源代码中进行了硬编码 - https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VDataTable/VDataTableHeaderDesktop.ts#L20< /a>

如果是可以翻译的 - 您可以在

但是,您可以通过使用 group.header group.summary 插槽来解决此限制。只是尝试他们。

Unfortunately, this particular text is currently non-localizable out of the box as it is hardcoded in the Vuetify source code - https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VDataTable/VDataTableHeaderDesktop.ts#L20

If it was translatable - you could have used Vue-i18n as exaplained in the documentation.

However, you can work around this limitation by utilizing the group.header and group.summary slots. Just experiment with them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文