From 89e540640b87f4be8656a5bc78f4a5dbcdf1c21f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 01 七月 2025 15:53:41 +0800
Subject: [PATCH] ss
---
admin/src/main.js | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/admin/src/main.js b/admin/src/main.js
index 13a6171..415b1cc 100644
--- a/admin/src/main.js
+++ b/admin/src/main.js
@@ -4,22 +4,18 @@
import store from './store'
import ElementUI from 'element-ui'
import './assets/style/element-variables.scss'
-import { ElementTiptapPlugin } from 'element-tiptap'
-import 'element-tiptap/lib/index.css'
import VueClipboard from 'vue-clipboard2'
import directives from './directives'
import filters from './filters'
import plugins from './plugins'
import { mapState, mapMutations } from 'vuex'
import { fetchMenuTree } from './api/system/menu'
-import preventReClick from '@/directives/directive'
-Vue.use(preventReClick)
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+Vue.component('treeselect', Treeselect)
Vue.config.productionTip = false
Vue.use(ElementUI, {
size: 'small'
-})
-Vue.use(ElementTiptapPlugin, {
- lang: 'zh'
})
Vue.use(VueClipboard)
Vue.use(directives)
@@ -45,7 +41,9 @@
},
methods: {
...mapMutations(['switchCollapseMenu', 'setHomePage']),
- // 鍒濆鍖栨湰鍦伴厤缃�
+ /**
+ * 鍒濆鍖栨湰鍦伴厤缃�
+ */
initLocalConfig () {
// 鑿滃崟鐘舵�侀厤缃�
const menuStatus = window.localStorage.getItem('MENU_STATUS')
@@ -53,7 +51,11 @@
this.switchCollapseMenu(menuStatus === 'true')
}
},
- // 鍒濆鍖栬矾鐢�
+ /**
+ * 鍒濆鍖栬矾鐢�
+ *
+ * @returns {Promise<void>}
+ */
async initRoutes () {
if (this.loading || this.userInfo == null) {
return
@@ -95,7 +97,13 @@
this.loading = false
})
},
- // 鏂板缓璺敱
+ /**
+ * 鏂板缓璺敱
+ *
+ * @param routes 闇�娣诲姞鐨勮矾鐢�
+ * @param parents 闇�娣诲姞鍒扮殑鐩爣鍒楄〃
+ * @private
+ */
__addRouters (routes, parents = []) {
if (routes == null || routes.length === 0) {
return
--
Gitblit v1.9.3