pull/88/head
Ryan Wang 2020-03-06 21:44:24 +08:00 committed by GitHub
parent afdd25483c
commit fde4f6a055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 32 deletions

View File

@ -71,41 +71,22 @@
<a-menu-item <a-menu-item
:key="1" :key="1"
:disabled="item.activated" :disabled="item.activated"
@click="handleConfirmDelete(item)"
> >
<a-popconfirm <a-icon
v-if="!item.activated" type="delete"
:title="'确定删除【' + item.name + '】主题?'" style="margin-right:3px"
@confirm="handleDeleteTheme(item.id)" />
okText="确定"
cancelText="取消"
>
<a-icon
type="delete"
style="margin-right:3px"
/>
</a-popconfirm>
<span v-else>
<a-icon
type="delete"
style="margin-right:3px"
/>
</span>
</a-menu-item> </a-menu-item>
<a-menu-item <a-menu-item
:key="2" :key="2"
v-if="item.repo" v-if="item.repo"
@click="handleConfirmUpdate(item)"
> >
<a-popconfirm <a-icon
:title="'确定更新【' + item.name + '】主题?'" type="cloud"
@confirm="handleUpdateTheme(item.id)" style="margin-right:3px"
okText="确定" />线
cancelText="取消"
>
<a-icon
type="cloud"
style="margin-right:3px"
/>线
</a-popconfirm>
</a-menu-item> </a-menu-item>
<a-menu-item <a-menu-item
:key="3" :key="3"
@ -365,6 +346,28 @@ export default {
this.selectedTheme = theme this.selectedTheme = theme
this.themeSettingVisible = true this.themeSettingVisible = true
}, },
handleConfirmDelete(item) {
this.$confirm({
title: '提示',
maskClosable: true,
content: '确定删除【' + item.name + '】主题?',
onOk() {
this.handleDeleteTheme(item.id)
},
onCancel() {}
})
},
handleConfirmUpdate(item) {
this.$confirm({
title: '提示',
maskClosable: true,
content: '确定更新【' + item.name + '】主题?',
onOk() {
this.handleUpdateTheme(item.id)
},
onCancel() {}
})
},
onThemeUploadClose() { onThemeUploadClose() {
if (this.uploadThemeVisible) { if (this.uploadThemeVisible) {
this.$refs.upload.handleClearFileList() this.$refs.upload.handleClearFileList()

View File

@ -982,7 +982,7 @@ export default {
if (!this.options.smms_api_secret_token) { if (!this.options.smms_api_secret_token) {
this.$notification['error']({ this.$notification['error']({
message: '提示', message: '提示',
description: 'Secret Token不能为空!' description: 'Secret Token 不能为空!'
}) })
return return
} }
@ -991,7 +991,7 @@ export default {
if (!this.options.oss_upyun_domain) { if (!this.options.oss_upyun_domain) {
this.$notification['error']({ this.$notification['error']({
message: '提示', message: '提示',
description: '域名不能为空!' description: '绑定域名不能为空!'
}) })
return return
} }
@ -1028,7 +1028,7 @@ export default {
if (!this.options.oss_qiniu_domain) { if (!this.options.oss_qiniu_domain) {
this.$notification['error']({ this.$notification['error']({
message: '提示', message: '提示',
description: '域名不能为空!' description: '绑定域名不能为空!'
}) })
return return
} }