From a5a27822d6254d7cf5203c4529ea25136453bcdd Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 31 May 2019 22:35:09 +0800 Subject: [PATCH] Complete message. --- src/config/defaultSettings.js | 35 ++++++------------- src/config/router.config.js | 12 ------- .../components/AttachmentDetailDrawer.vue | 10 +++--- .../components/AttachmentDrawer.vue | 2 +- .../components/AttachmentSelectDrawer.vue | 2 +- src/views/comment/components/CommentTab.vue | 3 -- src/views/interface/ThemeEdit.vue | 6 ++-- src/views/interface/ThemeList.vue | 6 ++-- src/views/sheet/SheetEdit.vue | 4 +-- src/views/sheet/internal/PhotoList.vue | 4 +-- src/views/system/Installation.vue | 4 +-- src/views/system/ToolList.vue | 6 ++-- src/views/user/Login.vue | 4 +-- src/views/user/Profile.vue | 3 +- 14 files changed, 35 insertions(+), 66 deletions(-) diff --git a/src/config/defaultSettings.js b/src/config/defaultSettings.js index 53d4f5f9..019a7c4c 100644 --- a/src/config/defaultSettings.js +++ b/src/config/defaultSettings.js @@ -1,29 +1,14 @@ -/** - * 项目默认配置项 - * primaryColor - 默认主题色 - * navTheme - sidebar theme ['dark', 'light'] 两种主题 - * layout - 整体布局方式 ['sidemenu', 'topmenu'] 两种布局 - * fixedHeader - 固定 Header : boolean - * fixSiderbar - 固定左侧菜单栏 : boolean - * autoHideHeader - 向下滚动时,隐藏 Header : boolean - * contentWidth - 内容区布局: 流式 | 固定 - * - * storageOptions: {} - Vue-ls 插件配置项 (localStorage/sessionStorage) - * - */ - export default { - primaryColor: '#1890FF', // primary color of ant design - navTheme: 'light', // theme for nav menu - layout: 'topmenu', // nav menu position: sidemenu or topmenu - contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu - fixedHeader: false, // sticky header - fixSiderbar: false, // sticky siderbar - autoHideHeader: false, // auto hide header - // vue-ls options + primaryColor: '#1890FF', + navTheme: 'dark', + layout: 'topmenu', + contentWidth: 'Fixed', + fixedHeader: false, + fixSiderbar: false, + autoHideHeader: false, storageOptions: { - namespace: 'halo__', // key prefix - name: 'ls', // name variable Vue.[ls] or this.[$ls], - storage: 'local' // storage name session, local, memory + namespace: 'halo__', + name: 'ls', + storage: 'local' } } diff --git a/src/config/router.config.js b/src/config/router.config.js index 0a28bb42..a6e45d8e 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -207,18 +207,6 @@ export const asyncRouterMap = [ * @type { *[] } */ export const constantRouterMap = [ - { - path: '/test', - component: BlankLayout, - redirect: '/test/home', - children: [ - { - path: 'home', - name: 'TestHome', - component: () => import('@/views/Home') - } - ] - }, { path: '/login', name: 'Login', diff --git a/src/views/attachment/components/AttachmentDetailDrawer.vue b/src/views/attachment/components/AttachmentDetailDrawer.vue index c4e7937d..bfb8df23 100644 --- a/src/views/attachment/components/AttachmentDetailDrawer.vue +++ b/src/views/attachment/components/AttachmentDetailDrawer.vue @@ -211,7 +211,7 @@ export default { doUpdateAttachment() { attachmentApi.update(this.attachment.id, this.attachment).then(response => { this.$log.debug('Updated attachment', response.data.data) - this.$message.success('附件修改成功') + this.$message.success('附件修改成功!') }) this.editable = false }, @@ -220,11 +220,11 @@ export default { this.$copyText(text) .then(message => { console.log('copy', message) - this.$message.success('复制成功') + this.$message.success('复制成功!') }) .catch(err => { console.log('copy.err', err) - this.$message.error('复制失败') + this.$message.error('复制失败!') }) }, handleCopyMarkdownLink() { @@ -232,11 +232,11 @@ export default { this.$copyText(text) .then(message => { console.log('copy', message) - this.$message.success('复制成功') + this.$message.success('复制成功!') }) .catch(err => { console.log('copy.err', err) - this.$message.error('复制失败') + this.$message.error('复制失败!') }) }, handleAddToPhoto() { diff --git a/src/views/attachment/components/AttachmentDrawer.vue b/src/views/attachment/components/AttachmentDrawer.vue index 9b667d35..f883b724 100644 --- a/src/views/attachment/components/AttachmentDrawer.vue +++ b/src/views/attachment/components/AttachmentDrawer.vue @@ -184,7 +184,7 @@ export default { this.loadAttachments() }, handleAttachmentUploadSuccess() { - this.$message.success('上传成功') + this.$message.success('上传成功!') this.loadAttachments() }, handleDelete() { diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index cb7e32a1..3883c44f 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -157,7 +157,7 @@ export default { this.loadAttachments() }, handleAttachmentUploadSuccess() { - this.$message.success('上传成功') + this.$message.success('上传成功!') this.loadAttachments() }, handleDelete() { diff --git a/src/views/comment/components/CommentTab.vue b/src/views/comment/components/CommentTab.vue index b8467b10..c7da82f4 100644 --- a/src/views/comment/components/CommentTab.vue +++ b/src/views/comment/components/CommentTab.vue @@ -388,9 +388,6 @@ export default { this.options = response.data.data }) }, - handleEditComment(id) { - this.$message.success('编辑') - }, handleEditStatusClick(commentId, status) { commentApi.updateStatus(this.type, commentId, status).then(response => { this.$message.success('操作成功!') diff --git a/src/views/interface/ThemeEdit.vue b/src/views/interface/ThemeEdit.vue index 5e0e6b66..699eba14 100644 --- a/src/views/interface/ThemeEdit.vue +++ b/src/views/interface/ThemeEdit.vue @@ -89,7 +89,7 @@ export default { handleSelectFile(file) { const _this = this if (!file.editable) { - this.$message.info('该文件不支持修改') + this.$message.info('该文件不支持修改!') this.content = '' this.file = {} this.buttonDisabled = true @@ -98,7 +98,7 @@ export default { if (file.name === 'settings.yaml' || file.name === 'settings.yml' || file.name === 'theme.yaml' || file.name === 'theme.yml') { this.$confirm({ title: '警告:请谨慎修改该配置文件', - content: '修改之后可能会产生不可预料的问题', + content: '修改之后可能会产生不可预料的问题!', onCancel() { _this.content = '' _this.file = {} @@ -114,7 +114,7 @@ export default { }, handlerSaveContent() { themeApi.saveContent(this.file.path, this.content).then(response => { - this.$message.success('保存成功') + this.$message.success('保存成功!') }) } } diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index 20618d6c..4ccbc64e 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -429,9 +429,9 @@ export default { handleChange(info) { const status = info.file.status if (status === 'done') { - this.$message.success(`${info.file.name} 主题上传成功`) + this.$message.success(`${info.file.name} 主题上传成功!`) } else if (status === 'error') { - this.$message.error(`${info.file.name} 主题上传失败`) + this.$message.error(`${info.file.name} 主题上传失败!`) } }, handleUploadSuccess() { @@ -450,7 +450,7 @@ export default { handleFetching() { this.fetchButtonLoading = true themeApi.fetching(this.fetchingUrl).then(response => { - this.$message.success('拉取成功') + this.$message.success('拉取成功!') this.uploadVisible = false this.fetchButtonLoading = false this.loadThemes() diff --git a/src/views/sheet/SheetEdit.vue b/src/views/sheet/SheetEdit.vue index 6276480c..f68faf0d 100644 --- a/src/views/sheet/SheetEdit.vue +++ b/src/views/sheet/SheetEdit.vue @@ -236,8 +236,8 @@ export default { }, saveSheet() { this.createOrUpdateSheet( - () => this.$message.success('页面创建成功'), - () => this.$message.success('页面更新成功'), + () => this.$message.success('页面创建成功!'), + () => this.$message.success('页面更新成功!'), false ) }, diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index 75123f17..a70290da 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -321,12 +321,12 @@ export default { handleCreateOrUpdate() { if (this.photo.id) { photoApi.update(this.photo.id, this.photo).then(response => { - this.$message.success('照片更新成功') + this.$message.success('照片更新成功!') this.loadPhotos() }) } else { photoApi.create(this.photo).then(response => { - this.$message.success('照片添加成功') + this.$message.success('照片添加成功!') this.loadPhotos() this.photo = response.data.data }) diff --git a/src/views/system/Installation.vue b/src/views/system/Installation.vue index 9e10319a..f9d687ea 100644 --- a/src/views/system/Installation.vue +++ b/src/views/system/Installation.vue @@ -251,7 +251,7 @@ export default { install() { adminApi.install(this.installation).then(response => { this.$log.debug('Installation response', response) - this.$message.success('安装成功') + this.$message.success('安装成功!') setTimeout(() => { this.$router.push({ name: 'Dashboard' }) }, 300) @@ -273,7 +273,7 @@ export default { if (this.migrationData) { recoveryApi.migrate(this.migrationData).then(response => { this.$log.debug('Migrated successfullly') - this.$message.success('数据迁移成功') + this.$message.success('数据迁移成功!') this.install() }) } else { diff --git a/src/views/system/ToolList.vue b/src/views/system/ToolList.vue index 09cac66d..b6a91910 100644 --- a/src/views/system/ToolList.vue +++ b/src/views/system/ToolList.vue @@ -31,7 +31,7 @@ @@ -65,9 +65,9 @@ export default { console.log(info.file, info.fileList) } if (status === 'done') { - this.$message.success(`${info.file.name} 导入成功`) + this.$message.success(`${info.file.name} 导入成功!`) } else if (status === 'error') { - this.$message.error(`${info.file.name} 导入失败`) + this.$message.error(`${info.file.name} 导入失败!`) } } } diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index bad6fbd7..9dd04683 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -67,12 +67,12 @@ export default { ...mapActions(['login', 'loadUser']), handleLogin() { if (!this.username) { - this.$message.warn('用户名不能为空') + this.$message.warn('用户名不能为空!') return } if (!this.password) { - this.$message.warn('密码不能为空') + this.$message.warn('密码不能为空!') return } diff --git a/src/views/user/Profile.vue b/src/views/user/Profile.vue index 99b3e2d8..9a3aebb6 100644 --- a/src/views/user/Profile.vue +++ b/src/views/user/Profile.vue @@ -28,7 +28,7 @@

- {{ options.blog_url }} @@ -205,7 +205,6 @@ export default { this.$message.error('确认密码和新密码不匹配!') return } - userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {}) }, handleUpdateProfile() {