From 7421fd70bbed994e9b05d34228ee69eba22963ed Mon Sep 17 00:00:00 2001 From: jiutianzhiyu Date: Tue, 30 Mar 2021 06:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 8 ++++++++ src/views/employees/index.vue | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index aa011c0..e64abee 100644 --- a/src/main.js +++ b/src/main.js @@ -16,9 +16,17 @@ import router from './router' import '@/icons' // icon import '@/permission' // permission control +// 第三方组件全局注册 import Component from '@/components' Vue.use(Component) +// 批量注册 +import * as myfilter from '@/filters' +// 遍历注册 +for (const key in myfilter) { + Vue.filter(key, myfilter[key]) +} + /** * If you don't want to use mock-server * you want to use MockJs for mock api diff --git a/src/views/employees/index.vue b/src/views/employees/index.vue index f07fd3a..1349510 100644 --- a/src/views/employees/index.vue +++ b/src/views/employees/index.vue @@ -18,7 +18,11 @@ - + + +