diff --git a/src/components/admin/MainWrapper.vue b/src/components/admin/MainWrapper.vue index 7e0a601..fc3a8f8 100644 --- a/src/components/admin/MainWrapper.vue +++ b/src/components/admin/MainWrapper.vue @@ -77,6 +77,12 @@ const items = reactive([ key: 'blogtype', label: '博客分类', title: '博客分类', + }, + { + key: 'bloglabel', + icon: () => h(iconComponents.TypeOutLined), + label: '博客标签', + title: '博客标签', } ], }, @@ -110,13 +116,6 @@ const items = reactive([ label: '链接管理', title: '链接管理', }, - - { - key: 'labelmanage', - icon: () => h(iconComponents.TypeOutLined), - label: '标签管理', - title: '标签管理', - }, { key: 'commentmanage', icon: () => h(iconComponents.CommentOutLined), diff --git a/src/router/admin.ts b/src/router/admin.ts index 776a5a9..0bbfaae 100644 --- a/src/router/admin.ts +++ b/src/router/admin.ts @@ -42,9 +42,9 @@ const adminRoute: Array = [ component: () => import("@/views/admin/CommonLinkManageView.vue") }, { - path: "labelmanage", - name: "labelmanage", - component: () => import("@/views/admin/LabelManageView.vue") + path: "bloglabel", + name: "bloglabel", + component: () => import("@/views/admin/blogmanage/BlogLabelView.vue") } ] }, diff --git a/src/stores/index.ts b/src/stores/index.ts index fc978b1..87a7e97 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -35,10 +35,18 @@ export const homePageStore = defineStore("homePage", () => { export const blogStore = defineStore("blog", () => { const delControl = reactive({ open: false, - ids: "" + ids: "", + title:"" }) - - return { delControl } + const formControl = ref({ + open: false, + ids: null +}) + const readcount=ref(0) + const setReadCount=(num:number)=>{ + readcount.value+=num + } + return { delControl,formControl,readcount,setReadCount } }) export const useContentStore = defineStore('content', () => { const content = ref({ text: "" }); @@ -58,8 +66,10 @@ export const useContentStore = defineStore('content', () => { export const diaryStore = defineStore("diary", () => { const delControl = reactive({ open: false, - ids: "" + ids: "", + title:"" }) + return { delControl } }) diff --git a/src/views/admin/LabelManageView.vue b/src/views/admin/blogmanage/BlogLabelView.vue similarity index 89% rename from src/views/admin/LabelManageView.vue rename to src/views/admin/blogmanage/BlogLabelView.vue index 8c7fe92..fcf23df 100644 --- a/src/views/admin/LabelManageView.vue +++ b/src/views/admin/blogmanage/BlogLabelView.vue @@ -7,13 +7,13 @@ 查询 新增 - + - + @@ -28,13 +28,13 @@
删除 + @ok="del" @cancel="unControl('删除')">

确认删除吗?

编辑 + okText="确定" @ok="edit" @cancel="unControl(editControl.title)"> + :rules="[{ required: false, message: '请修改备注!' }]"> @@ -58,6 +58,7 @@