From f61399b7747834810a69b09dc39652c9180c5b4f Mon Sep 17 00:00:00 2001 From: Aicirou <2643053021@qq.com> Date: Mon, 22 Jun 2020 23:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8Beautify=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dependencies-cdn.js | 9 ------ src/router/routes.js | 61 ++++++++++++++++++++++--------------- src/views/Layout.vue | 2 -- src/views/common/Navbar.vue | 9 ------ src/views/page/GoImg.vue | 48 ----------------------------- src/views/page/GoView.vue | 14 +++++++++ 6 files changed, 50 insertions(+), 93 deletions(-) delete mode 100644 src/views/page/GoImg.vue create mode 100644 src/views/page/GoView.vue diff --git a/dependencies-cdn.js b/dependencies-cdn.js index 29096d3..ec26ba5 100644 --- a/dependencies-cdn.js +++ b/dependencies-cdn.js @@ -9,18 +9,9 @@ module.exports = [ { name: 'js-cookie', library: 'Cookies', js: 'https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js', css: '' }, { name: 'lowdb', library: 'low', js: 'https://cdn.jsdelivr.net/npm/lowdb@1.0.0/dist/low.min.js', css: '' }, { name: 'lowdb/adapters/LocalStorage', library: 'LocalStorage', js: 'https://cdn.jsdelivr.net/npm/lowdb@1.0.0/dist/LocalStorage.min.js', css: '' }, - // { name: 'brace', library: 'ace', js: 'https://cdn.jsdelivr.net/npm/brace@0.11.1/index.min.js', css: '' }, - // { name: 'brace/ext/language_tools', library: 'language_tools', js: ' https://cdn.jsdelivr.net/npm/brace@0.11.1/ext/language_tools.js', css: '' }, - // { name: 'brace/mode/html', library: 'html', js: ' https://cdn.jsdelivr.net/npm/brace@0.11.1/mode/html.js', css: '' }, - // { name: 'brace/mode/javascript', library: 'javascript', js: ' https://cdn.jsdelivr.net/npm/brace@0.11.1/mode/javascript.js', css: '' }, - // { name: 'brace/mode/less', library: 'less', js: ' https://cdn.jsdelivr.net/npm/brace@0.11.1/mode/less.js', css: '' }, - // { name: 'brace/theme/chrome', library: 'chrome', js: ' https://cdn.jsdelivr.net/npm/brace@0.11.1/theme/chrome.js', css: '' }, - // { name: 'brace/snippets/javascript', library: 'javascript', js: ' https://cdn.jsdelivr.net/npm/brace@0.11.1/snippets/javascript.js', css: '' }, - // { name: 'vue2-ace-editor', library: 'Vue2ACEEditor', js: 'https://cdn.jsdelivr.net/npm/vue2-ace-editor@0.0.15/index.min.js', css: '' }, { name: 'markdown-it', library: 'markdownit', js: 'https://cdn.jsdelivr.net/npm/markdown-it@10.0.0/dist/markdown-it.min.js', css: '' }, { name: '', library: '', js: 'https://at.alicdn.com/t/font_1760192_axq33n6snd.js', css: '' }, { name: '', library: '', js: '', css: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css' }, { name: '', library: '', js: '', css: 'https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css' }, { name: '', library: '', js: '', css: 'https://cdn.jsdelivr.net/npm/font-awesome-animation@0.2.1/dist/font-awesome-animation.min.css' }, - // { name: '', library: '', js: '', css: 'https://cdn.jsdelivr.net/npm/bulma-pageloader@0.3.0/dist/css/bulma-pageloader.min.css' }, ] \ No newline at end of file diff --git a/src/router/routes.js b/src/router/routes.js index eea615f..556ffc2 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -3,57 +3,68 @@ const _import = require("@/libs/util.import." + process.env.NODE_ENV); const meta = { // keepAlive: true - disableCache: false -} + disableCache: false, +}; -const frameIn = [{ +const frameIn = [ + { path: "/:id(\\d+)::cmd(text)/:path", - component: _import("page/GoText"), + component: _import("page/GoView"), meta: { ...meta, - view: 'text' - } + view: "text", + }, + children: [ + { + path: "", + component: _import("page/GoText"), + }, + ], }, { path: "/:id(\\d+)::cmd(pdf)/:path", - component: _import("page/GoPdf"), + component: _import("page/GoView"), meta: { ...meta, - view: 'pdf' - } + view: "pdf", + }, + children: [ + { + path: "", + component: _import("page/GoPdf"), + }, + ], }, { path: "/:id(\\d+)::cmd(video)/:path", - component: _import("page/GoVideo"), + component: _import("page/GoView"), meta: { ...meta, - view: 'video' - } - }, - { - path: "/:id(\\d+)::cmd(image)/:path", - component: _import("page/GoImg"), - meta: { - ...meta, - view: 'image' - } + view: "video", + }, + children: [ + { + path: "", + component: _import("page/GoVideo"), + }, + ], }, { path: "/:id(\\d+)::cmd(search)(/?q=)*", component: _import("page/GoList"), meta: { ...meta, - view: 'list' - } + view: "list", + }, }, { path: "/:id(\\d+):/:path*", component: _import("page/GoList"), meta: { ...meta, - view: 'list' - } + view: "list", + }, }, ]; -export default frameIn; \ No newline at end of file +export default frameIn; diff --git a/src/views/Layout.vue b/src/views/Layout.vue index d87ff40..d329288 100644 --- a/src/views/Layout.vue +++ b/src/views/Layout.vue @@ -3,11 +3,9 @@