From c98e6f2fa8b8428226ebed216048a81459e05d9f Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 4 Aug 2019 22:21:13 +0800 Subject: [PATCH 01/59] Support sm.ms api v2. --- src/views/system/OptionForm.vue | 111 ++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 40 deletions(-) diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 6756bbcea..3f5a32e3b 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -249,9 +249,26 @@ >{{ attachmentType[item].text }} +
+ + + + + +
Date: Sat, 17 Aug 2019 17:12:13 +0800 Subject: [PATCH 02/59] Support view comment detail. --- src/api/comment.js | 8 + .../comment/components/CommentDetail.vue | 209 ++++++++++++++++++ src/views/comment/components/CommentTab.vue | 34 ++- src/views/post/PostList.vue | 5 +- 4 files changed, 252 insertions(+), 4 deletions(-) create mode 100644 src/views/comment/components/CommentDetail.vue diff --git a/src/api/comment.js b/src/api/comment.js index e35a5ac90..6a1379fa7 100644 --- a/src/api/comment.js +++ b/src/api/comment.js @@ -45,6 +45,14 @@ commentApi.create = (target, comment) => { }) } +commentApi.update = (target, commentId, comment) => { + return service({ + url: `${baseUrl}/${target}/comments/${commentId}`, + data: comment, + method: 'put' + }) +} + /** * Creates a comment. * @param {String} target diff --git a/src/views/comment/components/CommentDetail.vue b/src/views/comment/components/CommentDetail.vue new file mode 100644 index 000000000..dd11a0243 --- /dev/null +++ b/src/views/comment/components/CommentDetail.vue @@ -0,0 +1,209 @@ + + + diff --git a/src/views/comment/components/CommentTab.vue b/src/views/comment/components/CommentTab.vue index 62cc0c4d2..c0e5b7ef5 100644 --- a/src/views/comment/components/CommentTab.vue +++ b/src/views/comment/components/CommentTab.vue @@ -203,6 +203,13 @@ > 删除 + + + + 详情
@@ -243,12 +250,19 @@ +
From 4adfbd5fe4a2bbe70959b84a43d3e5beace619a3 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 18 Aug 2019 20:23:49 +0800 Subject: [PATCH 05/59] remove useless code. --- src/store/getters.js | 1 - src/store/modules/permission.js | 16 ---------------- src/store/modules/user.js | 4 ---- 3 files changed, 21 deletions(-) diff --git a/src/store/getters.js b/src/store/getters.js index a7ca8c63b..089b8517b 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -6,7 +6,6 @@ const getters = { user: state => state.user.user, avatar: state => state.user.avatar, nickname: state => state.user.name, - roles: state => state.user.roles, addRouters: state => state.permission.addRouters, apiUrl: state => { if (state.app.apiUrl) { diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index c192ae300..aa58b6af1 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -21,22 +21,6 @@ function hasPermission(permission, route) { return true } -/** - * 单账户多角色时,使用该方法可过滤角色不存在的菜单 - * - * @param roles - * @param route - * @returns {*} - */ -// eslint-disable-next-line -function hasRole(roles, route) { - if (route.meta && route.meta.roles) { - return route.meta.roles.includes(roles.id) - } else { - return true - } -} - function filterAsyncRouter(routerMap, roles) { const accessedRouters = routerMap.filter(route => { if (hasPermission(roles.permissionList, route)) { diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 0c46e3117..acdd27fff 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -8,7 +8,6 @@ const user = { token: null, name: '', avatar: '', - roles: [], info: {}, user: {} }, @@ -23,9 +22,6 @@ const user = { SET_AVATAR: (state, avatar) => { state.avatar = avatar }, - SET_ROLES: (state, roles) => { - state.roles = roles - }, SET_INFO: (state, info) => { state.info = info }, From c3745cdf13117f13fc361ce8633269c52ad1b1fc Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 18 Aug 2019 20:39:19 +0800 Subject: [PATCH 06/59] Support set picture style for upyun. --- src/views/system/OptionForm.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 11892f885..0b3a98fa7 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -305,11 +305,17 @@
+ + +
Date: Thu, 22 Aug 2019 22:04:08 +0800 Subject: [PATCH 07/59] Support update theme from new theme package. --- src/api/theme.js | 13 ++- src/components/Upload/UpdateTheme.vue | 110 ++++++++++++++++++++++++++ src/components/index.js | 4 +- src/views/interface/ThemeList.vue | 77 +++++++++++++++--- 4 files changed, 190 insertions(+), 14 deletions(-) create mode 100644 src/components/Upload/UpdateTheme.vue diff --git a/src/api/theme.js b/src/api/theme.js index aad62d1fd..68b1427cf 100644 --- a/src/api/theme.js +++ b/src/api/theme.js @@ -41,7 +41,7 @@ themeApi.getActivatedTheme = () => { themeApi.update = themeId => { return service({ - url: `${baseUrl}/${themeId}`, + url: `${baseUrl}/fetching/${themeId}`, timeout: 60000, method: 'put' }) @@ -94,6 +94,17 @@ themeApi.upload = (formData, uploadProgress, cancelToken) => { }) } +themeApi.updateByUpload = (formData, uploadProgress, cancelToken, themeId) => { + return service({ + url: `${baseUrl}/upload/${themeId}`, + timeout: 86400000, // 24 hours + data: formData, // form data + onUploadProgress: uploadProgress, + cancelToken: cancelToken, + method: 'put' + }) +} + themeApi.fetching = url => { return service({ url: `${baseUrl}/fetching`, diff --git a/src/components/Upload/UpdateTheme.vue b/src/components/Upload/UpdateTheme.vue new file mode 100644 index 000000000..fe0b348ff --- /dev/null +++ b/src/components/Upload/UpdateTheme.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/src/components/index.js b/src/components/index.js index 68da16ab1..8b6eb14ce 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -4,11 +4,13 @@ import Vue from 'vue' import Ellipsis from '@/components/Ellipsis' import FooterToolbar from '@/components/FooterToolbar' import Upload from '@/components/Upload/Upload' +import UpdateTheme from '@/components/Upload/UpdateTheme' const _components = { Ellipsis, FooterToolbar, - Upload + Upload, + UpdateTheme } const components = {} diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index d27d45427..799636ecb 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -90,7 +90,10 @@ />删除 - + 更新 + />在线更新 + + 从主题包更新 + @@ -278,7 +290,7 @@ 安装主题 @@ -293,7 +305,7 @@
@@ -338,19 +350,39 @@ multiple accept="application/zip" :uploadHandler="uploadHandler" - @change="handleChange" + @change="handleUploadChange" @success="handleUploadSuccess" >

-

点击选择主题或将主题拖拽到此处

+

点击选择主题包或将主题包拖拽到此处

支持单个或批量上传,仅支持 ZIP 格式的文件

+ + +

+ +

+

点击选择主题包或将主题包拖拽到此处

+

请选择最新的主题包,仅支持 ZIP 格式的文件

+
+
@@ -370,7 +402,8 @@ export default { return { themeLoading: false, optionLoading: true, - uploadVisible: false, + uploadThemeVisible: false, + uploadNewThemeVisible: false, fetchButtonLoading: false, wrapperCol: { xl: { span: 12 }, @@ -385,7 +418,9 @@ export default { themeSettings: [], themeProperty: null, fetchingUrl: null, - uploadHandler: themeApi.upload + uploadHandler: themeApi.upload, + updateByUploadHandler: themeApi.updateByUpload, + prepareUpdateTheme: {} } }, computed: { @@ -462,7 +497,7 @@ export default { this.themeConfiguration = [] this.themeProperty = null }, - handleChange(info) { + handleUploadChange(info) { const status = info.file.status if (status === 'done') { this.$message.success(`${info.file.name} 主题上传成功!`) @@ -470,8 +505,21 @@ export default { this.$message.error(`${info.file.name} 主题上传失败!`) } }, + handleNewThemeUploadChange(info) { + const status = info.file.status + if (status === 'done') { + this.$message.success(`${info.file.name} 主题更新成功!`) + } else if (status === 'error') { + this.$message.error(`${info.file.name} 主题更新失败!`) + } + }, handleUploadSuccess() { - this.uploadVisible = false + if (this.uploadThemeVisible) { + this.uploadThemeVisible = false + } + if (this.uploadNewThemeVisible) { + this.uploadNewThemeVisible = false + } this.loadThemes() }, handleEllipsisClick(theme) { @@ -489,7 +537,7 @@ export default { .fetching(this.fetchingUrl) .then(response => { this.$message.success('拉取成功!') - this.uploadVisible = false + this.uploadThemeVisible = false this.loadThemes() }) .finally(() => { @@ -501,6 +549,11 @@ export default { this.loadThemes() this.$message.success('刷新成功!') }) + }, + handleShowUpdateNewThemeModal(item) { + console.log(item) + this.prepareUpdateTheme = item + this.uploadNewThemeVisible = true } } } From 6165a75baa29ca769d55bfd6ecbc923f4947f80a Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 24 Aug 2019 11:40:36 +0800 Subject: [PATCH 08/59] Fixed install error. --- src/api/admin.js | 7 +++++++ src/views/system/Installation.vue | 33 ++++++++----------------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/src/api/admin.js b/src/api/admin.js index 7b9ef67b1..d3370218d 100644 --- a/src/api/admin.js +++ b/src/api/admin.js @@ -12,6 +12,13 @@ adminApi.counts = () => { }) } +adminApi.isInstalled = () => { + return service({ + url: `${baseUrl}/is_installed`, + method: 'get' + }) +} + adminApi.environments = () => { return service({ url: `${baseUrl}/environments`, diff --git a/src/views/system/Installation.vue b/src/views/system/Installation.vue index 0f906dcfd..5cc85e260 100644 --- a/src/views/system/Installation.vue +++ b/src/views/system/Installation.vue @@ -1,10 +1,10 @@ @@ -502,6 +504,12 @@ export default { }, onRefreshPostFromSetting(post) { this.selectedPost = post + }, + onRefreshTagIdsFromSetting(tagIds) { + this.selectedTagIds = tagIds + }, + onRefreshCategoryIdsFromSetting(categoryIds) { + this.selectedCategoryIds = categoryIds } } } diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 3320e39a7..5dcd676a9 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -17,13 +17,13 @@ label="文章标题:" v-if="needTitle" > - +
- + @@ -38,7 +38,7 @@ 开启 @@ -121,7 +121,7 @@ @@ -136,7 +136,7 @@
{ @@ -286,11 +309,11 @@ export default { this.categoryFormVisible = !this.categoryFormVisible }, handleDraftClick() { - this.post.status = 'DRAFT' + this.selectedPost.status = 'DRAFT' this.savePost() }, handlePublishClick() { - this.post.status = 'PUBLISHED' + this.selectedPost.status = 'PUBLISHED' this.savePost() }, savePost() { @@ -302,13 +325,13 @@ export default { }, createOrUpdatePost(createSuccess, updateSuccess, autoSave) { // Set category ids - this.post.categoryIds = this.selectedCategoryIds + this.selectedPost.categoryIds = this.selectedCategoryIds // Set tag ids - this.post.tagIds = this.selectedTagIds + this.selectedPost.tagIds = this.selectedTagIds - if (this.post.id) { + if (this.selectedPost.id) { // Update the post - postApi.update(this.post.id, this.post, autoSave).then(response => { + postApi.update(this.selectedPost.id, this.selectedPost, autoSave).then(response => { this.$log.debug('Updated post', response.data.data) if (updateSuccess) { updateSuccess() @@ -316,24 +339,23 @@ export default { }) } else { // Create the post - postApi.create(this.post, autoSave).then(response => { + postApi.create(this.selectedPost, autoSave).then(response => { this.$log.debug('Created post', response.data.data) if (createSuccess) { createSuccess() } - this.post = response.data.data + this.selectedPost = response.data.data }) } - this.$emit('onRefreshPost', this.post) }, onClose() { this.$emit('close', false) }, onPostDateChange(value, dateString) { - this.post.createTime = value.valueOf() + this.selectedPost.createTime = value.valueOf() }, onPostDateOk(value) { - this.post.createTime = value.valueOf() + this.selectedPost.createTime = value.valueOf() } } } From 66fd2dc9c0c7301bdbbda211a2816de3355013a6 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 27 Aug 2019 11:10:22 +0800 Subject: [PATCH 13/59] Add loading for post settings. --- src/views/post/PostList.vue | 2 +- src/views/post/components/PostSetting.vue | 323 ++++++++++++---------- 2 files changed, 172 insertions(+), 153 deletions(-) diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index 7f61c9581..f9f2894ef 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -490,11 +490,11 @@ export default { } }, handleShowPostSettings(post) { - this.postSettingVisible = true postApi.get(post.id).then(response => { this.selectedPost = response.data.data this.selectedTagIds = this.selectedPost.tagIds this.selectedCategoryIds = this.selectedPost.categoryIds + this.postSettingVisible = true }) }, // 关闭文章设置抽屉 diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 5dcd676a9..5ebe9108e 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -8,169 +8,175 @@ destroyOnClose :visible="visiable" > -
-
-

基本设置

-
- - - - - - - - - - - - - - 开启 - 关闭 - - - -
-
- - -
-

分类目录

-
- -
+ +
+
+

基本设置

+
- - + + + + + + + + - - - - - - - - 保存 - 新增 - 取消 + + + 开启 + 关闭 +
-
- + -
-

标签

-
- - - - - -
-
- - -
-

摘要

-
- - - - - -
-
- - -
-

缩略图

-
-
- - 移除 +
+

分类目录

+
+ +
+ + + + + + + + + + + + 保存 + 新增 + 取消 + + +
+ + +
+

标签

+
+ + + + + +
+
+ + +
+

摘要

+
+ + + + + +
+
+ + +
+

缩略图

+
+
+ + 移除 +
+
+
+
- -
- -
- 保存草稿 - 发布 - 保存 -
+ +
+ 保存草稿 + 发布 + 保存 +
+ From a6b8dcaa6539d772293a4ba228d7b6636e40a23a Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 27 Aug 2019 16:10:45 +0800 Subject: [PATCH 17/59] Created SheetSetting component. --- src/components/global.less | 28 ++- src/views/post/PostEdit.vue | 9 +- src/views/post/PostList.vue | 2 +- src/views/post/components/PostSetting.vue | 12 +- src/views/sheet/SheetEdit.vue | 191 +++------------- src/views/sheet/SheetList.vue | 2 +- src/views/sheet/components/SheetSetting.vue | 236 ++++++++++++++++++++ 7 files changed, 291 insertions(+), 189 deletions(-) create mode 100644 src/views/sheet/components/SheetSetting.vue diff --git a/src/components/global.less b/src/components/global.less index 1ac88332d..b739412de 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -1,15 +1,17 @@ @import './index.less'; -*{ +* { &::-webkit-scrollbar { width: 6px; height: 6px; background-color: #eee; } + &::-webkit-scrollbar-thumb { background-color: #1890ff; cursor: pointer; } + &::-webkit-scrollbar-track { background-color: #eee; cursor: pointer; @@ -545,7 +547,7 @@ body { } } -.comment-tab-wrapper{ +.comment-tab-wrapper { .ant-card-body { padding: 0 !important; } @@ -694,33 +696,41 @@ body { margin-bottom: 0; - p{ + p { margin-bottom: 0; } } -.post-thum { +.post-thumb { .img { width: 100%; cursor: pointer; border-radius: 4px; } - .post-thum-remove { + + .post-thumb-remove { margin-top: 16px; } } -.sheet-thum { +.sheet-thumb { .img { width: 100%; cursor: pointer; border-radius: 4px; } - .sheet-thum-remove { + + .sheet-thumb-remove { margin-top: 16px; } } -.ant-calendar-picker{ - width: 100%!important; +.ant-calendar-picker { + width: 100% !important; +} + +#editor { + .v-note-wrapper { + min-height: 580px; + } } \ No newline at end of file diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index e6c991827..24ca8c607 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -41,7 +41,7 @@ 发布 - diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index c565b2d7f..e622e44ce 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -149,7 +149,7 @@ > {{ text }} diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 492750b4b..ab80d5a09 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -138,14 +138,14 @@

缩略图

-
+
移除 @@ -156,7 +156,7 @@
@@ -200,7 +200,7 @@ export default { }, data() { return { - thumDrawerVisible: false, + thumbDrawerVisible: false, categoryFormVisible: false, settingLoading: true, options: [], @@ -313,7 +313,7 @@ export default { }, handleSelectPostThumb(data) { this.selectedPost.thumbnail = encodeURI(data.path) - this.thumDrawerVisible = false + this.thumbDrawerVisible = false }, handlerRemoveThumb() { this.selectedPost.thumbnail = null diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index a227dac83..f66633549 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -18,115 +18,24 @@ :toolbars="toolbars" :ishljs="true" :autofocus="false" - @imgAdd="pictureUploadHandle" + @imgAdd="handleAttachmentUpload" />
- - - -
-
-

基本设置

-
- - - - - - - - - - 开启 - 关闭 - - - - - - {{ tpl }} - - - -
-
- - -
-

缩略图

-
-
- - 移除 -
-
-
- -
- -
- 保存草稿 - 发布 -
-
-
+ + + 发布 - diff --git a/src/views/sheet/SheetList.vue b/src/views/sheet/SheetList.vue index 64ff75a3a..69521e25d 100644 --- a/src/views/sheet/SheetList.vue +++ b/src/views/sheet/SheetList.vue @@ -107,7 +107,7 @@ > {{ text }} diff --git a/src/views/sheet/components/SheetSetting.vue b/src/views/sheet/components/SheetSetting.vue new file mode 100644 index 000000000..f1a493fe7 --- /dev/null +++ b/src/views/sheet/components/SheetSetting.vue @@ -0,0 +1,236 @@ + + + From ab390983a7a7e574759520969c1f24d18eb4b7e2 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 27 Aug 2019 16:52:32 +0800 Subject: [PATCH 18/59] Support check update method. --- src/views/sheet/components/SheetSetting.vue | 2 +- src/views/system/About.vue | 85 ++++++++++++++++----- 2 files changed, 67 insertions(+), 20 deletions(-) diff --git a/src/views/sheet/components/SheetSetting.vue b/src/views/sheet/components/SheetSetting.vue index f1a493fe7..e42dbc333 100644 --- a/src/views/sheet/components/SheetSetting.vue +++ b/src/views/sheet/components/SheetSetting.vue @@ -29,7 +29,7 @@ showTime :defaultValue="pickerDefaultValue" format="YYYY-MM-DD HH:mm:ss" - placeholder="Select Publish Time" + placeholder="选择页面发表时间" @change="onSheetDateChange" @ok="onSheetDateOk" /> diff --git a/src/views/system/About.vue b/src/views/system/About.vue index 8862c8afc..bdd5f7543 100644 --- a/src/views/system/About.vue +++ b/src/views/system/About.vue @@ -39,7 +39,7 @@ -
    +
    • Server 版本:{{ environments.version }}
    • Admin 版本:{{ adminVersion }}
    • 数据库:{{ environments.database }}
    • @@ -50,16 +50,19 @@ 开源地址 用户文档 在线社区 @@ -107,6 +110,7 @@ - From 669c68d48f6235a5f6b5e575d7f566047c44a3ee Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 27 Aug 2019 22:48:56 +0800 Subject: [PATCH 19/59] Created ThemeSetting component. --- src/views/attachment/AttachmentList.vue | 6 +- .../components/AttachmentDetailDrawer.vue | 8 +- .../components/AttachmentDrawer.vue | 14 +- .../components/AttachmentSelectDrawer.vue | 8 +- .../comment/components/CommentDetail.vue | 8 +- src/views/dashboard/Dashboard.vue | 8 +- src/views/interface/ThemeList.vue | 248 ++---------------- .../interface/components/ThemeSetting.vue | 245 +++++++++++++++++ src/views/post/components/PostSetting.vue | 10 +- src/views/sheet/components/SheetSetting.vue | 8 +- src/views/sheet/internal/JournalList.vue | 8 +- src/views/sheet/internal/PhotoList.vue | 10 +- src/views/system/About.vue | 2 +- src/views/user/Login.vue | 10 +- 14 files changed, 323 insertions(+), 270 deletions(-) create mode 100644 src/views/interface/components/ThemeSetting.vue diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index 3626e3bf3..2e61e0650 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -144,7 +144,7 @@ @@ -193,7 +193,7 @@ export default { } }, model: { - prop: 'visiable', + prop: 'visible', event: 'close' }, props: { @@ -206,7 +206,7 @@ export default { required: false, default: false }, - visiable: { + visible: { type: Boolean, required: false, default: true @@ -221,7 +221,7 @@ export default { } }, watch: { - visiable: function(newValue, oldValue) { + visible: function(newValue, oldValue) { this.$log.debug('old value', oldValue) this.$log.debug('new value', newValue) if (newValue) { diff --git a/src/views/attachment/components/AttachmentDrawer.vue b/src/views/attachment/components/AttachmentDrawer.vue index bc052d1f9..1b676b0b2 100644 --- a/src/views/attachment/components/AttachmentDrawer.vue +++ b/src/views/attachment/components/AttachmentDrawer.vue @@ -4,7 +4,7 @@ title="附件库" :width="isMobile()?'100%':'460'" closable - :visible="visiable" + :visible="visible" destroyOnClose @close="onClose" > @@ -51,7 +51,7 @@
@@ -91,11 +91,11 @@ export default { name: 'AttachmentSelectDrawer', mixins: [mixin, mixinDevice], model: { - prop: 'visiable', + prop: 'visible', event: 'close' }, props: { - visiable: { + visible: { type: Boolean, required: false, default: false @@ -134,7 +134,7 @@ export default { this.loadAttachments() }, watch: { - visiable: function(newValue, oldValue) { + visible: function(newValue, oldValue) { if (newValue) { this.loadSkeleton() } diff --git a/src/views/comment/components/CommentDetail.vue b/src/views/comment/components/CommentDetail.vue index dd11a0243..93c8601b3 100644 --- a/src/views/comment/components/CommentDetail.vue +++ b/src/views/comment/components/CommentDetail.vue @@ -3,7 +3,7 @@ title="评论详情" :width="isMobile()?'100%':'460'" closable - :visible="visiable" + :visible="visible" destroyOnClose @close="onClose" > @@ -142,7 +142,7 @@ export default { } }, model: { - prop: 'visiable', + prop: 'visible', event: 'close' }, props: { @@ -150,7 +150,7 @@ export default { type: Object, required: true }, - visiable: { + visible: { type: Boolean, required: false, default: true @@ -169,7 +169,7 @@ export default { this.loadOptions() }, watch: { - visiable: function(newValue, oldValue) { + visible: function(newValue, oldValue) { this.$log.debug('old value', oldValue) this.$log.debug('new value', newValue) if (newValue) { diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index bb1de14c6..794ab3ae9 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -271,9 +271,9 @@ title="操作日志" :width="isMobile()?'100%':'460'" closable - :visible="logDrawerVisiable" + :visible="logDrawerVisible" destroyOnClose - @close="()=>this.logDrawerVisiable = false" + @close="()=>this.logDrawerVisible = false" > 启用
-
+
- - - - - - - - - - {{ themeProperty.author.name }} - - - - - - -
- - - - - - - - {{ option.label }} - - - {{ option.label }} - - - - - - - - -
-
-
-
- - 保存 - 附件库 - + - -
+ diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index ab80d5a09..2188f46ae 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -4,9 +4,9 @@ :width="isMobile()?'100%':'460'" placement="right" closable - @close="onClose" destroyOnClose - :visible="visiable" + @close="onClose" + :visible="visible" > { this.comments = response.data.data.content - this.commentVisiable = true + this.commentVisible = true }) }, handleCommentReplyClick(comment) { diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index e747f049b..7a17aaf8c 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -104,7 +104,7 @@ title="图片详情" :width="isMobile()?'100%':'460'" closable - :visible="drawerVisiable" + :visible="drawerVisible" destroyOnClose @close="onDrawerClose" > @@ -283,7 +283,7 @@ export default { mixins: [mixin, mixinDevice], data() { return { - drawerVisiable: false, + drawerVisible: false, drawerLoading: false, listLoading: true, thumDrawerVisible: false, @@ -338,7 +338,7 @@ export default { }, showDrawer(photo) { this.photo = photo - this.drawerVisiable = true + this.drawerVisible = true }, handlePaginationChange(page, size) { this.$log.debug(`Current: ${page}, PageSize: ${size}`) @@ -348,7 +348,7 @@ export default { }, handleAddClick() { this.editable = true - this.drawerVisiable = true + this.drawerVisible = true }, handleEditClick() { this.editable = true @@ -372,7 +372,7 @@ export default { this.loadPhotos() }, onDrawerClose() { - this.drawerVisiable = false + this.drawerVisible = false this.photo = {} this.editable = false } diff --git a/src/views/system/About.vue b/src/views/system/About.vue index bdd5f7543..11ab41761 100644 --- a/src/views/system/About.vue +++ b/src/views/system/About.vue @@ -262,7 +262,7 @@ UA 信息:${navigator.userAgent}` return } const title = '新版本提醒' - const content = '检测到新版本:' + data.name + ',点击下方按钮下载最新版本。' + const content = '检测到新版本:' + data.name + ',点击下方按钮查看最新版本。' const url = data.html_url this.$notification.open({ message: title, diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 2e620fa73..a635a3df0 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -61,7 +61,7 @@ @@ -90,7 +90,7 @@ export default { return { username: null, password: null, - apiModifyVisiable: false, + apiModifyVisible: false, defaultApiBefore: window.location.protocol + '//', apiUrl: window.location.host } @@ -131,14 +131,14 @@ export default { }, handleApiModifyModalOpen() { this.apiUrl = this.defaultApiUrl - this.apiModifyVisiable = true + this.apiModifyVisible = true }, handleApiModifyOk() { this.setApiUrl(this.apiUrl) - this.apiModifyVisiable = false + this.apiModifyVisible = false }, handleApiModifyCancel() { - this.apiModifyVisiable = false + this.apiModifyVisible = false }, handleApiUrlRestore() { this.restoreApiUrl() From 9866ae1a18d33460e72f048ba6f8d02ea10ab18a Mon Sep 17 00:00:00 2001 From: guqing <1484563614@qq.com> Date: Tue, 27 Aug 2019 23:31:38 +0800 Subject: [PATCH 20/59] Fix a bug with ThemeSetting components unable to receive prop values --- src/views/interface/ThemeList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index 3594aa632..a4ff2d355 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -126,7 +126,7 @@ From 94a3d43f4bc5c8a544e86c02543f88d368cd0654 Mon Sep 17 00:00:00 2001 From: guqing <1484563614@qq.com> Date: Tue, 27 Aug 2019 23:45:40 +0800 Subject: [PATCH 21/59] PostList replaces the original model property of PostSetting with the value of the visible binding property --- src/views/post/PostList.vue | 2 +- src/views/post/components/PostSetting.vue | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index e622e44ce..7e8b42712 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -267,7 +267,7 @@ :saveDraftButton="false" :savePublishButton="false" :saveButton="true" - v-model="postSettingVisible" + :visible="postSettingVisible" @close="onPostSettingsClose" @onRefreshPost="onRefreshPostFromSetting" @onRefreshTagIds="onRefreshTagIdsFromSetting" diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 2188f46ae..b3fd24f62 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -212,10 +212,11 @@ export default { categoryToCreate: {} } }, - model: { - prop: 'visible', - event: 'close' - }, + // TODO delete this commented code + // model: { + // prop: 'visible', + // event: 'close' + // }, props: { post: { type: Object, From 7d7f155f475a0764066adde46491bd0e7423671b Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 27 Aug 2019 23:49:03 +0800 Subject: [PATCH 22/59] Remove timer of auto save post or sheet. --- src/views/post/PostEdit.vue | 54 +++++++++++++++-------------------- src/views/sheet/SheetEdit.vue | 54 +++++++++++++++-------------------- 2 files changed, 46 insertions(+), 62 deletions(-) diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 24ca8c607..0bd974e9c 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -20,6 +20,8 @@ :ishljs="true" :autofocus="false" @imgAdd="handleAttachmentUpload" + @keydown.ctrl.83.native="handleSaveDraft" + @keydown.meta.83.native="handleSaveDraft" />
@@ -39,9 +41,14 @@ + 保存草稿 发布 import { mixin, mixinDevice } from '@/utils/mixin.js' +import moment from 'moment' import PostSetting from './components/PostSetting' import AttachmentDrawer from '../attachment/components/AttachmentDrawer' import FooterToolBar from '@/components/FooterToolbar' @@ -83,27 +91,9 @@ export default { postSettingVisible: false, postToStage: {}, selectedTagIds: [], - selectedCategoryIds: [], - timer: null + selectedCategoryIds: [] } }, - created() { - clearInterval(this.timer) - this.timer = null - this.autoSaveTimer() - }, - destroyed: function() { - clearInterval(this.timer) - this.timer = null - }, - beforeRouteLeave(to, from, next) { - if (this.timer !== null) { - clearInterval(this.timer) - } - // Auto save the post - this.autoSavePost() - next() - }, beforeRouteEnter(to, from, next) { // Get post id from query const postId = to.query.postId @@ -119,6 +109,20 @@ export default { }) }, methods: { + handleSaveDraft() { + this.postToStage.status = 'DRAFT' + if (!this.postToStage.title) { + this.postToStage.title = moment(new Date()) + } + if (!this.postToStage.originalContent) { + this.postToStage.originalContent = '开始编辑...' + } + this.createOrUpdatePost( + () => this.$message.success('保存草稿成功!'), + () => this.$message.success('保存草稿成功!'), + false + ) + }, createOrUpdatePost(createSuccess, updateSuccess, autoSave) { if (this.postToStage.id) { // Update the post @@ -139,18 +143,6 @@ export default { }) } }, - autoSavePost() { - if (this.postToStage.title != null && this.postToStage.originalContent != null) { - this.createOrUpdatePost(null, null, true) - } - }, - autoSaveTimer() { - if (this.timer == null) { - this.timer = setInterval(() => { - this.autoSavePost() - }, 15000) - } - }, handleAttachmentUpload(pos, $file) { var formdata = new FormData() formdata.append('file', $file) diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index f66633549..b53a21c62 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -19,6 +19,8 @@ :ishljs="true" :autofocus="false" @imgAdd="handleAttachmentUpload" + @keydown.ctrl.83.native="handleSaveDraft" + @keydown.meta.83.native="handleSaveDraft" />
@@ -33,8 +35,13 @@ + 保存草稿 发布 import { mixin, mixinDevice } from '@/utils/mixin.js' +import moment from 'moment' import { toolbars } from '@/core/const' import SheetSetting from './components/SheetSetting' import AttachmentDrawer from '../attachment/components/AttachmentDrawer' @@ -74,27 +82,9 @@ export default { }, attachmentDrawerVisible: false, sheetSettingVisible: false, - sheetToStage: {}, - timer: null + sheetToStage: {} } }, - created() { - clearInterval(this.timer) - this.timer = null - this.autoSaveTimer() - }, - destroyed: function() { - clearInterval(this.timer) - this.timer = null - }, - beforeRouteLeave(to, from, next) { - if (this.timer !== null) { - clearInterval(this.timer) - } - // Auto save the sheet - this.autoSaveSheet() - next() - }, beforeRouteEnter(to, from, next) { // Get sheetId id from query const sheetId = to.query.sheetId @@ -109,6 +99,20 @@ export default { }) }, methods: { + handleSaveDraft() { + this.sheetToStage.status = 'DRAFT' + if (!this.sheetToStage.title) { + this.sheetToStage.title = moment(new Date()) + } + if (!this.sheetToStage.originalContent) { + this.sheetToStage.originalContent = '开始编辑...' + } + this.createOrUpdateSheet( + () => this.$message.success('保存草稿成功!'), + () => this.$message.success('保存草稿成功!'), + false + ) + }, createOrUpdateSheet(createSuccess, updateSuccess, autoSave) { if (this.sheetToStage.id) { sheetApi.update(this.sheetToStage.id, this.sheetToStage, autoSave).then(response => { @@ -127,18 +131,6 @@ export default { }) } }, - autoSaveSheet() { - if (this.sheetToStage.title != null && this.sheetToStage.originalContent != null) { - this.createOrUpdateSheet(null, null, true) - } - }, - autoSaveTimer() { - if (this.timer == null) { - this.timer = setInterval(() => { - this.autoSaveSheet() - }, 15000) - } - }, handleAttachmentUpload(pos, $file) { var formdata = new FormData() formdata.append('file', $file) From 07ded21c086d6f064256a847ede6ee6a60269d83 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 27 Aug 2019 23:53:49 +0800 Subject: [PATCH 23/59] Remove model property. --- src/views/post/PostEdit.vue | 2 +- src/views/sheet/SheetEdit.vue | 2 +- src/views/sheet/components/SheetSetting.vue | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 0bd974e9c..c550f10ca 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -31,7 +31,7 @@ :post="postToStage" :tagIds="selectedTagIds" :categoryIds="selectedCategoryIds" - v-model="postSettingVisible" + :visible="postSettingVisible" @close="onPostSettingsClose" @onRefreshPost="onRefreshPostFromSetting" @onRefreshTagIds="onRefreshTagIdsFromSetting" diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index b53a21c62..b2cbf88d2 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -28,7 +28,7 @@ diff --git a/src/views/sheet/components/SheetSetting.vue b/src/views/sheet/components/SheetSetting.vue index cb95fc366..bbec4fc6c 100644 --- a/src/views/sheet/components/SheetSetting.vue +++ b/src/views/sheet/components/SheetSetting.vue @@ -121,10 +121,10 @@ export default { customTpls: [] } }, - model: { - prop: 'visible', - event: 'close' - }, + // model: { + // prop: 'visible', + // event: 'close' + // }, props: { sheet: { type: Object, From 4e1e2628f9bc326a62406ac28dab32dfe2a16e45 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 28 Aug 2019 00:12:38 +0800 Subject: [PATCH 24/59] Support attachment type for theme setting. --- src/views/interface/ThemeList.vue | 6 +--- .../interface/components/ThemeSetting.vue | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index a4ff2d355..c41741628 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -245,13 +245,9 @@ diff --git a/src/views/sheet/components/SheetSetting.vue b/src/views/sheet/components/SheetSetting.vue index bbec4fc6c..437e3e0b6 100644 --- a/src/views/sheet/components/SheetSetting.vue +++ b/src/views/sheet/components/SheetSetting.vue @@ -18,6 +18,12 @@

基本设置

+ + + Date: Wed, 28 Aug 2019 09:46:10 +0800 Subject: [PATCH 27/59] Add verification for form. --- .../components/AttachmentDetailDrawer.vue | 25 +- src/views/comment/components/CommentTab.vue | 11 +- src/views/dashboard/Dashboard.vue | 95 +++--- src/views/interface/ThemeList.vue | 7 + src/views/post/CategoryList.vue | 7 + src/views/post/TagList.vue | 7 + src/views/post/components/PostSetting.vue | 25 +- src/views/sheet/components/SheetSetting.vue | 18 +- src/views/system/OptionForm.vue | 275 ++++++++++++++++++ src/views/user/Profile.vue | 21 ++ 10 files changed, 440 insertions(+), 51 deletions(-) diff --git a/src/views/attachment/components/AttachmentDetailDrawer.vue b/src/views/attachment/components/AttachmentDetailDrawer.vue index 60254ba19..ecbe5bf1e 100644 --- a/src/views/attachment/components/AttachmentDetailDrawer.vue +++ b/src/views/attachment/components/AttachmentDetailDrawer.vue @@ -19,13 +19,17 @@ >
此文件不支持预览
- + + :playsinline="true" + >
@@ -182,10 +186,12 @@ export default { controls: true, loop: false, playbackRates: [0.7, 1.0, 1.5, 2.0], - sources: [{ - type: 'video/mp4', - src: 'https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm' - }], + sources: [ + { + type: 'video/mp4', + src: 'https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm' + } + ], poster: '/static/images/author.jpg', width: document.documentElement.clientWidth, notSupportedMessage: '此视频暂无法播放,请稍后再试' @@ -253,6 +259,13 @@ export default { this.editable = !this.editable }, doUpdateAttachment() { + if (!this.attachment.name) { + this.$notification['error']({ + message: '提示', + description: '附件名称不能为空!' + }) + return + } attachmentApi.update(this.attachment.id, this.attachment).then(response => { this.$log.debug('Updated attachment', response.data.data) this.$message.success('附件修改成功!') diff --git a/src/views/comment/components/CommentTab.vue b/src/views/comment/components/CommentTab.vue index 1d8f1436b..9f8d7ad1c 100644 --- a/src/views/comment/components/CommentTab.vue +++ b/src/views/comment/components/CommentTab.vue @@ -250,12 +250,12 @@
- + /> -->
diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index c41741628..9ed8f1b39 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -349,6 +349,13 @@ export default { this.activeTheme(theme.id) }, handleFetching() { + if (!this.fetchingUrl) { + this.$notification['error']({ + message: '提示', + description: '远程地址不能为空!' + }) + return + } this.fetchButtonLoading = true themeApi .fetching(this.fetchingUrl) diff --git a/src/views/post/CategoryList.vue b/src/views/post/CategoryList.vue index b123b952a..6fc7b3531 100644 --- a/src/views/post/CategoryList.vue +++ b/src/views/post/CategoryList.vue @@ -206,6 +206,13 @@ export default { }) }, createOrUpdateCategory() { + if (!this.categoryToCreate.name) { + this.$notification['error']({ + message: '提示', + description: '分类名称不能为空!' + }) + return + } if (this.categoryToCreate.id) { categoryApi.update(this.categoryToCreate.id, this.categoryToCreate).then(response => { this.$message.success('更新成功!') diff --git a/src/views/post/TagList.vue b/src/views/post/TagList.vue index 082a5d092..1da83e527 100644 --- a/src/views/post/TagList.vue +++ b/src/views/post/TagList.vue @@ -132,6 +132,13 @@ export default { }) }, createOrUpdateTag() { + if (!this.tagToCreate.name) { + this.$notification['error']({ + message: '提示', + description: '标签名称不能为空!' + }) + return + } if (this.tagToCreate.id) { tagApi.update(this.tagToCreate.id, this.tagToCreate).then(response => { this.$message.success('更新成功!') diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index b3fd24f62..6b374ca32 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -320,6 +320,13 @@ export default { this.selectedPost.thumbnail = null }, handlerCreateCategory() { + if (!this.categoryToCreate.name) { + this.$notification['error']({ + message: '提示', + description: '分类名称不能为空!' + }) + return + } categoryApi.create(this.categoryToCreate).then(response => { this.loadCategories() this.categoryToCreate = {} @@ -338,12 +345,26 @@ export default { }, savePost() { this.createOrUpdatePost( - () => this.$message.success('文章创建成功'), - () => this.$message.success('文章更新成功'), + () => this.$message.success('文章发布成功'), + () => this.$message.success('文章发布成功'), false ) }, createOrUpdatePost(createSuccess, updateSuccess, autoSave) { + if (!this.selectedPost.title) { + this.$notification['error']({ + message: '提示', + description: '文章标题不能为空!' + }) + return + } + if (!this.selectedPost.originalContent) { + this.$notification['error']({ + message: '提示', + description: '文章内容不能为空!' + }) + return + } // Set category ids this.selectedPost.categoryIds = this.selectedCategoryIds // Set tag ids diff --git a/src/views/sheet/components/SheetSetting.vue b/src/views/sheet/components/SheetSetting.vue index 437e3e0b6..c880d2600 100644 --- a/src/views/sheet/components/SheetSetting.vue +++ b/src/views/sheet/components/SheetSetting.vue @@ -208,12 +208,26 @@ export default { }, saveSheet() { this.createOrUpdateSheet( - () => this.$message.success('页面创建成功!'), - () => this.$message.success('页面更新成功!'), + () => this.$message.success('页面发布成功!'), + () => this.$message.success('页面发布成功!'), false ) }, createOrUpdateSheet(createSuccess, updateSuccess, autoSave) { + if (!this.selectedSheet.title) { + this.$notification['error']({ + message: '提示', + description: '页面标题不能为空!' + }) + return + } + if (!this.selectedSheet.originalContent) { + this.$notification['error']({ + message: '提示', + description: '页面内容不能为空!' + }) + return + } if (this.selectedSheet.id) { sheetApi.update(this.selectedSheet.id, this.selectedSheet, autoSave).then(response => { this.$log.debug('Updated sheet', response.data.data) diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 90443bb06..6b0763664 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -736,6 +736,260 @@ export default { }) }, handleSaveOptions() { + if (!this.options.blog_title) { + this.$notification['error']({ + message: '提示', + description: '博客标题不能为空!' + }) + return + } + + if (!this.options.blog_url) { + this.$notification['error']({ + message: '提示', + description: '博客地址不能为空!' + }) + return + } + + // 新评论通知和回复通知验证 + if (this.options.comment_new_notice || this.options.comment_reply_notice) { + if (!this.options.email_enabled) { + this.$notification['error']({ + message: '提示', + description: '新评论通知或回复通知需要打开和配置 SMTP 服务!' + }) + return + } + } + + // 附件配置验证 + switch (this.options.attachment_type) { + case 'SMMS': + if (!this.options.smms_api_secret_token) { + this.$notification['error']({ + message: '提示', + description: 'Secret Token不能为空!' + }) + return + } + break + case 'UPYUN': + if (!this.options.oss_upyun_domain) { + this.$notification['error']({ + message: '提示', + description: '域名不能为空!' + }) + return + } + if (!this.options.oss_upyun_bucket) { + this.$notification['error']({ + message: '提示', + description: '空间名称不能为空!' + }) + return + } + if (!this.options.oss_upyun_operator) { + this.$notification['error']({ + message: '提示', + description: '操作员名称不能为空!' + }) + return + } + if (!this.options.oss_upyun_password) { + this.$notification['error']({ + message: '提示', + description: '操作员密码不能为空!' + }) + return + } + if (!this.options.oss_upyun_source) { + this.$notification['error']({ + message: '提示', + description: '文件目录不能为空!' + }) + return + } + break + case 'QNYUN': + if (!this.options.oss_qiniu_domain) { + this.$notification['error']({ + message: '提示', + description: '域名不能为空!' + }) + return + } + if (!this.options.oss_qiniu_access_key) { + this.$notification['error']({ + message: '提示', + description: 'Access Key 不能为空!' + }) + return + } + if (!this.options.oss_qiniu_secret_key) { + this.$notification['error']({ + message: '提示', + description: 'Secret Key 不能为空!' + }) + return + } + if (!this.options.oss_qiniu_bucket) { + this.$notification['error']({ + message: '提示', + description: 'Bucket 不能为空!' + }) + return + } + break + case 'ALIYUN': + if (!this.options.oss_aliyun_bucket_name) { + this.$notification['error']({ + message: '提示', + description: 'Bucket 不能为空!' + }) + return + } + if (!this.options.oss_aliyun_endpoint) { + this.$notification['error']({ + message: '提示', + description: 'EndPoint(地域节点) 不能为空!' + }) + return + } + if (!this.options.oss_aliyun_access_key) { + this.$notification['error']({ + message: '提示', + description: 'Access Key 不能为空!' + }) + return + } + if (!this.options.oss_aliyun_access_secret) { + this.$notification['error']({ + message: '提示', + description: 'Access Secret 不能为空!' + }) + return + } + break + case 'BAIDUYUN': + if (!this.options.oss_baiduyun_bucket_name) { + this.$notification['error']({ + message: '提示', + description: 'Bucket 不能为空!' + }) + return + } + if (!this.options.oss_baiduyun_endpoint) { + this.$notification['error']({ + message: '提示', + description: 'EndPoint(地域节点) 不能为空!' + }) + return + } + if (!this.options.oss_baiduyun_access_key) { + this.$notification['error']({ + message: '提示', + description: 'Access Key 不能为空!' + }) + return + } + if (!this.options.oss_baiduyun_access_secret) { + this.$notification['error']({ + message: '提示', + description: 'Access Secret 不能为空!' + }) + return + } + break + case 'TENCENTYUN': + if (!this.options.oss_tencentyun_bucket_name) { + this.$notification['error']({ + message: '提示', + description: 'Bucket 不能为空!' + }) + return + } + if (!this.options.oss_tencentyun_region) { + this.$notification['error']({ + message: '提示', + description: '区域不能为空!' + }) + return + } + if (!this.options.oss_tencentyun_access_key) { + this.$notification['error']({ + message: '提示', + description: 'Secret Id 不能为空!' + }) + return + } + if (!this.options.oss_tencentyun_access_secret) { + this.$notification['error']({ + message: '提示', + description: 'Secret Key 不能为空!' + }) + return + } + break + } + + // SMTP 配置验证 + if (this.options.email_enabled) { + if (!this.options.email_host) { + this.$notification['error']({ + message: '提示', + description: 'SMTP 地址不能为空!' + }) + return + } + if (!this.options.email_protocol) { + this.$notification['error']({ + message: '提示', + description: '发送协议不能为空!' + }) + return + } + if (!this.options.email_ssl_port) { + this.$notification['error']({ + message: '提示', + description: 'SSL 端口不能为空!' + }) + return + } + if (!this.options.email_username) { + this.$notification['error']({ + message: '提示', + description: '邮箱账号不能为空!' + }) + return + } + if (!this.options.email_password) { + this.$notification['error']({ + message: '提示', + description: '邮箱密码不能为空!' + }) + return + } + if (!this.options.email_from_name) { + this.$notification['error']({ + message: '提示', + description: '发件人不能为空!' + }) + return + } + } + + // API 配置验证 + if (this.options.api_enabled) { + if (!this.options.api_access_key) { + this.$notification['error']({ + message: '提示', + description: 'Access key 不能为空!' + }) + return + } + } + optionApi.save(this.options).then(response => { this.loadOptions() this.loadUser() @@ -807,6 +1061,27 @@ export default { this.logoDrawerVisible = false }, handleTestMailClick() { + if (!this.mailParam.to) { + this.$notification['error']({ + message: '提示', + description: '收件人不能为空!' + }) + return + } + if (!this.mailParam.subject) { + this.$notification['error']({ + message: '提示', + description: '主题不能为空!' + }) + return + } + if (!this.mailParam.content) { + this.$notification['error']({ + message: '提示', + description: '内容不能为空!' + }) + return + } mailApi.testMail(this.mailParam).then(response => { this.$message.info(response.data.message) }) diff --git a/src/views/user/Profile.vue b/src/views/user/Profile.vue index 67f9a6767..61ad2c5ac 100644 --- a/src/views/user/Profile.vue +++ b/src/views/user/Profile.vue @@ -211,6 +211,27 @@ export default { userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {}) }, handleUpdateProfile() { + if (!this.user.username) { + this.$notification['error']({ + message: '提示', + description: '用户名不能为空!' + }) + return + } + if (!this.user.nickname) { + this.$notification['error']({ + message: '提示', + description: '用户昵称不能为空!' + }) + return + } + if (!this.user.email) { + this.$notification['error']({ + message: '提示', + description: '邮箱不能为空!' + }) + return + } userApi.updateProfile(this.user).then(response => { this.user = response.data.data this.setUser(Object.assign({}, this.user)) From 87eb9aa7eb4cd4c77d74df02d4c67a7e87ec87d1 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 28 Aug 2019 10:46:58 +0800 Subject: [PATCH 28/59] Fixed file upload handler. --- src/views/system/OptionForm.vue | 66 +++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 6b0763664..bf954f6df 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -376,11 +376,17 @@ + + +
+ + +
- + - + - + - + + + + - +
- + - + 北京一区 北京 上海(华东) @@ -479,19 +497,13 @@ label="Secret Id:" :wrapper-col="wrapperCol" > - + - - - - +
@@ -872,58 +884,58 @@ export default { } break case 'BAIDUYUN': - if (!this.options.oss_baiduyun_bucket_name) { + if (!this.options.bos_baiduyun_bucket_name) { this.$notification['error']({ message: '提示', description: 'Bucket 不能为空!' }) return } - if (!this.options.oss_baiduyun_endpoint) { + if (!this.options.bos_baiduyun_endpoint) { this.$notification['error']({ message: '提示', description: 'EndPoint(地域节点) 不能为空!' }) return } - if (!this.options.oss_baiduyun_access_key) { + if (!this.options.bos_baiduyun_access_key) { this.$notification['error']({ message: '提示', description: 'Access Key 不能为空!' }) return } - if (!this.options.oss_baiduyun_access_secret) { + if (!this.options.bos_baiduyun_secret_key) { this.$notification['error']({ message: '提示', - description: 'Access Secret 不能为空!' + description: 'Secret Key 不能为空!' }) return } break case 'TENCENTYUN': - if (!this.options.oss_tencentyun_bucket_name) { + if (!this.options.cos_tencentyun_bucket_name) { this.$notification['error']({ message: '提示', description: 'Bucket 不能为空!' }) return } - if (!this.options.oss_tencentyun_region) { + if (!this.options.cos_tencentyun_region) { this.$notification['error']({ message: '提示', description: '区域不能为空!' }) return } - if (!this.options.oss_tencentyun_access_key) { + if (!this.options.cos_tencentyun_secret_id) { this.$notification['error']({ message: '提示', description: 'Secret Id 不能为空!' }) return } - if (!this.options.oss_tencentyun_access_secret) { + if (!this.options.cos_tencentyun_secret_key) { this.$notification['error']({ message: '提示', description: 'Secret Key 不能为空!' From 8e9dd8f49ddef6158d3a4736238903e13ceb1994 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 28 Aug 2019 11:56:05 +0800 Subject: [PATCH 29/59] released 1.1.0-beta.1. --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d318c1be1..728240677 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "halo-admin", - "version": "1.0.3", + "version": "1.1.0-beta.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6f342bf1d..01e2b3a22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "halo-admin", - "version": "1.0.3", + "version": "1.1.0-beta.1", "private": true, "scripts": { "serve": "vue-cli-service serve", From eddf55d8e62339a967b55cde78a96a0f97057cb5 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Thu, 29 Aug 2019 21:01:05 +0800 Subject: [PATCH 30/59] Support set post sort. --- src/views/system/Installation.vue | 2 +- src/views/system/OptionForm.vue | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/system/Installation.vue b/src/views/system/Installation.vue index 5cc85e260..6956b9e53 100644 --- a/src/views/system/Installation.vue +++ b/src/views/system/Installation.vue @@ -91,7 +91,7 @@ 文章设置 + + + 创建时间 + 最后编辑时间 + 点击量 + + Date: Fri, 30 Aug 2019 17:29:17 +0800 Subject: [PATCH 31/59] Remove useless files and dependencies. --- package-lock.json | 725 +++++------------- package.json | 3 - src/App.vue | 14 +- src/api/theme.js | 11 +- src/components/SettingDrawer/settingConfig.js | 90 --- src/components/Upload/UploadPhoto.vue | 1 - src/components/global.less | 35 +- src/core/lazy_use.js | 11 - src/core/use.js | 10 - src/views/404.vue | 14 - src/views/Home.vue | 9 - .../components/AttachmentDrawer.vue | 16 - .../components/AttachmentSelectDrawer.vue | 16 - src/views/interface/ThemeEdit.vue | 46 +- src/views/interface/ThemeList.vue | 2 +- src/views/post/CategoryList.vue | 5 +- 16 files changed, 273 insertions(+), 735 deletions(-) delete mode 100644 src/components/SettingDrawer/settingConfig.js delete mode 100644 src/views/404.vue delete mode 100644 src/views/Home.vue diff --git a/package-lock.json b/package-lock.json index 728240677..e44672f05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "@ant-design/colors": { "version": "3.1.0", "resolved": "https://registry.npm.taobao.org/@ant-design/colors/download/@ant-design/colors-3.1.0.tgz", - "integrity": "sha1-t+LMYaTobT0QlJQDSs+xIi2sqjw=", + "integrity": "sha512-Td7g1P53sNFyT4Gya6836e70TrhoVZ+HjZs6mpWIHrxl4/VqsjjOyzj/8ktOuw0lCx+BfYu9UO1CiJ0MoYYfhg==", "requires": { "tinycolor2": "^1.4.1" } @@ -15,113 +15,17 @@ "@ant-design/icons": { "version": "2.1.1", "resolved": "https://registry.npm.taobao.org/@ant-design/icons/download/@ant-design/icons-2.1.1.tgz", - "integrity": "sha1-e5wI3/1PXUHbZn2dvl4BB9C9mko=" + "integrity": "sha512-jCH+k2Vjlno4YWl6g535nHR09PwCEmTBKAG6VqF+rhkrSPRLfgpU2maagwbZPLjaHuU5Jd1DFQ2KJpQuI6uG8w==" }, "@ant-design/icons-vue": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/@ant-design/icons-vue/download/@ant-design/icons-vue-2.0.0.tgz", - "integrity": "sha1-A1f1AQpATp80qHpLQbKgjfaR284=", + "integrity": "sha512-2c0QQE5hL4N48k5NkPG5sdpMl9YnvyNhf0U7YkdZYDlLnspoRU7vIA0UK9eHBs6OpFLcJB6o8eJrIl2ajBskPg==", "requires": { "@ant-design/colors": "^3.1.0", "babel-runtime": "^6.26.0" } }, - "@antv/adjust": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@antv/adjust/-/adjust-0.1.1.tgz", - "integrity": "sha512-9FaMOyBlM4AgoRL0b5o0VhEKAYkexBNUrxV8XmpHU/9NBPJONBOB/NZUlQDqxtLItrt91tCfbAuMQmF529UX2Q==", - "requires": { - "@antv/util": "~1.3.1" - } - }, - "@antv/attr": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@antv/attr/-/attr-0.1.2.tgz", - "integrity": "sha512-QXjP+T2I+pJQcwZx1oCA4tipG43vgeCeKcGGKahlcxb71OBAzjJZm1QbF4frKXcnOqRkxVXtCr70X9TRair3Ew==", - "requires": { - "@antv/util": "~1.3.1" - } - }, - "@antv/component": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@antv/component/-/component-0.3.2.tgz", - "integrity": "sha512-iU/rxBhNFpT8ALaeLSnH9h2dnCwMM1igzLZDwnXGnRDLEagSl3kcMnKHIzAnoNiyI3u2T6Fh4TekuXnbrZlXpA==", - "requires": { - "@antv/attr": "~0.1.2", - "@antv/g": "~3.3.5", - "@antv/util": "~1.3.1", - "wolfy87-eventemitter": "~5.1.0" - } - }, - "@antv/coord": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@antv/coord/-/coord-0.1.0.tgz", - "integrity": "sha512-W1R8h3Jfb3AfMBVfCreFPMVetgEYuwHBIGn0+d3EgYXe2ckOF8XWjkpGF1fZhOMHREMr+Gt27NGiQh8yBdLUgg==", - "requires": { - "@antv/util": "~1.3.1" - } - }, - "@antv/g": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@antv/g/-/g-3.3.6.tgz", - "integrity": "sha512-2GtyTz++s0BbN6s0ZL2/nrqGYCkd52pVoNH92YkrTdTOvpO6Z4DNoo6jGVgZdPX6Nzwli6yduC8MinVAhE8X6g==", - "requires": { - "@antv/gl-matrix": "~2.7.1", - "@antv/util": "~1.3.1", - "d3-ease": "~1.0.3", - "d3-interpolate": "~1.1.5", - "d3-timer": "~1.0.6", - "wolfy87-eventemitter": "~5.1.0" - } - }, - "@antv/g2": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@antv/g2/-/g2-3.5.3.tgz", - "integrity": "sha512-JXaceNrJ186auehjBLatl0tz/mYLa2fhQ/SK5/aC4nTcvCdSDIJgMXPmAaKbsqz7y9G0iE9FDRxE2UMkYIzI2A==", - "requires": { - "@antv/adjust": "~0.1.0", - "@antv/attr": "~0.1.2", - "@antv/component": "~0.3.2", - "@antv/coord": "~0.1.0", - "@antv/g": "~3.3.6", - "@antv/scale": "~0.1.1", - "@antv/util": "~1.3.1", - "venn.js": "~0.2.20", - "wolfy87-eventemitter": "~5.1.0" - } - }, - "@antv/g2-brush": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@antv/g2-brush/-/g2-brush-0.0.2.tgz", - "integrity": "sha512-7O9szwem19nmEgReXhFB8kVLRaz8J5MHvrzDSDY36YaBOaHSWRGHnvYt2KkkPqgWtHtLY1srssk4X/UmP5govA==" - }, - "@antv/g2-plugin-slider": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@antv/g2-plugin-slider/-/g2-plugin-slider-2.1.1.tgz", - "integrity": "sha512-nB678VEGG3FkrvkDDFADAKjLQIeXzITEYqey5oeOpbf0vT5jOa55lQDyJDZ79cK8PmU/Hz6VPeSb3CNQBA+/FQ==" - }, - "@antv/gl-matrix": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@antv/gl-matrix/-/gl-matrix-2.7.1.tgz", - "integrity": "sha512-oOWcVNlpELIKi9x+Mm1Vwbz8pXfkbJKykoCIOJ/dNK79hSIANbpXJ5d3Rra9/wZqK6MC961B7sybFhPlLraT3Q==" - }, - "@antv/scale": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.1.2.tgz", - "integrity": "sha512-lAJJUDiQIgoBSnlJDlMjbuaO2K71/e85hNtsjuv22os6QPqJZE/Q56JXLAgT5L5vXo9d4DFnxzwOBjdonHJXoA==", - "requires": { - "@antv/util": "~1.3.1", - "fecha": "~2.3.3" - } - }, - "@antv/util": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@antv/util/-/util-1.3.1.tgz", - "integrity": "sha512-cbUta0hIJrKEaW3eKoGarz3Ita+9qUPF2YzTj8A6wds/nNiy20G26ztIWHU+5ThLc13B1n5Ik52LbaCaeg9enA==", - "requires": { - "@antv/gl-matrix": "^2.7.1" - } - }, "@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -1203,7 +1107,7 @@ "@jest/source-map": { "version": "24.9.0", "resolved": "https://registry.npm.taobao.org/@jest/source-map/download/@jest/source-map-24.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40jest%2Fsource-map%2Fdownload%2F%40jest%2Fsource-map-24.9.0.tgz", - "integrity": "sha1-DiY6lEML5LQdpoPMwea//ioZFxQ=", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", "dev": true, "requires": { "callsites": "^3.0.0", @@ -1214,7 +1118,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz", - "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "source-map": { @@ -1658,7 +1562,7 @@ "@types/babel__core": { "version": "7.1.2", "resolved": "https://registry.npm.taobao.org/@types/babel__core/download/@types/babel__core-7.1.2.tgz", - "integrity": "sha1-YIx09VkoAz/OGLmbITwWvks9EU8=", + "integrity": "sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -1671,7 +1575,7 @@ "@types/babel__generator": { "version": "7.0.2", "resolved": "https://registry.npm.taobao.org/@types/babel__generator/download/@types/babel__generator-7.0.2.tgz", - "integrity": "sha1-0hEqayH61gDXZ0J0KTyF3ODLR/w=", + "integrity": "sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ==", "dev": true, "requires": { "@babel/types": "^7.0.0" @@ -1680,7 +1584,7 @@ "@types/babel__template": { "version": "7.0.2", "resolved": "https://registry.npm.taobao.org/@types/babel__template/download/@types/babel__template-7.0.2.tgz", - "integrity": "sha1-T/Y9a1Lt2sHee5daUiPtMuzqkwc=", + "integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -1690,17 +1594,12 @@ "@types/babel__traverse": { "version": "7.0.7", "resolved": "https://registry.npm.taobao.org/@types/babel__traverse/download/@types/babel__traverse-7.0.7.tgz", - "integrity": "sha1-JJbp/1YZbMFCnHIDTgfqthIbbz8=", + "integrity": "sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw==", "dev": true, "requires": { "@babel/types": "^7.3.0" } }, - "@types/d3-format": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-1.3.1.tgz", - "integrity": "sha512-KAWvReOKMDreaAwOjdfQMm0HjcUMlQG47GwqdVKgmm20vTd2pucj0a70c3gUSHrnsmo6H2AMrkBsZU2UhJLq8A==" - }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -1721,13 +1620,13 @@ "@types/istanbul-lib-coverage": { "version": "2.0.1", "resolved": "https://registry.npm.taobao.org/@types/istanbul-lib-coverage/download/@types/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha1-QplbRG25pIoRoH7Ag0mahg6ROP8=", + "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", "dev": true }, "@types/istanbul-lib-report": { "version": "1.1.1", "resolved": "https://registry.npm.taobao.org/@types/istanbul-lib-report/download/@types/istanbul-lib-report-1.1.1.tgz", - "integrity": "sha1-5Ucef6M8YTWN04QmGJwDelhDO4w=", + "integrity": "sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "*" @@ -1736,7 +1635,7 @@ "@types/istanbul-reports": { "version": "1.1.1", "resolved": "https://registry.npm.taobao.org/@types/istanbul-reports/download/@types/istanbul-reports-1.1.1.tgz", - "integrity": "sha1-eoy/akBvNsit2HFiWyeOrwsNJVo=", + "integrity": "sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "*", @@ -1753,11 +1652,6 @@ "@types/webpack": "*" } }, - "@types/lodash": { - "version": "4.14.133", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.133.tgz", - "integrity": "sha512-/3JqnvPnY58GLzG3Y7fpphOhATV1DDZ/Ak3DQufjlRK5E4u+s0CfClfNFtAGBabw+jDGtRFbOZe+Z02ZMWCBNQ==" - }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -1767,7 +1661,8 @@ "@types/node": { "version": "12.0.4", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.4.tgz", - "integrity": "sha512-j8YL2C0fXq7IONwl/Ud5Kt0PeXw22zGERt+HSSnwbKOJVsAGkEz3sFCYwaF9IOuoG1HOtE0vKCj6sXF7Q0+Vaw==" + "integrity": "sha512-j8YL2C0fXq7IONwl/Ud5Kt0PeXw22zGERt+HSSnwbKOJVsAGkEz3sFCYwaF9IOuoG1HOtE0vKCj6sXF7Q0+Vaw==", + "dev": true }, "@types/normalize-package-data": { "version": "2.4.0", @@ -1784,7 +1679,7 @@ "@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/@types/stack-utils/download/@types/stack-utils-1.0.1.tgz", - "integrity": "sha1-CoUdO9lkmPolwzq3J47TvWXwbD4=", + "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", "dev": true }, "@types/strip-bom": { @@ -1846,7 +1741,7 @@ "@types/yargs": { "version": "13.0.2", "resolved": "https://registry.npm.taobao.org/@types/yargs/download/@types/yargs-13.0.2.tgz?cache=0&sync_timestamp=1564593277142&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fyargs%2Fdownload%2F%40types%2Fyargs-13.0.2.tgz", - "integrity": "sha1-pkZ0/AFJV07NkLp0bpMrWl97NlM=", + "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -1855,7 +1750,7 @@ "@types/yargs-parser": { "version": "13.0.0", "resolved": "https://registry.npm.taobao.org/@types/yargs-parser/download/@types/yargs-parser-13.0.0.tgz", - "integrity": "sha1-RTdDxbv58b7WHZWbqrWwa+ApstA=", + "integrity": "sha512-wBlsw+8n21e6eTd4yVv8YD/E3xq0O6nNnJIquutAsFGE7EyMKz7W6RNT6BRu1SmdgmlCZ9tb0X+j+D6HGr8pZw==", "dev": true }, "@vue/babel-helper-vue-jsx-merge-props": { @@ -2802,7 +2697,7 @@ "add-dom-event-listener": { "version": "1.1.0", "resolved": "https://registry.npm.taobao.org/add-dom-event-listener/download/add-dom-event-listener-1.1.0.tgz", - "integrity": "sha1-apLbOg3Qq8JU4JXA8dwUrLuq4xA=", + "integrity": "sha512-WCxx1ixHT0GQU9hb0KI/mhgRQhnU+U3GvwY6ZvVjYq8rsihIGoaIOUbY0yMPBxLH5MDtr0kz3fisWGNcbWW7Jw==", "requires": { "object-assign": "4.x" } @@ -2845,27 +2740,12 @@ "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", "dev": true }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, "alphanum-sort": { "version": "1.0.2", "resolved": "http://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", "dev": true }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, "animate.css": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-3.7.2.tgz", @@ -2892,17 +2772,19 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "ant-design-vue": { "version": "1.3.16", "resolved": "https://registry.npm.taobao.org/ant-design-vue/download/ant-design-vue-1.3.16.tgz", - "integrity": "sha1-sY9/omXtx8eYpaZdFdktctOgvrE=", + "integrity": "sha512-4HZNGaAWOxkD1j05aMp8gU8z99vrz2lzmfcrjEQqTgr0gYBeHOuxq7U+NvZGuaIonYz4h/DlbBh/HK4fKdV/Xw==", "requires": { "@ant-design/icons": "^2.1.1", "@ant-design/icons-vue": "^2.0.0", @@ -3052,7 +2934,7 @@ "array-tree-filter": { "version": "2.1.0", "resolved": "https://registry.npm.taobao.org/array-tree-filter/download/array-tree-filter-2.1.0.tgz", - "integrity": "sha1-hzrAD+yDdJ8lWsjdCDgUtPYykZA=" + "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==" }, "array-union": { "version": "1.0.2", @@ -3084,7 +2966,7 @@ "asap": { "version": "2.0.6", "resolved": "https://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true, "optional": true }, @@ -3342,7 +3224,7 @@ "babel-helper-vue-jsx-merge-props": { "version": "2.0.3", "resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz", - "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=" + "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==" }, "babel-helpers": { "version": "6.24.1", @@ -3848,7 +3730,8 @@ "balanced-match": { "version": "1.0.0", "resolved": "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base": { "version": "0.11.2", @@ -4035,6 +3918,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4345,11 +4229,6 @@ "upper-case": "^1.1.1" } }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" - }, "caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -4389,19 +4268,11 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -4772,16 +4643,6 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, - "clipboard": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, "clipboardy": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.0.0.tgz", @@ -4792,16 +4653,6 @@ "execa": "^1.0.0" } }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, "clone": { "version": "1.0.4", "resolved": "http://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz", @@ -4896,6 +4747,11 @@ "color-name": "1.1.3" } }, + "color-fns": { + "version": "0.0.10", + "resolved": "https://registry.npm.taobao.org/color-fns/download/color-fns-0.0.10.tgz", + "integrity": "sha1-sD80qzuzkCrCTnyG/zLYRfu6978=" + }, "color-name": { "version": "1.1.3", "resolved": "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", @@ -4936,7 +4792,7 @@ "component-classes": { "version": "1.2.6", "resolved": "https://registry.npm.taobao.org/component-classes/download/component-classes-1.2.6.tgz", - "integrity": "sha1-xkI5TDYYpNiwuJGe/Mu9kw5c1pE=", + "integrity": "sha512-hPFGULxdwugu1QWW3SvVOCUHLzO34+a2J6Wqy0c5ASQkfi9/8nZcBB0ZohaEbXOQlCflMAEMmEWk7u7BVs4koA==", "requires": { "component-indexof": "0.0.3" } @@ -4950,7 +4806,7 @@ "component-indexof": { "version": "0.0.3", "resolved": "https://registry.npm.taobao.org/component-indexof/download/component-indexof-0.0.3.tgz", - "integrity": "sha1-EdCRMSI5648yyPJa6csAL/6NPCQ=" + "integrity": "sha512-puDQKvx/64HZXb4hBwIcvQLaLgux8o1CbWl39s41hrIIZDl1lJiD5jc22gj3RBeGK0ovxALDYpIbyjqDUUl0rw==" }, "compressible": { "version": "2.0.17", @@ -4996,7 +4852,8 @@ "concat-map": { "version": "0.0.1", "resolved": "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.2", @@ -5093,11 +4950,6 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, - "contour_plot": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/contour_plot/-/contour_plot-0.0.1.tgz", - "integrity": "sha1-R1hw8DK44zhBKqX8UHiA8L9JXHc=" - }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", @@ -5736,57 +5588,6 @@ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true }, - "d3-color": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.3.tgz", - "integrity": "sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw==" - }, - "d3-dispatch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.5.tgz", - "integrity": "sha512-vwKx+lAqB1UuCeklr6Jh1bvC4SZgbSqbkGBLClItFBIYH4vqDJCA7qfoy14lXmJdnBOdxndAMxjCbImJYW7e6g==" - }, - "d3-ease": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.5.tgz", - "integrity": "sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ==" - }, - "d3-format": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.3.2.tgz", - "integrity": "sha512-Z18Dprj96ExragQ0DeGi+SYPQ7pPfRMtUXtsg/ChVIKNBCzjO8XYJvRTC1usblx52lqge56V5ect+frYTQc8WQ==" - }, - "d3-interpolate": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.1.6.tgz", - "integrity": "sha512-mOnv5a+pZzkNIHtw/V6I+w9Lqm9L5bG3OTXPM5A+QO0yyVMQ4W1uZhR+VOJmazaOZXri2ppbiZ5BUNWT0pFM9A==", - "requires": { - "d3-color": "1" - } - }, - "d3-selection": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.4.0.tgz", - "integrity": "sha512-EYVwBxQGEjLCKF2pJ4+yrErskDnz5v403qvAid96cNdCMr8rmCYfY5RGzWz24mdIbxmDf6/4EAH+K9xperD5jg==" - }, - "d3-timer": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.9.tgz", - "integrity": "sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg==" - }, - "d3-transition": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.2.0.tgz", - "integrity": "sha512-VJ7cmX/FPIPJYuaL2r1o1EMHLttvoIuZhhuAlRoOxDzogV8iQS6jYulDm3xEU3TqL80IZIhI551/ebmCMrkvhw==", - "requires": { - "d3-color": "1", - "d3-dispatch": "1", - "d3-ease": "1", - "d3-interpolate": "1", - "d3-selection": "^1.1.0", - "d3-timer": "1" - } - }, "dashdash": { "version": "1.14.1", "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz", @@ -5843,7 +5644,8 @@ "decamelize": { "version": "1.2.0", "resolved": "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true }, "decode-uri-component": { "version": "0.2.0", @@ -5854,7 +5656,8 @@ "deep-equal": { "version": "1.0.1", "resolved": "http://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true }, "deep-is": { "version": "0.1.3", @@ -5951,11 +5754,6 @@ } } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, "del": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", @@ -6000,11 +5798,6 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "delegate": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", - "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" - }, "depd": { "version": "1.1.2", "resolved": "http://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", @@ -6112,12 +5905,12 @@ "dom-align": { "version": "1.10.2", "resolved": "https://registry.npm.taobao.org/dom-align/download/dom-align-1.10.2.tgz", - "integrity": "sha1-VA6hyeIEYr0RufwoxWHcg1Hs5MY=" + "integrity": "sha512-AYZUzLepy05E9bCY4ExoqHrrIlM49PEak9oF93JEFoibqKL0F7w5DLM70/rosLOawerWZ3MlepQcl+EmHskOyw==" }, "dom-closest": { "version": "0.2.0", "resolved": "https://registry.npm.taobao.org/dom-closest/download/dom-closest-0.2.0.tgz", - "integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=", + "integrity": "sha512-6neTn1BtJlTSt+XSISXpnOsF1uni1CHsP/tmzZMGWxasYFHsBOqrHPnzmneqEgKhpagnfnfSfbvRRW0xFsBHAA==", "requires": { "dom-matches": ">=1.0.1" } @@ -6140,12 +5933,12 @@ "dom-matches": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/dom-matches/download/dom-matches-2.0.0.tgz", - "integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw=" + "integrity": "sha512-2VI856xEDCLXi19W+4BechR5/oIS6bKCKqcf16GR8Pg7dGLJ/eBOWVbCmQx2ISvYH6wTNx5Ef7JTOw1dRGRx6A==" }, "dom-scroll-into-view": { "version": "1.2.1", "resolved": "https://registry.npm.taobao.org/dom-scroll-into-view/download/dom-scroll-into-view-1.2.1.tgz", - "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4=" + "integrity": "sha512-LwNVg3GJOprWDO+QhLL1Z9MMgWe/KAFLxVWKzjRTxNSPn8/LLDIfmuG71YHznXCqaqTjvHJDYO1MEAgX6XCNbQ==" }, "dom-serializer": { "version": "0.1.1", @@ -6438,7 +6231,8 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "escodegen": { "version": "1.11.1", @@ -7001,7 +6795,7 @@ "eslint-plugin-vue": { "version": "5.2.3", "resolved": "https://registry.npm.taobao.org/eslint-plugin-vue/download/eslint-plugin-vue-5.2.3.tgz", - "integrity": "sha1-PudZfYI7VHiASy/rqYY7G3QnOWE=", + "integrity": "sha512-mGwMqbbJf0+VvpGR5Lllq0PMxvTdrZ/ZPjmhkacrCHbubJeJOt+T6E3HUzAifa2Mxi7RSdJfC9HFpOeSYVMMIw==", "dev": true, "requires": { "vue-eslint-parser": "^5.0.0" @@ -7010,20 +6804,17 @@ "acorn": { "version": "6.3.0", "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-6.3.0.tgz", - "integrity": "sha1-AIdQkRn/pPwKAEHR6TpBfmjLhW4=", - "dev": true + "integrity": "sha1-AIdQkRn/pPwKAEHR6TpBfmjLhW4=" }, "acorn-jsx": { "version": "5.0.1", "resolved": "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.0.1.tgz", - "integrity": "sha1-MqBk/ZJUKSFqCbFBECv90YX65A4=", - "dev": true + "integrity": "sha1-MqBk/ZJUKSFqCbFBECv90YX65A4=" }, "debug": { "version": "4.1.1", "resolved": "http://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz", "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -7032,7 +6823,6 @@ "version": "4.1.0", "resolved": "https://registry.npm.taobao.org/espree/download/espree-4.1.0.tgz", "integrity": "sha1-co1UUeD9FWwEOEp62J7VH/VOsl8=", - "dev": true, "requires": { "acorn": "^6.0.2", "acorn-jsx": "^5.0.0", @@ -7042,13 +6832,12 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" }, "vue-eslint-parser": { "version": "5.0.0", "resolved": "https://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-5.0.0.tgz", - "integrity": "sha1-APTk2pTsl0uCGib/DtD3p4QCuKE=", + "integrity": "sha512-JlHVZwBBTNVvzmifwjpZYn0oPWH2SgWv5dojlZBsrhablDu95VFD+hriB1rQGwbD+bms6g+rAFhQHk6+NyiS6g==", "dev": true, "requires": { "debug": "^4.1.0", @@ -7057,6 +6846,92 @@ "espree": "^4.1.0", "esquery": "^1.0.1", "lodash": "^4.17.11" + }, + "dependencies": { + "acorn": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-6.3.0.tgz?cache=0&sync_timestamp=1565683293556&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-6.3.0.tgz", + "integrity": "sha1-AIdQkRn/pPwKAEHR6TpBfmjLhW4=", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.2", + "resolved": "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.0.2.tgz", + "integrity": "sha1-hLaOpEs3PE+GhgI6VR9hoht8Sk8=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz", + "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-scope%2Fdownload%2Feslint-scope-4.0.3.tgz", + "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.1.0.tgz", + "integrity": "sha1-4qgs6oT/JGrW+1f5veW0ZiFFnsI=", + "dev": true + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/espree/download/espree-4.1.0.tgz?cache=0&sync_timestamp=1566612152812&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fespree%2Fdownload%2Fespree-4.1.0.tgz", + "integrity": "sha1-co1UUeD9FWwEOEp62J7VH/VOsl8=", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/esquery/download/esquery-1.0.1.tgz", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz", + "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", + "dev": true + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz?cache=0&sync_timestamp=1563508077056&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.15.tgz", + "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "dev": true + } } } } @@ -7080,8 +6955,7 @@ "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" }, "espree": { "version": "3.5.4", @@ -7550,11 +7424,6 @@ "bser": "^2.0.0" } }, - "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", - "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" - }, "figgy-pudding": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", @@ -7742,18 +7611,6 @@ "readable-stream": "^2.3.6" } }, - "fmin": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/fmin/-/fmin-0.0.2.tgz", - "integrity": "sha1-Wbu0DUP/3ByUzQClaMQflfGXMBc=", - "requires": { - "contour_plot": "^0.0.1", - "json2module": "^0.0.3", - "rollup": "^0.25.8", - "tape": "^4.5.1", - "uglify-js": "^2.6.2" - } - }, "follow-redirects": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", @@ -7859,7 +7716,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "1.2.9", @@ -8460,6 +8318,7 @@ "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8578,14 +8437,6 @@ } } }, - "good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", - "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", - "requires": { - "delegate": "^3.1.2" - } - }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", @@ -8611,7 +8462,7 @@ "halo-editor": { "version": "2.7.6", "resolved": "https://registry.npm.taobao.org/halo-editor/download/halo-editor-2.7.6.tgz", - "integrity": "sha1-Rus1ba0bkgrjDboxgbzVmryu8dc=", + "integrity": "sha512-ipzW+pxWoC3JB5jAlC/7fFZnqBbXMtC6eOXZDM1dtuM4BN60kOH/tzJMlLCuEYCzWnhg+abtwtljAtOe66ASGg==", "requires": { "highlight.js": "^9.11.0", "highlight.js-async-webpack": "^1.0.4" @@ -8682,6 +8533,7 @@ "version": "2.0.0", "resolved": "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -8781,7 +8633,7 @@ "highlight.js-async-webpack": { "version": "1.0.4", "resolved": "https://registry.npm.taobao.org/highlight.js-async-webpack/download/highlight.js-async-webpack-1.0.4.tgz", - "integrity": "sha1-wGtnv5nwSQRdYrdW5YVbCRLsYWw=" + "integrity": "sha512-IC0AwUgNr7BU8pqheaCEvOQvOtIZwO3I4rtbmT489Ndz8loE31IRmBmT6C4qDCbfZjzNO+k2w3VceZjTQ3JQ8Q==" }, "hmac-drbg": { "version": "1.0.1", @@ -9140,7 +8992,7 @@ "image-size": { "version": "0.5.5", "resolved": "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", "dev": true, "optional": true }, @@ -9245,6 +9097,7 @@ "version": "1.0.6", "resolved": "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -9253,7 +9106,8 @@ "inherits": { "version": "2.0.3", "resolved": "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true }, "ini": { "version": "1.3.5", @@ -9348,7 +9202,7 @@ "intersperse": { "version": "1.0.0", "resolved": "https://registry.npm.taobao.org/intersperse/download/intersperse-1.0.0.tgz", - "integrity": "sha1-8lYfsc/vn1J3zDNHoiiGtDUaUYE=" + "integrity": "sha512-LGcfug7OTeWkaQ8PEq8XbTy9Jl6uCNg8DrPnQUmwxSY8UETj1Y+LLmpdD0qHdEj6KVchuH3BE3ZzIXQ1t3oFUw==" }, "invariant": { "version": "2.2.4", @@ -9550,7 +9404,7 @@ "is-negative-zero": { "version": "2.0.0", "resolved": "https://registry.npm.taobao.org/is-negative-zero/download/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" + "integrity": "sha512-Ue/ky+mZLjMl2g4Dl/168JjlCWJtszY/7m0NL1UHrRfMPDx6Dlo8uJ0TfYVWvVv+r9WbmWAEJZTa4mj+jS2Kew==" }, "is-number": { "version": "3.0.0", @@ -9706,7 +9560,7 @@ "ismobilejs": { "version": "0.5.2", "resolved": "https://registry.npm.taobao.org/ismobilejs/download/ismobilejs-0.5.2.tgz", - "integrity": "sha1-6Bus9hh8UyrYNINV9P7Nbmrf3OE=" + "integrity": "sha512-ta9UdV60xVZk/ZafFtSFslQaE76SvNkcs1r73d2PVR21zVzx9xuYv9tNe4MxA1NN7WoeCc2RjGot3Bz1eHDx3Q==" }, "isobject": { "version": "3.0.1", @@ -11527,18 +11381,10 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "json2module": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/json2module/-/json2module-0.0.3.tgz", - "integrity": "sha1-APtfSpt638PwZHwpyxe80Zeb6bI=", - "requires": { - "rw": "^1.3.2" - } - }, "json2mq": { "version": "0.2.0", "resolved": "https://registry.npm.taobao.org/json2mq/download/json2mq-0.2.0.tgz", - "integrity": "sha1-tje9O6nqvhIsg+lyBIOusQ0skEo=", + "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", "requires": { "string-convert": "^0.2.0" } @@ -11595,6 +11441,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" }, @@ -11602,7 +11449,8 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true } } }, @@ -11662,11 +11510,6 @@ "launch-editor": "^2.2.1" } }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" - }, "lcid": { "version": "1.0.0", "resolved": "http://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz", @@ -11904,7 +11747,7 @@ "lodash.toarray": { "version": "4.4.0", "resolved": "https://registry.npm.taobao.org/lodash.toarray/download/lodash.toarray-4.4.0.tgz", - "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=" + "integrity": "sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw==" }, "lodash.transform": { "version": "4.6.0", @@ -11964,11 +11807,6 @@ "integrity": "sha512-Jt2MHrCNdtIe1W6co3tF5KXGRkzF+TYffiQstfXa04mrss9IKXzAAXYWak8LbZseAQY03sH2GzMCMU0ZOUc9bg==", "dev": true }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -12269,6 +12107,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -12276,7 +12115,8 @@ "minimist": { "version": "1.2.0", "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true }, "mississippi": { "version": "3.0.0", @@ -12377,7 +12217,7 @@ "mutationobserver-shim": { "version": "0.3.3", "resolved": "https://registry.npm.taobao.org/mutationobserver-shim/download/mutationobserver-shim-0.3.3.tgz", - "integrity": "sha1-ZYaWMLyJ17+MnNnLghiM2VWqzSs=" + "integrity": "sha512-gciOLNN8Vsf7YzcqRjKzlAJ6y7e+B86u7i3KXes0xfxx/nfLmozlW1Vn+Sc9x3tPIePFgc1AeIFhtRgkqTjzDQ==" }, "mute-stream": { "version": "0.0.7", @@ -12559,7 +12399,7 @@ "node-modules-regexp": { "version": "1.0.0", "resolved": "https://registry.npm.taobao.org/node-modules-regexp/download/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "integrity": "sha512-JMaRS9L4wSRIR+6PTVEikTrq/lMGEZR43a48ETeilY0Q0iMwVnccMFrUM1k+tNzmYuIU0Vh710bCUqHX+/+ctQ==", "dev": true }, "node-notifier": { @@ -12704,11 +12544,6 @@ "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", "dev": true }, - "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" - }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -12785,7 +12620,7 @@ "omit.js": { "version": "1.0.2", "resolved": "https://registry.npm.taobao.org/omit.js/download/omit.js-1.0.2.tgz", - "integrity": "sha1-kaFPDrqEBm36AVvzDkdMR/MLyFg=", + "integrity": "sha512-/QPc6G2NS+8d4L/cQhbk6Yit1WTB6Us2g84A7A/1+w9d/eRGHyEqC5kkQtHVoHZ5NFWGG7tUGgrhVZwgZanKrQ==", "requires": { "babel-runtime": "^6.23.0" } @@ -12809,6 +12644,7 @@ "version": "1.4.0", "resolved": "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -13235,7 +13071,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-is-inside": { "version": "1.0.2", @@ -13252,7 +13089,8 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true }, "path-to-regexp": { "version": "0.1.7", @@ -13319,7 +13157,7 @@ "pirates": { "version": "4.0.1", "resolved": "https://registry.npm.taobao.org/pirates/download/pirates-4.0.1.tgz", - "integrity": "sha1-ZDqSyviUVm+RsrmG0sZpUKji+4c=", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", "dev": true, "requires": { "node-modules-regexp": "^1.0.0" @@ -14244,7 +14082,7 @@ "promise": { "version": "7.3.1", "resolved": "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz", - "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "dev": true, "optional": true, "requires": { @@ -14398,7 +14236,7 @@ "raf": { "version": "3.4.1", "resolved": "https://registry.npm.taobao.org/raf/download/raf-3.4.1.tgz", - "integrity": "sha1-B0LpmkplUvRF1z4+4DKK8P8e3jk=", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", "requires": { "performance-now": "^2.1.0" } @@ -14717,7 +14555,8 @@ "repeat-string": { "version": "1.6.1", "resolved": "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true }, "repeating": { "version": "2.0.1", @@ -14820,12 +14659,13 @@ "resize-observer-polyfill": { "version": "1.5.1", "resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=" + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" }, "resolve": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", + "dev": true, "requires": { "path-parse": "^1.0.6" } @@ -14870,14 +14710,6 @@ "signal-exit": "^3.0.2" } }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "requires": { - "through": "~2.3.4" - } - }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -14896,14 +14728,6 @@ "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -14923,16 +14747,6 @@ "inherits": "^2.0.1" } }, - "rollup": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.25.8.tgz", - "integrity": "sha1-v2zoO4dRDRY0Ru6qV37WpvxYNeA=", - "requires": { - "chalk": "^1.1.1", - "minimist": "^1.2.0", - "source-map-support": "^0.3.2" - } - }, "rsvp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", @@ -14965,11 +14779,6 @@ "individual": "^2.0.0" } }, - "rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" - }, "rx-lite": { "version": "4.0.8", "resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz", @@ -15058,11 +14867,6 @@ "ajv-keywords": "^3.1.0" } }, - "select": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", - "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" - }, "select-hose": { "version": "2.0.0", "resolved": "http://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", @@ -15252,12 +15056,12 @@ "shallow-equal": { "version": "1.2.0", "resolved": "https://registry.npm.taobao.org/shallow-equal/download/shallow-equal-1.2.0.tgz", - "integrity": "sha1-/YKNICn/ThlWnbfhnlNelOLR9cw=" + "integrity": "sha512-Z21pVxR4cXsfwpMKMhCEIO1PCi5sp7KEp+CmOpBQ+E8GpHwKOw2sEzk7sgblM3d/j4z4gakoWEoPcjK0VJQogA==" }, "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npm.taobao.org/shallowequal/download/shallowequal-1.1.0.tgz", - "integrity": "sha1-GI1SHelbkIdAT9TctosT3wrk5/g=" + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, "shebang-command": { "version": "1.2.0", @@ -15525,14 +15329,6 @@ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, - "source-map": { - "version": "0.1.32", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", - "integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY=", - "requires": { - "amdefine": ">=0.0.4" - } - }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", @@ -15546,14 +15342,6 @@ "urix": "^0.1.0" } }, - "source-map-support": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.3.3.tgz", - "integrity": "sha1-NJAJd9W6PwfHdX7nLnO7GptTdU8=", - "requires": { - "source-map": "0.1.32" - } - }, "source-map-url": { "version": "0.4.0", "resolved": "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", @@ -15804,7 +15592,7 @@ "string-convert": { "version": "0.2.1", "resolved": "https://registry.npm.taobao.org/string-convert/download/string-convert-0.2.1.tgz", - "integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c=" + "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" }, "string-length": { "version": "2.0.0", @@ -15905,6 +15693,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -15963,7 +15752,8 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true }, "svg-tags": { "version": "1.0.0", @@ -16119,26 +15909,6 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", "dev": true }, - "tape": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.10.2.tgz", - "integrity": "sha512-mgl23h7W2yuk3N85FOYrin2OvThTYWdwbk6XQ1pr2PMJieyW2FM/4Bu/+kD/wecb3aZ0Enm+Syinyq467OPq2w==", - "requires": { - "deep-equal": "~1.0.1", - "defined": "~1.0.0", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.4", - "has": "~1.0.3", - "inherits": "~2.0.3", - "minimist": "~1.2.0", - "object-inspect": "~1.6.0", - "resolve": "~1.10.1", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.1.2", - "through": "~2.3.8" - } - }, "terser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/terser/-/terser-4.0.0.tgz", @@ -16353,7 +16123,8 @@ "through": { "version": "2.3.8", "resolved": "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, "through2": { "version": "2.0.5", @@ -16386,15 +16157,10 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, - "tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" - }, "tinycolor2": { "version": "1.4.1", "resolved": "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.1.tgz", - "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" + "integrity": "sha512-5gQXogvRKAhJChgQPSAXaXbrQVq+w2Ckl/5jeno5N9eMcYbz0docSS3n0YNywAyDQBsUFokmHzNM8yvX2+eLVg==" }, "tmp": { "version": "0.0.33", @@ -16588,29 +16354,6 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -16917,16 +16660,6 @@ "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==", "dev": true }, - "venn.js": { - "version": "0.2.20", - "resolved": "https://registry.npmjs.org/venn.js/-/venn.js-0.2.20.tgz", - "integrity": "sha512-bb5SYq/wamY9fvcuErb9a0FJkgIFHJjkLZWonQ+DoKKuDX3WPH2B4ouI1ce4K2iejBklQy6r1ly8nOGIyOCO6w==", - "requires": { - "d3-selection": "^1.0.2", - "d3-transition": "^1.0.1", - "fmin": "0.0.2" - } - }, "verror": { "version": "1.10.0", "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz", @@ -16938,6 +16671,14 @@ "extsprintf": "^1.2.0" } }, + "verte": { + "version": "0.0.12", + "resolved": "https://registry.npm.taobao.org/verte/download/verte-0.0.12.tgz", + "integrity": "sha1-+Rs/gs8tbqgawsytZrua7+eZdQM=", + "requires": { + "color-fns": "^0.0.10" + } + }, "video.js": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/video.js/-/video.js-6.13.0.tgz", @@ -17020,38 +16761,6 @@ "global": "^4.3.1" } }, - "viser": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/viser/-/viser-2.4.6.tgz", - "integrity": "sha512-iIodwrdhDedqKb4cT6gp35wUCysfdNnzEZlFg1u7xa6wfuEcQuWKQYTiiqGhUkJwWv2isSQvCJDAbDjFsgohsw==", - "requires": { - "@antv/g2": "3.5.3", - "@antv/g2-brush": "^0.0.2", - "@antv/g2-plugin-slider": "^2.1.0", - "@types/d3-format": "*", - "@types/lodash": "*", - "@types/node": "^8.0.53", - "d3-format": "^1.3.0", - "lodash": "^4.17.4" - }, - "dependencies": { - "@types/node": { - "version": "8.10.49", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.49.tgz", - "integrity": "sha512-YX30JVx0PvSmJ3Eqr74fYLGeBxD+C7vIL20ek+GGGLJeUbVYRUW3EzyAXpIRA0K8c8o0UWqR/GwEFYiFoz1T8w==" - } - } - }, - "viser-vue": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/viser-vue/-/viser-vue-2.4.6.tgz", - "integrity": "sha512-M6MtTx6NM3ao7nt0YUIkg9HPBn0T3+OTv4PZZDFmz4gvCCP5jwYsqdyeEEJQ+QEF58CL66f5/VFbWLNawqE5Hw==", - "requires": { - "@types/node": "*", - "viser": "^2.0.0", - "vue": "^2.5.3" - } - }, "vm-browserify": { "version": "0.0.4", "resolved": "http://registry.npm.taobao.org/vm-browserify/download/vm-browserify-0.0.4.tgz", @@ -17066,14 +16775,6 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz", "integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==" }, - "vue-clipboard2": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.0.tgz", - "integrity": "sha512-6/Y9NJErWb4LNBLMgsJSdKb7KpF6/jqXagvKlYut6VQzQsNj6515FpwH0r5hhmeJMqaPzf1kxAw8L8Qvw/QBJQ==", - "requires": { - "clipboard": "^2.0.0" - } - }, "vue-codemirror-lite": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/vue-codemirror-lite/-/vue-codemirror-lite-1.0.4.tgz", @@ -17087,11 +16788,6 @@ "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz", "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ==" }, - "vue-cropper": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.4.9.tgz", - "integrity": "sha512-Uf1i/sCh+ZqSM9hb2YTGRENzJFH+mvDuv8N2brGLjK7UBuF7XDP7zbis8g/dcqZiMojAcBDtObFCn4ERFbRMxQ==" - }, "vue-eslint-parser": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz", @@ -17202,12 +16898,12 @@ "vue-ref": { "version": "1.0.6", "resolved": "https://registry.npm.taobao.org/vue-ref/download/vue-ref-1.0.6.tgz", - "integrity": "sha1-ubPX0OKQ7i/T1Q1de9rFIIBssmU=" + "integrity": "sha512-UzD8t1CG+aoWVOOpGd5KcaCNtCgUc0byaKhJMH+6N7H/p1ThVkYl/VCt7DmCrdhUlzZK+hT5JPTKAdrbWi0nNw==" }, "vue-router": { "version": "3.1.2", "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.1.2.tgz", - "integrity": "sha1-LgkEcDVF2r3UKyt6LmF/AvmaGWk=" + "integrity": "sha512-WssQEHSEvIS1/CI4CO2T8LJdoK4Q9Ngox28K7FDNMTfzNTk2WS5D0dDlqYCaPG+AG4Z8wJkn1KrBc7AhspZJUQ==" }, "vue-style-loader": { "version": "4.1.2", @@ -17330,7 +17026,7 @@ "warning": { "version": "3.0.0", "resolved": "https://registry.npm.taobao.org/warning/download/warning-3.0.0.tgz", - "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "integrity": "sha512-jMBt6pUrKn5I+OGgtQ4YZLdhIeJmObddh6CsibPxyQ5yPZm1XExSyzC1LCNX7BzhxWgiHmizBWJTHJIjMjTQYQ==", "requires": { "loose-envify": "^1.0.0" } @@ -17841,20 +17537,11 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" - }, - "wolfy87-eventemitter": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.1.0.tgz", - "integrity": "sha1-NcGsDdGsDBXjXZgVCPwiCEoToBE=" - }, "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true }, "worker-farm": { "version": "1.7.0", @@ -17900,7 +17587,8 @@ "wrappy": { "version": "1.0.2", "resolved": "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write": { "version": "0.2.1", @@ -17966,17 +17654,6 @@ "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, "yargs-parser": { "version": "9.0.2", "resolved": "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-9.0.2.tgz", diff --git a/package.json b/package.json index 01e2b3a22..4ac85cf5a 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,9 @@ "moment": "^2.24.0", "nprogress": "^0.2.0", "verte": "^0.0.12", - "viser-vue": "^2.4.6", "vue": "^2.6.10", - "vue-clipboard2": "^0.3.0", "vue-codemirror-lite": "^1.0.4", "vue-count-to": "^1.0.13", - "vue-cropper": "0.4.9", "vue-ls": "^3.2.1", "vue-router": "^3.1.2", "vue-video-player": "^5.0.2", diff --git a/src/App.vue b/src/App.vue index 5e0bdd2e8..0e8e318fb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,21 +1,13 @@ diff --git a/src/views/Home.vue b/src/views/Home.vue deleted file mode 100644 index 92cde6943..000000000 --- a/src/views/Home.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/src/views/attachment/components/AttachmentDrawer.vue b/src/views/attachment/components/AttachmentDrawer.vue index 1b676b0b2..6e2c9236c 100644 --- a/src/views/attachment/components/AttachmentDrawer.vue +++ b/src/views/attachment/components/AttachmentDrawer.vue @@ -197,20 +197,4 @@ export default { diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index 7bdff399f..03b81e688 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -185,20 +185,4 @@ export default { diff --git a/src/views/interface/ThemeEdit.vue b/src/views/interface/ThemeEdit.vue index 699eba14e..682caf7bb 100644 --- a/src/views/interface/ThemeEdit.vue +++ b/src/views/interface/ThemeEdit.vue @@ -35,7 +35,20 @@ :xs="24" :style="{'padding-bottom':'12px'}" > - + + { + this.selectedTheme = response.data.data + }) + }, loadFiles() { - themeApi.listFiles().then(response => { + themeApi.listFilesActivated().then(response => { this.files = response.data.data }) }, - loadActivatedTheme() { - themeApi.getActivatedTheme().then(response => { - this.activatedTheme = response.data.data + loadThemes() { + themeApi.listAll().then(response => { + this.themes = response.data.data + }) + }, + onSelectTheme(themeId) { + themeApi.listFiles(themeId).then(response => { + this.files = response.data.data }) }, handleSelectFile(file) { @@ -95,7 +120,12 @@ export default { this.buttonDisabled = true return } - if (file.name === 'settings.yaml' || file.name === 'settings.yml' || file.name === 'theme.yaml' || file.name === 'theme.yml') { + if ( + file.name === 'settings.yaml' || + file.name === 'settings.yml' || + file.name === 'theme.yaml' || + file.name === 'theme.yml' + ) { this.$confirm({ title: '警告:请谨慎修改该配置文件', content: '修改之后可能会产生不可预料的问题!', diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index 9ed8f1b39..70afe74d4 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -387,7 +387,7 @@ export default { } - From e5297c2e7a69a4ff18b1c01a6c149d9d0c256cf0 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 30 Aug 2019 20:58:22 +0800 Subject: [PATCH 32/59] Support stick post. --- package.json | 1 + src/App.vue | 15 ++++++++++++--- src/core/lazy_use.js | 3 +++ src/core/use.js | 3 +++ src/views/post/PostEdit.vue | 2 +- src/views/post/PostList.vue | 10 +--------- src/views/post/components/PostSetting.vue | 9 +++++++++ src/views/sheet/SheetEdit.vue | 2 +- 8 files changed, 31 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 4ac85cf5a..1c2b4a0be 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "nprogress": "^0.2.0", "verte": "^0.0.12", "vue": "^2.6.10", + "vue-clipboard2": "^0.3.0", "vue-codemirror-lite": "^1.0.4", "vue-count-to": "^1.0.13", "vue-ls": "^3.2.1", diff --git a/src/App.vue b/src/App.vue index 0e8e318fb..fb2a152d5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,21 @@ - diff --git a/src/views/interface/components/ThemeSetting.vue b/src/views/interface/components/ThemeSetting.vue index aaede9a87..e692425d7 100644 --- a/src/views/interface/components/ThemeSetting.vue +++ b/src/views/interface/components/ThemeSetting.vue @@ -167,6 +167,7 @@ :sm="24" :xs="24" v-if="viewMode" + style="padding-bottom: 50px;" > @@ -196,14 +198,14 @@ :style="{ width : '100%'}" > 普通模式 { + this.options = response.data.data + }) + }, initData() { this.settingLoading = true @@ -318,7 +326,8 @@ export default { this.attachmentDrawerVisible = false }, toggleViewMode() { - if (!this.viewMode) { + this.viewMode = !this.viewMode + if (this.viewMode) { this.formColValue = 4 this.wrapperCol = { xl: { span: 24 }, @@ -335,12 +344,6 @@ export default { xs: { span: 24 } } } - this.viewMode = !this.viewMode - }, - loadOptions() { - optionApi.listAll(this.keys).then(response => { - this.options = response.data.data - }) } } } diff --git a/src/views/post/components/CategoryTree.vue b/src/views/post/components/CategoryTree.vue index 369436c6a..b2a6b1070 100644 --- a/src/views/post/components/CategoryTree.vue +++ b/src/views/post/components/CategoryTree.vue @@ -6,10 +6,6 @@ :checkedKeys="categoryIds" @check="onCheck" > - sss From e7f33fec8123ee4b55e9f89ec291adfc0532dfd4 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 1 Sep 2019 21:36:59 +0800 Subject: [PATCH 36/59] release 1.1.0-beta.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e44672f05..31dffda6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "halo-admin", - "version": "1.1.0-beta.1", + "version": "1.1.0-beta.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1c2b4a0be..f4d2cb620 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "halo-admin", - "version": "1.1.0-beta.1", + "version": "1.1.0-beta.2", "private": true, "scripts": { "serve": "vue-cli-service serve", From 22dea6471c8f2b51682029216368cabe60806754 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 3 Sep 2019 10:41:46 +0800 Subject: [PATCH 37/59] Fixed #10 --- src/views/post/components/PostSetting.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 0d10c874c..d1a3f6d2e 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -221,11 +221,6 @@ export default { categoryToCreate: {} } }, - // TODO delete this commented code - // model: { - // prop: 'visible', - // event: 'close' - // }, props: { post: { type: Object, @@ -386,6 +381,7 @@ export default { this.$log.debug('Updated post', response.data.data) if (updateSuccess) { updateSuccess() + this.$router.push({ name: 'PostList' }) } }) } else { @@ -394,6 +390,7 @@ export default { this.$log.debug('Created post', response.data.data) if (createSuccess) { createSuccess() + this.$router.push({ name: 'PostList' }) } this.selectedPost = response.data.data }) From 632784d783be75e585629a7b25d4d8e25361730a Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 3 Sep 2019 16:58:30 +0800 Subject: [PATCH 38/59] Cache options by vuex. --- src/components/Tools/UserMenu.vue | 15 ++------ src/core/bootstrap.js | 5 +-- src/store/getters.js | 3 +- src/store/index.js | 4 ++- src/store/modules/option.js | 36 +++++++++++++++++++ src/store/modules/user.js | 28 +++++++++++---- src/store/mutation-types.js | 1 + .../comment/components/CommentDetail.vue | 11 +++--- src/views/comment/components/CommentTab.vue | 13 ++----- src/views/dashboard/Dashboard.vue | 21 +++-------- .../dashboard/components/RecentCommentTab.vue | 15 +++----- .../interface/components/ThemeSetting.vue | 13 +++---- src/views/post/PostList.vue | 20 +++++------ src/views/post/components/PostSetting.vue | 13 ++----- src/views/sheet/SheetList.vue | 15 +++----- src/views/sheet/components/SheetSetting.vue | 13 ++----- src/views/system/OptionForm.vue | 9 ++--- src/views/user/Login.vue | 3 +- src/views/user/Profile.vue | 21 +++++------ 19 files changed, 122 insertions(+), 137 deletions(-) create mode 100644 src/store/modules/option.js diff --git a/src/components/Tools/UserMenu.vue b/src/components/Tools/UserMenu.vue index d197efdf3..4282eee29 100644 --- a/src/components/Tools/UserMenu.vue +++ b/src/components/Tools/UserMenu.vue @@ -63,7 +63,6 @@ import HeaderComment from './HeaderComment' import SettingDrawer from '@/components/SettingDrawer/SettingDrawer' import { mapActions, mapGetters } from 'vuex' -import optionApi from '@/api/option' export default { name: 'UserMenu', @@ -73,19 +72,14 @@ export default { }, data() { return { - optionVisible: true, - options: [], - keys: ['blog_url'] + optionVisible: true } }, mounted() { this.optionVisible = this.$refs.drawer.visible }, - created() { - this.loadOptions() - }, computed: { - ...mapGetters(['user']) + ...mapGetters(['user', 'options']) }, methods: { ...mapActions(['logout']), @@ -114,11 +108,6 @@ export default { showOptionModal() { this.optionVisible = this.$refs.drawer.visible this.$refs.drawer.toggle() - }, - loadOptions() { - optionApi.listAll(this.keys).then(response => { - this.options = response.data.data - }) } } } diff --git a/src/core/bootstrap.js b/src/core/bootstrap.js index 8922e305c..ced011947 100644 --- a/src/core/bootstrap.js +++ b/src/core/bootstrap.js @@ -11,7 +11,8 @@ import { DEFAULT_FIXED_SIDEMENU, DEFAULT_CONTENT_WIDTH_TYPE, USER, - API_URL + API_URL, + OPTIONS } from '@/store/mutation-types' import config from '@/config/defaultSettings' @@ -27,6 +28,6 @@ export default function Initializer() { store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN)) store.commit('SET_USER', Vue.ls.get(USER)) store.commit('SET_API_URL', Vue.ls.get(API_URL)) - + store.commit('SET_OPTIONS', Vue.ls.get(OPTIONS)) // last step } diff --git a/src/store/getters.js b/src/store/getters.js index 089b8517b..d9b627dd1 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -12,7 +12,8 @@ const getters = { return state.app.apiUrl } return `${window.location.protocol}//${window.location.host}` - } + }, + options: state => state.option.options } export default getters diff --git a/src/store/index.js b/src/store/index.js index 4e8529a2f..5771af7ee 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,6 +4,7 @@ import Vuex from 'vuex' import app from './modules/app' import user from './modules/user' import permission from './modules/permission' +import option from './modules/option' import getters from './getters' Vue.use(Vuex) @@ -12,7 +13,8 @@ export default new Vuex.Store({ modules: { app, user, - permission + permission, + option }, state: { diff --git a/src/store/modules/option.js b/src/store/modules/option.js new file mode 100644 index 000000000..d27dba80b --- /dev/null +++ b/src/store/modules/option.js @@ -0,0 +1,36 @@ +import Vue from 'vue' +import { + OPTIONS +} from '@/store/mutation-types' +import optionApi from '@/api/option' +const keys = ['blog_url'] +const option = { + state: { + options: [] + }, + mutations: { + SET_OPTIONS: (state, options) => { + Vue.ls.set(OPTIONS, options) + state.options = options + } + }, + actions: { + loadOptions({ + commit + }) { + return new Promise((resolve, reject) => { + optionApi + .listAll(keys) + .then(response => { + commit('SET_OPTIONS', response.data.data) + resolve(response) + }) + .catch(error => { + reject(error) + }) + }) + } + } +} + +export default option diff --git a/src/store/modules/user.js b/src/store/modules/user.js index acdd27fff..3d5bee899 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,5 +1,8 @@ import Vue from 'vue' -import { ACCESS_TOKEN, USER } from '@/store/mutation-types' +import { + ACCESS_TOKEN, + USER +} from '@/store/mutation-types' import adminApi from '@/api/admin' import userApi from '@/api/user' @@ -16,7 +19,9 @@ const user = { Vue.ls.set(ACCESS_TOKEN, token) state.token = token }, - SET_NAME: (state, { name }) => { + SET_NAME: (state, { + name + }) => { state.name = name }, SET_AVATAR: (state, avatar) => { @@ -35,7 +40,9 @@ const user = { } }, actions: { - loadUser({ commit }) { + loadUser({ + commit + }) { return new Promise((resolve, reject) => { userApi .getProfile() @@ -48,7 +55,12 @@ const user = { }) }) }, - login({ commit }, { username, password }) { + login({ + commit + }, { + username, + password + }) { return new Promise((resolve, reject) => { adminApi .login(username, password) @@ -64,7 +76,9 @@ const user = { }) }) }, - logout({ commit }) { + logout({ + commit + }) { return new Promise(resolve => { commit('CLEAR_TOKEN') adminApi @@ -77,7 +91,9 @@ const user = { }) }) }, - refreshToken({ commit }, refreshToken) { + refreshToken({ + commit + }, refreshToken) { return new Promise((resolve, reject) => { adminApi .refreshToken(refreshToken) diff --git a/src/store/mutation-types.js b/src/store/mutation-types.js index 75f5cc7cc..d227fc6ff 100644 --- a/src/store/mutation-types.js +++ b/src/store/mutation-types.js @@ -9,6 +9,7 @@ export const DEFAULT_FIXED_HEADER_HIDDEN = 'DEFAULT_FIXED_HEADER_HIDDEN' export const DEFAULT_CONTENT_WIDTH_TYPE = 'DEFAULT_CONTENT_WIDTH_TYPE' export const USER = 'USER' export const API_URL = 'API_URL' +export const OPTIONS = 'OPTIONS' export const CONTENT_WIDTH_TYPE = { Fluid: 'Fluid', diff --git a/src/views/comment/components/CommentDetail.vue b/src/views/comment/components/CommentDetail.vue index 93c8601b3..aee9abd82 100644 --- a/src/views/comment/components/CommentDetail.vue +++ b/src/views/comment/components/CommentDetail.vue @@ -126,8 +126,8 @@ diff --git a/src/components/global.less b/src/components/global.less index 864bc3cdd..7626740ad 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -729,4 +729,42 @@ body { top: 0; left: 0; } +} + +.analysis-card-container { + position: relative; + overflow: hidden; + width: 100%; + .meta { + position: relative; + overflow: hidden; + width: 100%; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; + .analysis-card-action { + cursor: pointer; + position: absolute; + top: 0; + right: 0; + } + } + .number { + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; + white-space: nowrap; + color: #000; + margin-top: 4px; + margin-bottom: 0; + font-size: 32px; + line-height: 38px; + height: 38px; + } +} + +.ant-tree-child-tree { + li { + overflow: hidden; + } } \ No newline at end of file diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index cec3b8e6c..bfe89f047 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -160,8 +160,8 @@ - - diff --git a/src/views/attachment/components/AttachmentDrawer.vue b/src/views/attachment/components/AttachmentDrawer.vue index 6e2c9236c..5d212f609 100644 --- a/src/views/attachment/components/AttachmentDrawer.vue +++ b/src/views/attachment/components/AttachmentDrawer.vue @@ -88,8 +88,8 @@ - - diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index 03b81e688..d509bb3d7 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -183,6 +183,3 @@ export default { } } - - diff --git a/src/views/comment/CommentList.vue b/src/views/comment/CommentList.vue index 53d611577..4f1aa180f 100644 --- a/src/views/comment/CommentList.vue +++ b/src/views/comment/CommentList.vue @@ -26,10 +26,6 @@ export default { components: { PageView, CommentTab - }, - data() { - return {} - }, - methods: {} + } } diff --git a/src/views/comment/components/CommentDetail.vue b/src/views/comment/components/CommentDetail.vue index aee9abd82..1dd7ffc5f 100644 --- a/src/views/comment/components/CommentDetail.vue +++ b/src/views/comment/components/CommentDetail.vue @@ -202,5 +202,3 @@ export default { } } - diff --git a/src/views/comment/components/CommentTab.vue b/src/views/comment/components/CommentTab.vue index 37b4fd001..ee4456d16 100644 --- a/src/views/comment/components/CommentTab.vue +++ b/src/views/comment/components/CommentTab.vue @@ -263,9 +263,9 @@ - - diff --git a/src/views/exception/404.vue b/src/views/exception/404.vue index 8d8aeb318..b9fb2f334 100644 --- a/src/views/exception/404.vue +++ b/src/views/exception/404.vue @@ -11,6 +11,3 @@ export default { } } - - diff --git a/src/views/exception/500.vue b/src/views/exception/500.vue index 3715314ed..531c94e37 100644 --- a/src/views/exception/500.vue +++ b/src/views/exception/500.vue @@ -11,6 +11,3 @@ export default { } } - - diff --git a/src/views/interface/MenuList.vue b/src/views/interface/MenuList.vue index 672273821..642e2ebdf 100644 --- a/src/views/interface/MenuList.vue +++ b/src/views/interface/MenuList.vue @@ -237,6 +237,3 @@ export default { } } - - diff --git a/src/views/interface/ThemeEdit.vue b/src/views/interface/ThemeEdit.vue index c4a63eade..d316866ac 100644 --- a/src/views/interface/ThemeEdit.vue +++ b/src/views/interface/ThemeEdit.vue @@ -46,7 +46,12 @@ v-for="(theme,index) in themes" :key="index" :value="theme.id" - >{{ theme.name }} + >{{ theme.name }} + + - - diff --git a/src/views/interface/components/ThemeFile.vue b/src/views/interface/components/ThemeFile.vue index 0d6a23693..78f46ffcb 100644 --- a/src/views/interface/components/ThemeFile.vue +++ b/src/views/interface/components/ThemeFile.vue @@ -56,11 +56,3 @@ export default { } } - - diff --git a/src/views/interface/components/ThemeSetting.vue b/src/views/interface/components/ThemeSetting.vue index 7022fda26..fa23f37b1 100644 --- a/src/views/interface/components/ThemeSetting.vue +++ b/src/views/interface/components/ThemeSetting.vue @@ -219,9 +219,9 @@ - diff --git a/src/views/post/CategoryList.vue b/src/views/post/CategoryList.vue index ebcb8d257..18b9b7b2b 100644 --- a/src/views/post/CategoryList.vue +++ b/src/views/post/CategoryList.vue @@ -239,6 +239,3 @@ export default { } } - - diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index 9ae79c687..c01647850 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -108,6 +108,23 @@ export default { } }) }, + destroyed: function() { + if (this.postSettingVisible) { + this.postSettingVisible = false + } + if (this.attachmentDrawerVisible) { + this.attachmentDrawerVisible = false + } + }, + beforeRouteLeave(to, from, next) { + if (this.postSettingVisible) { + this.postSettingVisible = false + } + if (this.attachmentDrawerVisible) { + this.attachmentDrawerVisible = false + } + next() + }, methods: { handleSaveDraft() { this.postToStage.status = 'DRAFT' @@ -177,6 +194,3 @@ export default { } } - - diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index bbe003f1b..0043a9c79 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -408,6 +408,17 @@ export default { this.loadPosts() this.loadCategories() }, + destroyed: function() { + if (this.postSettingVisible) { + this.postSettingVisible = false + } + }, + beforeRouteLeave(to, from, next) { + if (this.postSettingVisible) { + this.postSettingVisible = false + } + next() + }, methods: { loadPosts() { this.postsLoading = true @@ -537,5 +548,3 @@ export default { } } - diff --git a/src/views/post/components/CategorySelectTree.vue b/src/views/post/components/CategorySelectTree.vue index 2b731e7db..f1111a4ac 100644 --- a/src/views/post/components/CategorySelectTree.vue +++ b/src/views/post/components/CategorySelectTree.vue @@ -58,6 +58,3 @@ export default { } } - - diff --git a/src/views/post/components/CategoryTree.vue b/src/views/post/components/CategoryTree.vue index b2a6b1070..4e039df0c 100644 --- a/src/views/post/components/CategoryTree.vue +++ b/src/views/post/components/CategoryTree.vue @@ -52,6 +52,3 @@ export default { } } - - diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index ee1c3901f..6261e121d 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -401,5 +401,3 @@ export default { } } - diff --git a/src/views/post/components/TagSelect.vue b/src/views/post/components/TagSelect.vue index c960710b0..9fd12330d 100644 --- a/src/views/post/components/TagSelect.vue +++ b/src/views/post/components/TagSelect.vue @@ -105,6 +105,3 @@ export default { } } - - diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index 32c629256..3a3cba8de 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -98,6 +98,23 @@ export default { } }) }, + destroyed: function() { + if (this.sheetSettingVisible) { + this.sheetSettingVisible = false + } + if (this.attachmentDrawerVisible) { + this.attachmentDrawerVisible = false + } + }, + beforeRouteLeave(to, from, next) { + if (this.sheetSettingVisible) { + this.sheetSettingVisible = false + } + if (this.attachmentDrawerVisible) { + this.attachmentDrawerVisible = false + } + next() + }, methods: { handleSaveDraft() { this.sheetToStage.status = 'DRAFT' @@ -158,5 +175,3 @@ export default { } } - diff --git a/src/views/sheet/SheetList.vue b/src/views/sheet/SheetList.vue index b65e864c1..cd466520f 100644 --- a/src/views/sheet/SheetList.vue +++ b/src/views/sheet/SheetList.vue @@ -245,8 +245,8 @@ - diff --git a/src/views/sheet/components/SheetSetting.vue b/src/views/sheet/components/SheetSetting.vue index c51aed42a..7d14c0bb6 100644 --- a/src/views/sheet/components/SheetSetting.vue +++ b/src/views/sheet/components/SheetSetting.vue @@ -125,10 +125,6 @@ export default { customTpls: [] } }, - // model: { - // prop: 'visible', - // event: 'close' - // }, props: { sheet: { type: Object, @@ -250,5 +246,3 @@ export default { } } - diff --git a/src/views/sheet/internal/LinkList.vue b/src/views/sheet/internal/LinkList.vue index 48d73b3a5..14a4657ce 100644 --- a/src/views/sheet/internal/LinkList.vue +++ b/src/views/sheet/internal/LinkList.vue @@ -201,6 +201,3 @@ export default { } } - - diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index f50defd9b..de455e3aa 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -272,8 +272,8 @@ - diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 410400a01..b0b49f209 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -749,6 +749,23 @@ export default { mounted() { this.loadFormOptions() }, + destroyed: function() { + if (this.faviconDrawerVisible) { + this.faviconDrawerVisible = false + } + if (this.logoDrawerVisible) { + this.logoDrawerVisible = false + } + }, + beforeRouteLeave(to, from, next) { + if (this.faviconDrawerVisible) { + this.faviconDrawerVisible = false + } + if (this.logoDrawerVisible) { + this.logoDrawerVisible = false + } + next() + }, methods: { ...mapActions(['loadUser', 'loadOptions']), loadFormOptions() { diff --git a/src/views/system/ToolList.vue b/src/views/system/ToolList.vue index b6a91910c..c55646410 100644 --- a/src/views/system/ToolList.vue +++ b/src/views/system/ToolList.vue @@ -73,6 +73,3 @@ export default { } } - - diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 6b94726ff..000d49523 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -148,7 +148,7 @@ export default { } } - diff --git a/src/views/user/ResetPassword.vue b/src/views/user/ResetPassword.vue new file mode 100644 index 000000000..e0507e959 --- /dev/null +++ b/src/views/user/ResetPassword.vue @@ -0,0 +1,248 @@ + + + + From 35aed16bec704cc779a8015b5ba6f68d58edca15 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Thu, 5 Sep 2019 21:31:20 +0800 Subject: [PATCH 45/59] Support preview post and sheet. --- src/config/router.config.js | 2 +- src/views/post/PostEdit.vue | 31 +++++++++++++++++++++++++++++++ src/views/sheet/SheetEdit.vue | 29 +++++++++++++++++++++++++++++ src/views/system/OptionForm.vue | 2 +- 4 files changed, 62 insertions(+), 2 deletions(-) diff --git a/src/config/router.config.js b/src/config/router.config.js index 981e57118..53772c7e3 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -1,5 +1,5 @@ // eslint-disable-next-line -import { BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts' +import { BasicLayout, PageView } from '@/layouts' export const asyncRouterMap = [ { diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index c01647850..519e9e935 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -45,6 +45,10 @@ type="danger" @click="handleSaveDraft" >保存草稿 + 预览 import { mixin, mixinDevice } from '@/utils/mixin.js' +import { mapGetters } from 'vuex' import moment from 'moment' import PostSetting from './components/PostSetting' import AttachmentDrawer from '../attachment/components/AttachmentDrawer' @@ -125,6 +130,9 @@ export default { } next() }, + computed: { + ...mapGetters(['options']) + }, methods: { handleSaveDraft() { this.postToStage.status = 'DRAFT' @@ -178,6 +186,29 @@ export default { handleShowPostSetting() { this.postSettingVisible = true }, + handlePreview() { + this.postToStage.status = 'DRAFT' + if (!this.postToStage.title) { + this.postToStage.title = moment(new Date()).format('YYYY-MM-DD-HH-mm-ss') + } + if (!this.postToStage.originalContent) { + this.postToStage.originalContent = '开始编辑...' + } + if (this.postToStage.id) { + // Update the post + postApi.update(this.postToStage.id, this.postToStage, false).then(response => { + this.$log.debug('Updated post', response.data.data) + window.open(`${this.options.blog_url}/api/admin/posts/preview/${this.postToStage.id}`, '_blank') + }) + } else { + // Create the post + postApi.create(this.postToStage, false).then(response => { + this.$log.debug('Created post', response.data.data) + this.postToStage = response.data.data + window.open(`${this.options.blog_url}/api/admin/posts/preview/${this.postToStage.id}`, '_blank') + }) + } + }, // 关闭文章设置抽屉 onPostSettingsClose() { this.postSettingVisible = false diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index 3a3cba8de..15aaa2c86 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -39,6 +39,10 @@ type="danger" @click="handleSaveDraft" >保存草稿 + 预览 import { mixin, mixinDevice } from '@/utils/mixin.js' +import { mapGetters } from 'vuex' import moment from 'moment' import { toolbars } from '@/core/const' import SheetSetting from './components/SheetSetting' @@ -115,6 +120,9 @@ export default { } next() }, + computed: { + ...mapGetters(['options']) + }, methods: { handleSaveDraft() { this.sheetToStage.status = 'DRAFT' @@ -166,6 +174,27 @@ export default { handleShowSheetSetting() { this.sheetSettingVisible = true }, + handlePreview() { + this.sheetToStage.status = 'DRAFT' + if (!this.sheetToStage.title) { + this.sheetToStage.title = moment(new Date()).format('YYYY-MM-DD-HH-mm-ss') + } + if (!this.sheetToStage.originalContent) { + this.sheetToStage.originalContent = '开始编辑...' + } + if (this.sheetToStage.id) { + sheetApi.update(this.sheetToStage.id, this.sheetToStage, false).then(response => { + this.$log.debug('Updated sheet', response.data.data) + window.open(`${this.options.blog_url}/api/admin/sheets/preview/${this.sheetToStage.id}`, '_blank') + }) + } else { + sheetApi.create(this.sheetToStage, false).then(response => { + this.$log.debug('Created sheet', response.data.data) + this.sheetToStage = response.data.data + window.open(`${this.options.blog_url}/api/admin/sheets/preview/${this.sheetToStage.id}`, '_blank') + }) + } + }, onSheetSettingsClose() { this.sheetSettingVisible = false }, diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 2c00adc34..9044f8036 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -660,7 +660,7 @@ label="CDN 加速域名:" :wrapper-col="wrapperCol" > - + Date: Fri, 6 Sep 2019 11:30:19 +0800 Subject: [PATCH 46/59] Refactor PostList.vue and SheetList.vue --- src/views/post/PostList.vue | 25 ++++++++++++++++++- src/views/sheet/SheetList.vue | 45 +++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index 18d19d6a5..d2bcc93a7 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -146,18 +146,41 @@ :href="options.blog_url+'/archives/'+record.url" target="_blank" style="text-decoration: none;" + v-if="record.status=='PUBLISHED'" > {{ text }} + + {{ text }} + + + {{ text }} + - + 内置页面 - - - {{ text }} + + {{ text }} + + + {{ text }} + - + Date: Fri, 6 Sep 2019 12:00:33 +0800 Subject: [PATCH 47/59] Support photo search by team. --- src/api/photo.js | 7 ++++++ src/views/attachment/AttachmentList.vue | 1 + src/views/sheet/internal/PhotoList.vue | 32 ++++++++++++++++++++----- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/api/photo.js b/src/api/photo.js index 49218186f..d6f95f159 100644 --- a/src/api/photo.js +++ b/src/api/photo.js @@ -35,4 +35,11 @@ photoApi.delete = photoId => { }) } +photoApi.listTeams = () => { + return service({ + url: `${baseUrl}/teams`, + method: 'get' + }) +} + export default photoApi diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index bfe89f047..a914b9640 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -252,6 +252,7 @@ export default { this.queryParam.mediaType = null this.queryParam.attachmentType = null this.loadAttachments() + this.loadMediaTypes() }, handleQuery() { this.queryParam.page = 0 diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index de455e3aa..2cfeed234 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -9,7 +9,10 @@ :span="24" class="search-box" > - +
@@ -26,9 +29,15 @@ :sm="24" > - - 11 - 22 + + {{ item }} @@ -80,7 +89,7 @@
{{ item.name }} @@ -289,6 +298,7 @@ export default { thumDrawerVisible: false, photo: {}, photos: [], + teams: [], editable: false, pagination: { page: 1, @@ -299,12 +309,14 @@ export default { page: 0, size: 18, sort: null, - keyword: null + keyword: null, + team: null } } }, created() { this.loadPhotos() + this.loadTeams() }, methods: { loadPhotos(isSearch) { @@ -321,6 +333,11 @@ export default { this.listLoading = false }) }, + loadTeams() { + photoApi.listTeams().then(response => { + this.teams = response.data.data + }) + }, handleCreateOrUpdate() { if (this.photo.id) { photoApi.update(this.photo.id, this.photo).then(response => { @@ -365,11 +382,14 @@ export default { }, selectPhotoThumb(data) { this.photo.url = encodeURI(data.path) + this.photo.thumbnail = encodeURI(data.thumbPath) this.thumDrawerVisible = false }, resetParam() { this.queryParam.keyword = null + this.queryParam.team = null this.loadPhotos() + this.loadTeams() }, onDrawerClose() { this.drawerVisible = false From 641a4789026bfb70ba6c2158945ff8b84e240588 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 6 Sep 2019 12:27:44 +0800 Subject: [PATCH 48/59] Refactor JournalList.vue. --- src/views/sheet/internal/JournalList.vue | 106 ++++++++++++----------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index d73563e69..24fd7c3d3 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -2,7 +2,10 @@
- +
@@ -22,6 +25,7 @@ --> - - + --> @@ -128,7 +122,7 @@ export default { }, attachments: [], selectedAttachment: {}, - attachmentUploadHandler: attachmentApi.upload + uploadHandler: attachmentApi.upload } }, computed: { @@ -183,6 +177,7 @@ export default { this.loadAttachments() }, onUploadClose() { + this.$refs.upload.handleClearFileList() this.loadSkeleton() this.loadAttachments() }, diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index d509bb3d7..1f2895d58 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -67,18 +67,12 @@ v-model="uploadVisible" :footer="null" :afterClose="onUploadClose" + destroyOnClose > - -

- -

-

点击选择文件或将文件拖拽到此处

-

支持单个或批量上传

-
+
@@ -126,7 +120,7 @@ export default { sort: '' }, attachments: [], - attachmentUploadHandler: attachmentApi.upload + uploadHandler: attachmentApi.upload } }, created() { @@ -174,6 +168,7 @@ export default { this.loadAttachments() }, onUploadClose() { + this.$refs.upload.handleClearFileList() this.loadSkeleton() this.loadAttachments() }, diff --git a/src/views/comment/components/CommentTab.vue b/src/views/comment/components/CommentTab.vue index d911ebc6d..1dd697b28 100644 --- a/src/views/comment/components/CommentTab.vue +++ b/src/views/comment/components/CommentTab.vue @@ -235,6 +235,7 @@ :title="'回复给:'+selectComment.author" v-model="replyCommentVisible" @close="onReplyClose" + destroyOnClose > @@ -313,26 +309,6 @@ export default { this.loadThemes() }) }, - onThemeSettingsClose() { - this.themeSettingVisible = false - this.selectedTheme = {} - }, - handleUploadChange(info) { - const status = info.file.status - if (status === 'done') { - this.$message.success(`${info.file.name} 主题上传成功!`) - } else if (status === 'error') { - this.$message.error(`${info.file.name} 主题上传失败!`) - } - }, - handleNewThemeUploadChange(info) { - const status = info.file.status - if (status === 'done') { - this.$message.success(`${info.file.name} 主题更新成功!`) - } else if (status === 'error') { - this.$message.error(`${info.file.name} 主题更新失败!`) - } - }, handleUploadSuccess() { if (this.uploadThemeVisible) { this.uploadThemeVisible = false @@ -375,13 +351,25 @@ export default { }) }, handleShowUpdateNewThemeModal(item) { - console.log(item) this.prepareUpdateTheme = item this.uploadNewThemeVisible = true }, handleShowThemeSetting(theme) { this.selectedTheme = theme this.themeSettingVisible = true + }, + onThemeUploadClose() { + if (this.uploadThemeVisible) { + this.$refs.upload.handleClearFileList() + } + if (this.uploadNewThemeVisible) { + this.$refs.updateByupload.handleClearFileList() + } + this.loadThemes() + }, + onThemeSettingsClose() { + this.themeSettingVisible = false + this.selectedTheme = {} } } } diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index f8b21e977..4a3add21e 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -187,14 +187,18 @@ export default { // Update the post postApi.update(this.postToStage.id, this.postToStage, false).then(response => { this.$log.debug('Updated post', response.data.data) - window.open(`${this.options.blog_url}/api/admin/posts/preview/${this.postToStage.id}`, '_blank') + postApi.preview(this.postToStage.id).then(response => { + window.open(response.data, '_blank') + }) }) } else { // Create the post postApi.create(this.postToStage, false).then(response => { this.$log.debug('Created post', response.data.data) this.postToStage = response.data.data - window.open(`${this.options.blog_url}/api/admin/posts/preview/${this.postToStage.id}`, '_blank') + postApi.preview(this.postToStage.id).then(response => { + window.open(response.data, '_blank') + }) }) } }, diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index 9ef811037..997f24551 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -143,10 +143,10 @@ twoToneColor="red" /> {{ text }} {{ text }} {{ text }} {{ text }} @@ -564,6 +564,11 @@ export default { this.postSettingVisible = true }) }, + handlePreview(postId) { + postApi.preview(postId).then(response => { + window.open(response.data, '_blank') + }) + }, // 关闭文章设置抽屉 onPostSettingsClose() { this.postSettingVisible = false diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index c5c24e42e..3bad874dc 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -174,13 +174,17 @@ export default { if (this.sheetToStage.id) { sheetApi.update(this.sheetToStage.id, this.sheetToStage, false).then(response => { this.$log.debug('Updated sheet', response.data.data) - window.open(`${this.options.blog_url}/api/admin/sheets/preview/${this.sheetToStage.id}`, '_blank') + sheetApi.preview(this.sheetToStage.id).then(response => { + window.open(response.data, '_blank') + }) }) } else { sheetApi.create(this.sheetToStage, false).then(response => { this.$log.debug('Created sheet', response.data.data) this.sheetToStage = response.data.data - window.open(`${this.options.blog_url}/api/admin/sheets/preview/${this.sheetToStage.id}`, '_blank') + sheetApi.preview(this.sheetToStage.id).then(response => { + window.open(response.data, '_blank') + }) }) } }, diff --git a/src/views/sheet/SheetList.vue b/src/views/sheet/SheetList.vue index dc116a3ca..19a49ed1d 100644 --- a/src/views/sheet/SheetList.vue +++ b/src/views/sheet/SheetList.vue @@ -83,10 +83,10 @@ style="max-width: 150px;display: block;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" > {{ text }} {{ text }} {{ text }} @@ -390,6 +390,11 @@ export default { this.sheetSettingVisible = true }) }, + handlePreview(sheetId) { + sheetApi.preview(sheetId).then(response => { + window.open(response.data, '_blank') + }) + }, onSheetSettingsClose() { this.sheetSettingVisible = false this.selectedSheet = {} diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 72a527977..79f7159c5 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -251,6 +251,30 @@ 附件设置 + + + + + + + + + - -

- -

-

拖拽或点击选择 Markdown 文件到此处

-

支持多个文件同时上传

-
+ >
@@ -69,6 +65,9 @@ export default { } else if (status === 'error') { this.$message.error(`${info.file.name} 导入失败!`) } + }, + onUploadClose() { + this.$refs.upload.handleClearFileList() } } } From 0749ffa6968607797b5881f3e632b157b3ecb6d5 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 8 Sep 2019 22:17:02 +0800 Subject: [PATCH 55/59] Refactor AttachmentList. --- src/components/global.less | 27 ++++++++-- src/views/attachment/AttachmentList.vue | 52 ++----------------- .../components/AttachmentDetailDrawer.vue | 12 +++-- .../components/AttachmentDrawer.vue | 23 +++++++- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/components/global.less b/src/components/global.less index 7626740ad..d3e890604 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -715,26 +715,45 @@ body { .attach-item { width: 50%; + padding-bottom: 28%; + float: left; +} + +.attach-thumb { + width: 100%; + padding-bottom: 56%; +} + +.attach-item, +.attach-thumb { margin: 0 auto; position: relative; - padding-bottom: 28%; overflow: hidden; - float: left; cursor: pointer; - img { + img, + span { width: 100%; height: 100%; position: absolute; top: 0; left: 0; } + + span { + display: flex; + font-size: 12px; + align-items: center; + justify-content: center; + color: #9b9ea0; + } } .analysis-card-container { position: relative; overflow: hidden; width: 100%; + .meta { position: relative; overflow: hidden; @@ -742,6 +761,7 @@ body { color: rgba(0, 0, 0, 0.45); font-size: 14px; line-height: 22px; + .analysis-card-action { cursor: pointer; position: absolute; @@ -749,6 +769,7 @@ body { right: 0; } } + .number { overflow: hidden; text-overflow: ellipsis; diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index efc763ecf..3a520dc84 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -8,6 +8,7 @@
-
+
- + - - + \ No newline at end of file diff --git a/src/views/attachment/components/AttachmentDetailDrawer.vue b/src/views/attachment/components/AttachmentDetailDrawer.vue index 6007831e9..4afb302e4 100644 --- a/src/views/attachment/components/AttachmentDetailDrawer.vue +++ b/src/views/attachment/components/AttachmentDetailDrawer.vue @@ -19,11 +19,13 @@ >
此文件不支持预览
- + + + - + 当前格式不支持预览 +
@@ -184,6 +188,23 @@ export default { handleDelete() { this.loadAttachments() }, + handleJudgeMediaType(attachment) { + var mediaType = attachment.mediaType + // 判断文件类型 + if (mediaType) { + var prefix = mediaType.split('/')[0] + + if (prefix === 'image') { + // 是图片 + return true + } else { + // 非图片 + return false + } + } + // 没有获取到文件返回false + return false + }, onClose() { this.$emit('close', false) } From ec5dccb7b8adfac2b9f175ec4305a0d698ae53cc Mon Sep 17 00:00:00 2001 From: ruibaby Date: Mon, 9 Sep 2019 21:32:21 +0800 Subject: [PATCH 56/59] Fixed something. --- src/views/attachment/AttachmentList.vue | 2 +- .../components/AttachmentDrawer.vue | 8 +++---- .../components/AttachmentSelectDrawer.vue | 23 ++++++++++++++++++- src/views/post/components/PostSetting.vue | 4 ++-- src/views/user/Profile.vue | 7 +++++- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index 3a520dc84..4efe705d8 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -278,4 +278,4 @@ export default { } } } - \ No newline at end of file + diff --git a/src/views/attachment/components/AttachmentDrawer.vue b/src/views/attachment/components/AttachmentDrawer.vue index e3caefc1e..2556acd3d 100644 --- a/src/views/attachment/components/AttachmentDrawer.vue +++ b/src/views/attachment/components/AttachmentDrawer.vue @@ -37,10 +37,10 @@ @click="handleShowDetailDrawer(item)" > 当前格式不支持预览 - +
diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index 1f2895d58..f856465b6 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -34,7 +34,11 @@ :key="index" @click="handleSelectAttachment(item)" > - + 当前格式不支持预览 +
@@ -172,6 +176,23 @@ export default { this.loadSkeleton() this.loadAttachments() }, + handleJudgeMediaType(attachment) { + var mediaType = attachment.mediaType + // 判断文件类型 + if (mediaType) { + var prefix = mediaType.split('/')[0] + + if (prefix === 'image') { + // 是图片 + return true + } else { + // 非图片 + return false + } + } + // 没有获取到文件返回false + return false + }, onClose() { this.$emit('close', false) } diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 9e9758ab0..1715fb51b 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -40,7 +40,7 @@ slot="addonAfter" @click="togglePasswordVisible" > - + - + diff --git a/src/views/user/Profile.vue b/src/views/user/Profile.vue index 50cd78695..cd37ffa9b 100644 --- a/src/views/user/Profile.vue +++ b/src/views/user/Profile.vue @@ -203,7 +203,12 @@ export default { this.$message.error('确认密码和新密码不匹配!') return } - userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {}) + userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => { + this.$message.success('密码修改成功!') + this.passwordParam.oldPassword = null + this.passwordParam.newPassword = null + this.passwordParam.confirmPassword = null + }) }, handleUpdateProfile() { if (!this.user.username) { From 803e41952d9059b0344af5f3ac5ce2fca8c6aff8 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Tue, 10 Sep 2019 11:20:59 +0800 Subject: [PATCH 57/59] Fixed store cache options error. --- src/components/Tools/UserMenu.vue | 7 +------ src/permission.js | 4 ++++ src/views/dashboard/Dashboard.vue | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/components/Tools/UserMenu.vue b/src/components/Tools/UserMenu.vue index 4282eee29..e9e4a9e07 100644 --- a/src/components/Tools/UserMenu.vue +++ b/src/components/Tools/UserMenu.vue @@ -30,6 +30,7 @@ @@ -112,9 +113,3 @@ export default { } } - - diff --git a/src/permission.js b/src/permission.js index bd20ade5c..f3516f629 100644 --- a/src/permission.js +++ b/src/permission.js @@ -29,6 +29,10 @@ router.beforeEach((to, from, next) => { } // TODO Get installation status + if (!store.getters.options) { + store.dispatch('loadOptions').then() + } + next() NProgress.done() return diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index 02386f647..9c9df3746 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -129,10 +129,30 @@ > {{ item.title }} + {{ item.title }} + {{ item.title }} + + {{ text }} +
{{ item.createTime | timeAgo }}
@@ -507,6 +527,11 @@ export default { this.listLatestLogs() }) }, + handlePostPreview(postId) { + postApi.preview(postId).then(response => { + window.open(response.data, '_blank') + }) + }, onPaginationChange(page, pageSize) { this.$log.debug(`Current: ${page}, PageSize: ${pageSize}`) this.logPagination.page = page From 41ffda87421bf57f726d1933ef7e442bb948b899 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 11 Sep 2019 20:49:52 +0800 Subject: [PATCH 58/59] Support select theme on theme edit page. --- src/api/theme.js | 23 ++++++++++++++- src/views/dashboard/Dashboard.vue | 36 ++++++++++++------------ src/views/interface/ThemeEdit.vue | 8 ++++-- src/views/sheet/internal/JournalList.vue | 12 ++++---- 4 files changed, 51 insertions(+), 28 deletions(-) diff --git a/src/api/theme.js b/src/api/theme.js index 3b3eeb1c0..814637061 100644 --- a/src/api/theme.js +++ b/src/api/theme.js @@ -133,6 +133,16 @@ themeApi.getContent = path => { }) } +themeApi.getContent = (themeId, path) => { + return service({ + url: `${baseUrl}/${themeId}/files/content`, + params: { + path: path + }, + method: 'get' + }) +} + themeApi.saveContent = (path, content) => { return service({ url: `${baseUrl}/files/content`, @@ -144,6 +154,17 @@ themeApi.saveContent = (path, content) => { }) } +themeApi.saveContent = (themeId, path, content) => { + return service({ + url: `${baseUrl}/${themeId}/files/content`, + data: { + path: path, + content: content + }, + method: 'put' + }) +} + themeApi.reload = () => { return service({ url: `${baseUrl}/reload`, @@ -161,4 +182,4 @@ themeApi.exists = template => { }) } -export default themeApi +export default themeApi \ No newline at end of file diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index 9c9df3746..c99cd7af1 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -373,7 +373,7 @@ export default { data() { return { photoList: [], - showMoreOptions: false, + // showMoreOptions: false, startVal: 0, logType: logApi.logType, activityLoading: true, @@ -450,18 +450,18 @@ export default { next() }, methods: { - handlerPhotoUploadSuccess(response, file) { - var callData = response.data.data - var photo = { - name: callData.name, - url: callData.path, - thumbnail: callData.thumbPath, - suffix: callData.suffix, - width: callData.width, - height: callData.height - } - this.journalPhotos.push(photo) - }, + // handlerPhotoUploadSuccess(response, file) { + // var callData = response.data.data + // var photo = { + // name: callData.name, + // url: callData.path, + // thumbnail: callData.thumbPath, + // suffix: callData.suffix, + // width: callData.width, + // height: callData.height + // } + // this.journalPhotos.push(photo) + // }, listLatestPosts() { postApi.listLatest(5).then(response => { this.postData = response.data.data @@ -498,13 +498,13 @@ export default { this.$message.success('发表成功!') this.journal = {} // this.photoList = [] - this.showMoreOptions = false + // this.showMoreOptions = false }) }, - handleUploadPhotoWallClick() { - // 是否显示上传照片墙组件 - this.showMoreOptions = !this.showMoreOptions - }, + // handleUploadPhotoWallClick() { + // // 是否显示上传照片墙组件 + // this.showMoreOptions = !this.showMoreOptions + // }, handleShowLogDrawer() { this.logDrawerVisible = true this.loadLogs() diff --git a/src/views/interface/ThemeEdit.vue b/src/views/interface/ThemeEdit.vue index d316866ac..424fe1b9b 100644 --- a/src/views/interface/ThemeEdit.vue +++ b/src/views/interface/ThemeEdit.vue @@ -55,6 +55,7 @@ @@ -83,7 +84,7 @@ export default { lineNumbers: true, line: true }, - files: [], + files: null, file: {}, content: '', themes: [], @@ -112,6 +113,7 @@ export default { }) }, onSelectTheme(themeId) { + this.files = null themeApi.listFiles(themeId).then(response => { this.files = response.data.data }) @@ -141,14 +143,14 @@ export default { } }) } - themeApi.getContent(file.path).then(response => { + themeApi.getContent(this.selectedTheme.id,file.path).then(response => { this.content = response.data.data this.file = file this.buttonDisabled = false }) }, handlerSaveContent() { - themeApi.saveContent(this.file.path, this.content).then(response => { + themeApi.saveContent(this.selectedTheme.id,this.file.path, this.content).then(response => { this.$message.success('保存成功!') }) } diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index e2521a4af..5bbbe41fa 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -313,12 +313,12 @@ export default { // photoList: [], // 编辑图片时回显所需对象 // previewVisible: false, showMoreOptions: false, - previewPhoto: { - // 图片预览信息临时对象 - name: '', - description: '', - url: '' - }, + // previewPhoto: { + // // 图片预览信息临时对象 + // name: '', + // description: '', + // url: '' + // }, title: '发表', listLoading: false, visible: false, From ee5f26280d4723b531e9f007016cf80e1be347bf Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 11 Sep 2019 21:26:51 +0800 Subject: [PATCH 59/59] release 1.1.0 --- package-lock.json | 2 +- package.json | 2 +- src/api/theme.js | 2 +- src/views/comment/components/CommentTab.vue | 22 ++++++++++-- .../dashboard/components/RecentCommentTab.vue | 35 ++++++++++++++++++- src/views/interface/ThemeEdit.vue | 4 +-- src/views/post/PostList.vue | 1 + src/views/system/About.vue | 4 +++ 8 files changed, 64 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index e63236359..59ae14222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "halo-admin", - "version": "1.1.0-beta.3", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 719d12c67..2d2723a6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "halo-admin", - "version": "1.1.0-beta.3", + "version": "1.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/api/theme.js b/src/api/theme.js index 814637061..2863546bb 100644 --- a/src/api/theme.js +++ b/src/api/theme.js @@ -182,4 +182,4 @@ themeApi.exists = template => { }) } -export default themeApi \ No newline at end of file +export default themeApi diff --git a/src/views/comment/components/CommentTab.vue b/src/views/comment/components/CommentTab.vue index 1dd697b28..3c67c5279 100644 --- a/src/views/comment/components/CommentTab.vue +++ b/src/views/comment/components/CommentTab.vue @@ -108,6 +108,22 @@ :loading="loading" :pagination="false" > +

{{ item.author }} 发表在 《{{ item.post.title }}》 + >{{ item.post.title }}{{ item.post.title }}{{ item.post.title }}{{ item.post.title }} + 》