diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 0074534..acc926b 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -1132,7 +1132,7 @@ export default { }, // 行拖拽 rowDrop() { - if (this.fileListScrollTop > 0) { + if (this.fileListScrollTop > 0 && this.$route.path !== '/') { return } // 目标元素的背景颜色 @@ -1365,6 +1365,9 @@ export default { } } let clearClass = function (node) { + if(!dragged) { + return + } if (node) { if (_this.grid) { node = node.children[0].children[0] diff --git a/src/components/SimpleUploader/globalUploader.vue b/src/components/SimpleUploader/globalUploader.vue index b0f862e..92f3eb5 100755 --- a/src/components/SimpleUploader/globalUploader.vue +++ b/src/components/SimpleUploader/globalUploader.vue @@ -16,7 +16,7 @@ > - + 上传文件到当前目录下 @@ -157,6 +157,7 @@ fileListScrollTop: 0, dragoverLoop: null, successMsg: null, + enableDragUplaod: false,// 是否启用拖拽上传 } }, computed: { @@ -165,13 +166,22 @@ return this.$refs.uploader.uploader } }, - watch: {}, + watch: { + $route(route) { + // 只有首页才启用拖拽上传 + this.enableDragUplaod = route.path === '/' + } + }, mounted() { + this.enableDragUplaod = this.$route.path === '/' let that = this let dropbox = document.body document.body.ondragstart = function(e){ - return e.target.slot === 'jmal' && that.fileListScrollTop === 0; + if(that.enableDragUplaod) { + return e.target.slot === 'jmal' && that.fileListScrollTop === 0 + } + return true } dropbox.addEventListener("dragenter", function(e){ diff --git a/src/components/table/table.vue b/src/components/table/table.vue deleted file mode 100644 index 0c9ade2..0000000 --- a/src/components/table/table.vue +++ /dev/null @@ -1,302 +0,0 @@ - - - diff --git a/src/router/index.js b/src/router/index.js index 8ef4a9a..9a940b4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -235,9 +235,15 @@ export const constantRoutes = [ { path: 'manager-articles', name: 'manager-articles', - component: () => import('@/views/setting/articles/articleManager'), + component: () => import('@/views/setting/articles/articlePageManager'), meta: { title: '文章' , icon: 'guanlizhuanjiawenzhang'} }, + { + path: 'manager-alone-page', + name: 'manager-alone-page', + component: () => import('@/views/setting/articles/alonePageManager'), + meta: { title: '独立页面' , icon: 'guanlizhuanjiawenzhang'} + }, { path: 'manager-blog', name: 'manager-blog', diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue index 7a7fa4a..02806bd 100644 --- a/src/views/markdown/index.vue +++ b/src/views/markdown/index.vue @@ -36,48 +36,52 @@ value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"> -

分类:

- - -

标签:

- - {{tag}} - - - -
该标签已存在
- + 新增标签 +
+

分类:

+ + +
+
+

标签:

+ + {{tag}} + + + +
该标签已存在
+ + 新增标签 +

其他:

@@ -157,7 +161,6 @@ }] export default { - inject: ['appReload'], name: 'MarkdownEditor', components: { EditElement, @@ -167,6 +170,10 @@ hasChange: { type: Boolean, defalut: false + }, + alonePage: { + type: Boolean, + default: false } }, data() { @@ -461,6 +468,7 @@ cover: this.file.cover, isDraft: this.draft, isRelease: this.file.release, + isAlonePage: this.alonePage, slug: this.file.slug ? this.file.slug : this.filename, categoryIds: this.file.categoryIds, tagNames: this.dynamicTags, diff --git a/src/views/setting/articles/alonePageManager.vue b/src/views/setting/articles/alonePageManager.vue new file mode 100644 index 0000000..6f18e60 --- /dev/null +++ b/src/views/setting/articles/alonePageManager.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/views/setting/articles/articleManager.vue b/src/views/setting/articles/articleManager.vue index 619ed7b..4814a37 100644 --- a/src/views/setting/articles/articleManager.vue +++ b/src/views/setting/articles/articleManager.vue @@ -1,7 +1,7 @@