如何在Vuetify Table-Data(标题)中更改组文本
如何用其他语言更改组文本? 图片
所以,这是我的v-data-table组件。而且我需要在footer.page-text或group.header等诸如in inf in inf offoots.poge-text.header之类的地方进行自定义语言。
但是IDK如何访问标题中的“组”文本以更改我需要的语言 代码屏幕
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,此特定文本当前是不可锁定的,因为它在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
andgroup.summary
slots. Just experiment with them.