diff --git a/Yi.Bbs.Vue3/package-lock.json b/Yi.Bbs.Vue3/package-lock.json
index 5ab5fb8b..5ad6ffe1 100644
--- a/Yi.Bbs.Vue3/package-lock.json
+++ b/Yi.Bbs.Vue3/package-lock.json
@@ -18,6 +18,7 @@
"marked": "^4.2.12",
"mavon-editor": "^3.0.0",
"nprogress": "^0.2.0",
+ "path-to-regexp": "^6.2.1",
"pinia": "^2.0.32",
"pinia-plugin-persistedstate": "^3.2.0",
"vue": "^3.2.47",
@@ -2851,6 +2852,11 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
+ "node_modules/path-to-regexp": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz",
+ "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw=="
+ },
"node_modules/path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz",
@@ -6087,6 +6093,11 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
+ "path-to-regexp": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz",
+ "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw=="
+ },
"path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz",
diff --git a/Yi.Bbs.Vue3/package.json b/Yi.Bbs.Vue3/package.json
index f83b8fcc..ca48b253 100644
--- a/Yi.Bbs.Vue3/package.json
+++ b/Yi.Bbs.Vue3/package.json
@@ -18,6 +18,7 @@
"marked": "^4.2.12",
"mavon-editor": "^3.0.0",
"nprogress": "^0.2.0",
+ "path-to-regexp": "^6.2.1",
"pinia": "^2.0.32",
"pinia-plugin-persistedstate": "^3.2.0",
"vue": "^3.2.47",
diff --git a/Yi.Bbs.Vue3/src/components/Breadcrumb/index.vue b/Yi.Bbs.Vue3/src/components/Breadcrumb/index.vue
new file mode 100644
index 00000000..0c131133
--- /dev/null
+++ b/Yi.Bbs.Vue3/src/components/Breadcrumb/index.vue
@@ -0,0 +1,84 @@
+
+
+
+
+ {{ item.meta.title }}
+
+
+ {{ item.meta.title }}
+
+
+
+
+
+
+
+
diff --git a/Yi.Bbs.Vue3/src/main.js b/Yi.Bbs.Vue3/src/main.js
index a79ed59d..294ce355 100644
--- a/Yi.Bbs.Vue3/src/main.js
+++ b/Yi.Bbs.Vue3/src/main.js
@@ -14,15 +14,16 @@ import directive from "./directive"; // directive
import "./permission";
-const app = createApp(App);
-for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component);
-}
-
-const pinia = createPinia();
-pinia.use(piniaPluginPersistedstate);
-
-app.use(pinia);
-directive(app);
-app.use(router);
-app.mount("#app");
+(async () => {
+ const app = createApp(App);
+ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
+ app.component(key, component);
+ }
+ const pinia = createPinia();
+ pinia.use(piniaPluginPersistedstate);
+ app.use(pinia);
+ directive(app);
+ app.use(router);
+ await router.isReady();
+ app.mount("#app");
+})();
diff --git a/Yi.Bbs.Vue3/src/router/index.js b/Yi.Bbs.Vue3/src/router/index.js
index 08366d10..4ffdd002 100644
--- a/Yi.Bbs.Vue3/src/router/index.js
+++ b/Yi.Bbs.Vue3/src/router/index.js
@@ -42,6 +42,9 @@ const router = createRouter({
name: "index",
path: "/index",
component: () => import("../views/home/Index.vue"),
+ meta: {
+ title: "首页",
+ },
},
{
name: "article",
@@ -52,6 +55,9 @@ const router = createRouter({
name: "discuss",
path: "/discuss/:plateId?",
component: () => import("../views/Discuss.vue"),
+ meta: {
+ title: "板块",
+ },
},
{
//artType:discuss主题、article文章
@@ -65,6 +71,14 @@ const router = createRouter({
path: "/profile",
component: () => import("../views/profile/Index.vue"),
},
+ {
+ name: "themeCover",
+ path: "/article/:discussId",
+ component: () => import("../views/Article.vue"),
+ meta: {
+ title: "主题封面",
+ },
+ },
],
},
{ path: "/:pathMatch(.*)*", name: "NotFound", component: NotFound },
diff --git a/Yi.Bbs.Vue3/src/views/Article.vue b/Yi.Bbs.Vue3/src/views/Article.vue
index ee75a243..47aa07d9 100644
--- a/Yi.Bbs.Vue3/src/views/Article.vue
+++ b/Yi.Bbs.Vue3/src/views/Article.vue
@@ -10,7 +10,7 @@
首页主题封面
+
diff --git a/Yi.Bbs.Vue3/yarn.lock b/Yi.Bbs.Vue3/yarn.lock
index 4e6b9793..01be0336 100644
--- a/Yi.Bbs.Vue3/yarn.lock
+++ b/Yi.Bbs.Vue3/yarn.lock
@@ -1642,6 +1642,11 @@
"resolved" "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz"
"version" "1.0.7"
+"path-to-regexp@^6.2.1":
+ "integrity" "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw=="
+ "resolved" "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz"
+ "version" "6.2.1"
+
"path-type@^4.0.0":
"integrity" "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
"resolved" "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz"