我正在使用vue-good-table来渲染表。
<vue-good-table
:columns="columns"
:rows="items"
:paginate="true"
:lineNumbers="true">
</vue-good-table>
columns: [
{
label: 'Date',
field: 'date',
type: 'String',
filterable: true,
placeholder: 'Date'
}
]例如,是否可以在标签参数中使用{{ $t("column.date") }}。直到现在,它只在传递字符串时才起作用?
添加更多代码:
main.js const i18n =新VueI18n({ locale:'bg',// set locale fallbackLocale:'bg',messages // set locale messages });
Vue.prototype.$locale = {
change (lang) {
i18n.locale = lang
},
current () {
return i18n.locale
}
}发布于 2018-06-08 12:16:00
columns: [
{
label: this.$t("column.date"),
field: 'date',
type: 'String',
filterable: true,
placeholder: 'Date'
}
]
https://stackoverflow.com/questions/50759995
复制相似问题