From 9057e04efad1b7d61c77a72e5c37a504d0aee935 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 26 九月 2025 09:24:03 +0800
Subject: [PATCH] H5静态化

---
 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