diff --git a/src/router/index.js b/src/router/index.js
index 6788161..8ef4a9a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -236,25 +236,25 @@ export const constantRoutes = [
path: 'manager-articles',
name: 'manager-articles',
component: () => import('@/views/setting/articles/articleManager'),
- meta: { title: '文章管理' , icon: 'guanlizhuanjiawenzhang'}
+ meta: { title: '文章' , icon: 'guanlizhuanjiawenzhang'}
},
{
path: 'manager-blog',
name: 'manager-blog',
component: () => import('@/views/setting/articles/blogManager'),
- meta: { title: '外观设置' , icon: 'pifu'}
+ meta: { title: '外观' , icon: 'pifu'}
},
{
path: 'manager-categories',
name: 'manager-categories',
component: () => import('@/views/setting/articles/categoryManager'),
- meta: { title: '分类管理', icon: 'fenlei' }
+ meta: { title: '分类', icon: 'fenlei' }
},
{
path: 'manager-tags',
name: 'manager-tags',
component: () => import('@/views/setting/articles/tagManager'),
- meta: { title: '标签管理', icon: 'biaoqian' }
+ meta: { title: '标签', icon: 'biaoqian' }
}
]
},
diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue
index 668f936..a979db1 100644
--- a/src/views/markdown/index.vue
+++ b/src/views/markdown/index.vue
@@ -9,13 +9,6 @@
@@ -44,17 +37,22 @@
本文链接:{{file.slug ? articleLink+file.slug : articleLink+file.id}}
分类:
-
+
+
标签:
0){
- this.findCategoryIds(null, this.categories, this.file.categoryIds)
- }
// 加载标签
if(this.tags && this.tags.length > 0) {
this.loadDynamicTags()
@@ -280,9 +276,6 @@
categoryTree() {
categoryApi.categoryTree().then(res => {
this.categories = res.data
- if(this.file.categoryIds && this.file.categoryIds.length > 0){
- this.findCategoryIds(null, this.categories, this.file.categoryIds)
- }
})
},
getTags() {
@@ -318,27 +311,6 @@
this.inputVisible = false
this.inputValue = ''
},
- findCategoryIds(parentCategory, categories, categoryIds) {
- if(!categoryIds){
- return
- }
- categories.forEach(category => {
- let ids = []
- if(parentCategory && parentCategory.ids){
- ids = parentCategory.ids
- }
- ids.push(category.id)
- category['ids'] = ids
- if(categoryIds.includes(category.id)){
- let newIds = []
- Object.assign(newIds , ids)
- this.categoryIdsList.push(newIds)
- }
- if(category.children){
- this.findCategoryIds(category, category.children, categoryIds)
- }
- })
- },
vditorInit(content){
this.contentEditor = new Vditor('vditor', {
height: this.clientHeight,
@@ -357,7 +329,6 @@
},
after: () => {
this.contentEditor.setValue(content)
- console.log('sdf')
},
input: (val) => {
this.valueHasChanged()
@@ -440,14 +411,11 @@
this.draft = false
this.update()
},
- selectCategory(val){
+ selectCategory(props, data){
+ this.file.categoryIds = data.checkedKeys
},
// update
update(message){
- let categoryIds = []
- this.categoryIdsList.forEach(categoryIdList => {
- categoryIds.push(categoryIdList[categoryIdList.length - 1])
- })
if(!this.checkParam()){
return
}
@@ -462,7 +430,7 @@
cover: this.file.cover,
isDraft: this.draft,
slug: this.file.slug ? this.file.slug : this.filename,
- categoryIds: categoryIds,
+ categoryIds: this.file.categoryIds,
tagNames: this.dynamicTags,
currentDirectory: this.storageLocation,
contentText: this.contentEditor.getValue()
@@ -617,4 +585,17 @@
max-width: 1200px;
}
}
+
+/deep/ .el-tree-node {
+ &:focus>.el-tree-node__content {
+ background-color: unset;
+ }
+ .el-tree-node__content:hover {
+ background-color: unset;
+ }
+}
+.category-tree {
+ max-height: 500px;
+ overflow: auto;
+}