main.js
(1) 引入过滤器(@/filters/index.js为过滤器所在的文件)
import * as filter from '@/filters/index.js'
(2)// 全局过滤器配置
Object.keys(filter).forEach(key => {
Vue.filter(key, filter[key])
});
2024-03-31 22:42:04
main.js
(1) 引入过滤器(@/filters/index.js为过滤器所在的文件)
import * as filter from '@/filters/index.js'
(2)// 全局过滤器配置
Object.keys(filter).forEach(key => {
Vue.filter(key, filter[key])
});
下一篇:element-ui日期选择器