diff --git a/src/api/markdown-api.js b/src/api/markdown-api.js index 6ce12dc..514f112 100644 --- a/src/api/markdown-api.js +++ b/src/api/markdown-api.js @@ -10,14 +10,6 @@ export default { params }) }, - // 添加文档 /markdown/add - addMarkdown: function(data) { - return request({ - url: '/markdown/add', - method: 'post', - data - }) - }, // 编辑文档 /markdown/edit editMarkdown: function(data) { return request({ diff --git a/src/api/user.js b/src/api/user.js index 4f10c07..85e939c 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -96,7 +96,7 @@ export function initialization(data) { export function getSetting(params) { return request({ - url: 'user/setting', + url: '/public/website/setting', method: 'get', params }) @@ -104,7 +104,7 @@ export function getSetting(params) { export function updateSetting(data) { return request({ - url: 'user/setting/update', + url: '/setting/update', method: 'put', data }) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 267aca1..0074534 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2300,7 +2300,7 @@ export default { break case 'edit': // 编辑 - this.$router.push(`/setting/website/manager-articles?operation=editor&id=${this.rowContextData.id}`) + window.open(`/setting/website/manager-articles?operation=editor&id=${this.rowContextData.id}`, '_blank') break case 'open': // 打开 diff --git a/src/styles/setting.scss b/src/styles/setting.scss index ebe8875..7312cc2 100644 --- a/src/styles/setting.scss +++ b/src/styles/setting.scss @@ -1,4 +1,16 @@ +a { + color: #1890ff; + text-decoration: none; + background-color: transparent; + outline: none; + cursor: pointer; + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +a:hover { + color: #40a9ff; +} .container { padding: 20px; } @@ -98,3 +110,9 @@ color: #1890ff; } } +.table-top { + .table-top-right { + float: right; + margin-top: -28px; + } +} diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue index 6d1b189..b1ce9a6 100644 --- a/src/views/markdown/index.vue +++ b/src/views/markdown/index.vue @@ -25,8 +25,7 @@
保存草稿 - 发布文章 - 更新文章 + {{ editStatus?'发布文章':'更新文章' }}

文章封面:

@@ -237,6 +236,9 @@ after: () => { this.contentEditor.setValue(content) }, + input: (val) => { + this.valueHasChanged() + } }) }, $imgAdd(pos, $file) { @@ -307,33 +309,6 @@ } return true }, - // add - add(){ - this.update() - // if(!this.checkParam()){ - // return - // } - // this.updating = true - // const filename = this.filename + ".md" - // markdownApi.addMarkdown({ - // userId: this.$store.state.user.userId, - // username: this.$store.state.user.name, - // filename: filename, - // cover: this.file.cover, - // categoryIds: this.getCategoryList(), - // currentDirectory: this.storageLocation, - // contentText: this.contentEditor.getValue() - // }).then(() => { - // this.updating = false - // this.$message({ - // message: "发布成功", - // type: 'success', - // duration : 1000 - // }); - // }).catch(()=> { - // this.updating = false - // }) - }, getCategoryList(){ let categoryIdList = [] this.categoryIds.forEach(categoryIds => { diff --git a/src/views/setting/articles/articleManager.vue b/src/views/setting/articles/articleManager.vue index 2851f8e..2141aae 100644 --- a/src/views/setting/articles/articleManager.vue +++ b/src/views/setting/articles/articleManager.vue @@ -12,20 +12,103 @@ -
-
- 文章管理 - 新建文章 +
+
+
+ 文章管理 + 新建文章 +
+
+
+
+ + 可用 + 草稿 + + 作者: + + 所有 + 我的 + +
+
+ + + 筛选 +
+
+ + + + + + + + + + + + + + + + + + +
+ + -
diff --git a/src/views/setting/articles/categoryManager.vue b/src/views/setting/articles/categoryManager.vue index d31e489..a9aca77 100644 --- a/src/views/setting/articles/categoryManager.vue +++ b/src/views/setting/articles/categoryManager.vue @@ -322,18 +322,4 @@ export default { line-height: 32px; } -a { - color: #1890ff; - text-decoration: none; - background-color: transparent; - outline: none; - cursor: pointer; - -webkit-transition: color 0.3s; - transition: color 0.3s; -} - -a:hover { - color: #40a9ff; -} -