From 9e9c0870cee2b17e9287489153cd976cfcf43541 Mon Sep 17 00:00:00 2001 From: xingxiansheng <1103914483@qq.com> Date: Mon, 26 Dec 2022 16:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=96=87=E6=A1=A3=E8=8F=9C=E5=8D=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=AB=98=E4=BA=AE=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=87=8D=E5=A4=8D=E7=82=B9=E5=87=BB=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/layouts/GlobalLayout.vue | 816 ++++++++++-------- zyplayer-doc-ui/wiki-ui/src/main.js | 32 +- 2 files changed, 462 insertions(+), 386 deletions(-) diff --git a/zyplayer-doc-ui/wiki-ui/src/components/layouts/GlobalLayout.vue b/zyplayer-doc-ui/wiki-ui/src/components/layouts/GlobalLayout.vue index 31f883df..1444eb65 100644 --- a/zyplayer-doc-ui/wiki-ui/src/components/layouts/GlobalLayout.vue +++ b/zyplayer-doc-ui/wiki-ui/src/components/layouts/GlobalLayout.vue @@ -1,111 +1,128 @@ - - - - - - - - - - - - - - - - - 创建文档 - - - - - - - - - - - + + + + + + + + + + + + + + + + + 创建文档 + + + + + + + + + + + - + style="background-color: #fafafa;" + @node-click="handleNodeClick" + @node-expand="handleNodeExpand" + @node-drop="handlePageDrop"> - - - - - - - - {{userSelfInfo.userName}} - - - + + + + + + + + {{ userSelfInfo.userName }} + + + 通知 - 本页标记已读 + 本页标记已读 + - - - + + + - {{scope.row.msgContent}} - - 查看> + {{ scope.row.msgContent }} + + 查看> + - - - - 控制台 - 关于 - 退出登录 - - - - - + + + 控制台 + 关于 + 退出登录 + + + + + + @switchSpace="switchSpacePage"> - + - + diff --git a/zyplayer-doc-ui/wiki-ui/src/main.js b/zyplayer-doc-ui/wiki-ui/src/main.js index 5f0ece9e..4225f556 100644 --- a/zyplayer-doc-ui/wiki-ui/src/main.js +++ b/zyplayer-doc-ui/wiki-ui/src/main.js @@ -8,6 +8,9 @@ import routes from './routes' import store from './store/index' import axios from 'axios' import VueAxios from 'vue-axios' +// 注册一个全局自定义指令 +import hljs from 'highlight.js' +import 'highlight.js/styles/googlecode.css' Vue.use(ElementUI); Vue.use(VueRouter); @@ -15,28 +18,31 @@ Vue.use(VueAxios, axios); // 公用方法 Vue.prototype.$store = store; +// 路由重复点击报错处理 +const originalPush = VueRouter.prototype.push +VueRouter.prototype.push = function push(location) { + return originalPush.call(this, location).catch(err => err) +} const router = new VueRouter({routes}); // 路由跳转时判断处理 router.beforeEach((to, from, next) => { - if (to.name) { - document.title = to.name; - } - next(); + if (to.name) { + document.title = to.name; + } + next(); }); + + let vue = new Vue({ - el: '#app', - router, - render(h) { - return h(App); - } + el: '#app', + router, + render(h) { + return h(App); + } }); -// 注册一个全局自定义指令 -import hljs from 'highlight.js' -import 'highlight.js/styles/googlecode.css' - Vue.directive('highlight', function (el) { let blocks = el.querySelectorAll('pre code'); blocks.forEach((block) => {