Complete message.

pull/25/head
ruibaby 2019-05-31 22:35:09 +08:00
parent 34e8c8d135
commit a5a27822d6
14 changed files with 35 additions and 66 deletions

View File

@ -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'
}
}

View File

@ -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',

View File

@ -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() {

View File

@ -184,7 +184,7 @@ export default {
this.loadAttachments()
},
handleAttachmentUploadSuccess() {
this.$message.success('上传成功')
this.$message.success('上传成功')
this.loadAttachments()
},
handleDelete() {

View File

@ -157,7 +157,7 @@ export default {
this.loadAttachments()
},
handleAttachmentUploadSuccess() {
this.$message.success('上传成功')
this.$message.success('上传成功')
this.loadAttachments()
},
handleDelete() {

View File

@ -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('操作成功!')

View File

@ -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('保存成功')
})
}
}

View File

@ -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()

View File

@ -236,8 +236,8 @@ export default {
},
saveSheet() {
this.createOrUpdateSheet(
() => this.$message.success('页面创建成功'),
() => this.$message.success('页面更新成功'),
() => this.$message.success('页面创建成功'),
() => this.$message.success('页面更新成功'),
false
)
},

View File

@ -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
})

View File

@ -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 {

View File

@ -31,7 +31,7 @@
<upload
name="files"
multiple
accept="application/markdown"
accept="text/markdown"
:uploadHandler="uploadHandler"
@change="handleChange"
>
@ -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} 导入失败`)
}
}
}

View File

@ -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
}

View File

@ -28,7 +28,7 @@
</div>
<div class="profile-center-detail">
<p>
<a-icon type="link" /><a
<a-icon type="global" /><a
:href="options.blog_url"
target="method"
>{{ options.blog_url }}</a>
@ -205,7 +205,6 @@ export default {
this.$message.error('确认密码和新密码不匹配!')
return
}
userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {})
},
handleUpdateProfile() {