From 97ff6dad9409442c6003d31c2e8e593c60bd4715 Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Thu, 27 Nov 2025 16:42:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 77 +- src/views/document/ceshi.vue | 1078 ++++++++++++++++++++++++++++ src/views/document/index.css | 144 ++++ src/views/document/index.vue | 149 ++++ src/views/document/introdution.vue | 40 ++ src/views/document/jupyterLab.vue | 46 ++ src/views/document/select.vue | 202 ++++++ src/views/document/start.vue | 54 ++ src/views/document/study.vue | 59 ++ src/views/document/summary.vue | 81 +++ src/views/document/video.vue | 30 + src/views/layout/index.vue | 14 +- 12 files changed, 1957 insertions(+), 17 deletions(-) create mode 100644 src/views/document/ceshi.vue create mode 100644 src/views/document/index.css create mode 100644 src/views/document/index.vue create mode 100644 src/views/document/introdution.vue create mode 100644 src/views/document/jupyterLab.vue create mode 100644 src/views/document/select.vue create mode 100644 src/views/document/start.vue create mode 100644 src/views/document/study.vue create mode 100644 src/views/document/summary.vue create mode 100644 src/views/document/video.vue diff --git a/src/router/index.ts b/src/router/index.ts index 535a98c..e3d5968 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -3,8 +3,6 @@ import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; import Layout from "@/components/Layout.vue"; import { Components } from "ant-design-vue/es/date-picker/generatePicker"; - - const routes: RouteRecordRaw[] = [ { path: "/", @@ -26,6 +24,54 @@ const routes: RouteRecordRaw[] = [ name: "NotFound", component: () => import("@/views/404.vue"), }, + { + path: "/document", + name: "document", + component: () => import("@/views/document/index.vue"), + redirect: "/document/introdution", + children: [ + { + path: "introdution", + name: "introdution", + component: () => import("@/views/document/introdution.vue"), + }, + { + path: "start", + name: "start", + component: () => import("@/views/document/start.vue"), + }, + { + path: "video", + name: "video", + component: () => import("@/views/document/video.vue"), + }, + { + path: "study", + name: "study", + component: () => import("@/views/document/study.vue"), + }, + { + path: "select", + name: "select", + component: () => import("@/views/document/select.vue"), + }, + { + path: "ceshi", + name: "ceshi", + component: () => import("@/views/document/ceshi.vue"), + }, + { + path: "summary", + name: "summary", + component: () => import("@/views/document/summary.vue"), + }, + { + path: "jupyterLab", + name: "jupyterLab", + component: () => import("@/views/document/jupyterLab.vue"), + }, + ], + }, { path: "/layout", name: "Layout", @@ -95,38 +141,45 @@ const routes: RouteRecordRaw[] = [ { path: "contract", name: "contract", - component: () => import("@/views/admin/account/cost/contract/index.vue"), + component: () => + import("@/views/admin/account/cost/contract/index.vue"), }, { path: "costDetail", name: "costDetail", - component: () => import("@/views/admin/account/cost/costDetail/index.vue"), + component: () => + import("@/views/admin/account/cost/costDetail/index.vue"), }, { path: "coupon", name: "coupon", - component: () => import("@/views/admin/account/cost/coupon/index.vue"), + component: () => + import("@/views/admin/account/cost/coupon/index.vue"), }, { path: "flow", name: "flow", - component: () => import("@/views/admin/account/cost/flow/index.vue"), + component: () => + import("@/views/admin/account/cost/flow/index.vue"), }, - { + { path: "invoice", name: "invoice", - component: () => import("@/views/admin/account/cost/invoice/index.vue"), + component: () => + import("@/views/admin/account/cost/invoice/index.vue"), }, - - { + + { path: "myOrder", name: "myOrder", - component: () => import("@/views/admin/account/cost/myOrder/index.vue"), + component: () => + import("@/views/admin/account/cost/myOrder/index.vue"), }, { path: "voucher", name: "voucher", - component: () => import("@/views/admin/account/cost/voucher/index.vue"), + component: () => + import("@/views/admin/account/cost/voucher/index.vue"), }, ], }, diff --git a/src/views/document/ceshi.vue b/src/views/document/ceshi.vue new file mode 100644 index 0000000..458d22d --- /dev/null +++ b/src/views/document/ceshi.vue @@ -0,0 +1,1078 @@ + \ No newline at end of file diff --git a/src/views/document/index.css b/src/views/document/index.css new file mode 100644 index 0000000..dd8c37a --- /dev/null +++ b/src/views/document/index.css @@ -0,0 +1,144 @@ +/* 标题优化 */ +h1, h2, h3 { + margin-bottom: 0.8em; + font-weight: 600; + color: #2c3e50; +} + +h1 { + font-size: 2.2em; + border-bottom: 2px solid #eee; + padding-bottom: 0.4em; +} + +h2 { + font-size: 1.6em; + color: #3498db; +} + +h3 { + font-size: 1.3em; + color: #7f8c8d; +} + +/* 段落间距 */ +p { + margin: 1em 0; +} + +/* 链接样式 */ +a { + color: #3498db; + text-decoration: none; + transition: color 0.2s ease; +} + +a:hover { + color: #1a5276; + text-decoration: underline; +} + +/* 引用块美化 */ +blockquote { + margin: 1.2em 0; + padding: 14px 20px; + background-color: #f8f9fa; + border-left: 4px solid #3498db; + border-radius: 0 6px 6px 0; + font-style: italic; + color: #555; +} + +blockquote p { + margin: 0; +} + +/* 列表样式 */ +ul { + padding-left: 24px; + margin: 1em 0; +} + +ul li { + margin-bottom: 6px; + list-style-type: circle; +} + +/* 代码块高亮区域 */ +.highlight { + margin: 1.2em 0; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 2px 6px rgba(0,0,0,0.08); +} + +.highlight pre { + margin: 0; + padding: 16px; + background-color: #2d2d2d !important; + color: #f8f8f2; + font-family: 'Fira Code', 'Consolas', monospace; + font-size: 14px; + line-height: 1.5; + overflow-x: auto; /* 允许横向滚动 */ +} + +/* 美化代码块滚动条(仅该区域)*/ +.highlight pre::-webkit-scrollbar { + height: 8px; +} +.highlight pre::-webkit-scrollbar-track { + background: #1e1e1e; + border-radius: 4px; +} +.highlight pre::-webkit-scrollbar-thumb { + background: #555; + border-radius: 4px; +} +.highlight pre::-webkit-scrollbar-thumb:hover { + background: #777; +} + +/* 图片居中 & 最大宽度限制 */ +img { + max-width: 100%; + height: auto; + display: block; + margin: 1em auto; + border-radius: 6px; + box-shadow: 0 2px 8px rgba(0,0,0,0.1); +} + ul, ol { + padding-left: 20px; + } + li { + margin: 8px 0; + } +/* headerlink 样式微调(锚点符号)*/ +.headerlink { + opacity: 0; + margin-left: 8px; + color: #aaa; + text-decoration: none; + font-weight: normal; + font-size: 0.9em; +} + +h1:hover .headerlink, +h2:hover .headerlink, +h3:hover .headerlink { + opacity: 1; +} + +.headerlink:hover { + color: #3498db; +} + +/* 响应式适配 */ +@media (max-width: 768px) { + .md-content { + padding: 16px; + } + h1 { font-size: 1.8em; } + h2 { font-size: 1.4em; } +} \ No newline at end of file diff --git a/src/views/document/index.vue b/src/views/document/index.vue new file mode 100644 index 0000000..7dd49d1 --- /dev/null +++ b/src/views/document/index.vue @@ -0,0 +1,149 @@ + + + + \ No newline at end of file diff --git a/src/views/document/introdution.vue b/src/views/document/introdution.vue new file mode 100644 index 0000000..48ef389 --- /dev/null +++ b/src/views/document/introdution.vue @@ -0,0 +1,40 @@ + diff --git a/src/views/document/jupyterLab.vue b/src/views/document/jupyterLab.vue new file mode 100644 index 0000000..998db81 --- /dev/null +++ b/src/views/document/jupyterLab.vue @@ -0,0 +1,46 @@ + \ No newline at end of file diff --git a/src/views/document/select.vue b/src/views/document/select.vue new file mode 100644 index 0000000..d4715fe --- /dev/null +++ b/src/views/document/select.vue @@ -0,0 +1,202 @@ + \ No newline at end of file diff --git a/src/views/document/start.vue b/src/views/document/start.vue new file mode 100644 index 0000000..a242d2b --- /dev/null +++ b/src/views/document/start.vue @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/src/views/document/study.vue b/src/views/document/study.vue new file mode 100644 index 0000000..1cbdd2d --- /dev/null +++ b/src/views/document/study.vue @@ -0,0 +1,59 @@ + + + + \ No newline at end of file diff --git a/src/views/document/summary.vue b/src/views/document/summary.vue new file mode 100644 index 0000000..ce86ec3 --- /dev/null +++ b/src/views/document/summary.vue @@ -0,0 +1,81 @@ + \ No newline at end of file diff --git a/src/views/document/video.vue b/src/views/document/video.vue new file mode 100644 index 0000000..6229424 --- /dev/null +++ b/src/views/document/video.vue @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 3fa8f31..a616738 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -74,7 +74,7 @@ watch(() => route.path, () => { if (current.value == '/home') { isHome.value = true } else { - isHome.value = false + isHome.value = true } }) @@ -88,12 +88,16 @@ const rightRoutes = ref([ { key: '/document', label: '用户文档' }, { key: '/admin/home', label: '控制台' } ]) - // 点击菜单跳转 const handleMenuClick = (key) => { - // key 如 "/admin" → 拼成 "/layout/admin" - const fullPath = `/layout${key}` - router.push(fullPath) + if (key === '/document') { + + window.open(key, '_blank'); + } else { + // 否则按照正常方式在当前标签页跳转 + const fullPath = `/layout${key}`; + router.push(fullPath); + } } const logout = () => { router.replace('/login')