[英]Pass custom text to datatable "Sort by" select label
I'm using the Vuetify datatable for my project.我正在为我的项目使用 Vuetify 数据表。 Based on the sample from the docs
基于文档中的示例
https://vuetifyjs.com/en/components/data-tables/#usage https://vuetifyjs.com/en/components/data-tables/#usage
if you toggle to a device screen size the component will render a select for item sorting:如果您切换到设备屏幕尺寸,该组件将呈现用于项目排序的选择:
I want to pass a customized for the "Sort by" text.我想传递一个自定义的“排序依据”文本。 I was able to figure out how to customize most of the texts
我能够弄清楚如何自定义大部分文本
no-data-text="My custom no data text"
no-results-text="My custom no results text"
:footer-props="{
showFirstLastPage: true,
itemsPerPageText: 'My custom items per page',
itemsPerPageOptions: [10, 20, -1],
itemsPerPageAllText: 'My all text',
pageText: '{0} - {1} of {2}'
}"
but I wasn't able to figure out where to pass in a custom text for this "Sort by" label.但我无法弄清楚在何处传递此“排序依据”标签的自定义文本。 Would someone mind telling me how to customize that?
有人介意告诉我如何定制吗?
Reading source code led me to this:阅读源代码让我想到了这个:
Html:网址:
:header-props="headerProps"
Data:数据:
headerProps: {
sortByText: 'Custom sort by'
},
But they should've documented it.但他们应该记录下来。 I couldn't find it in their official documents either.
我在他们的官方文件中也找不到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.