fix: the delete theme button could not be clicked. (halo-dev/console#90)

pull/3445/head
Ryan Wang 2020-03-09 23:34:38 +08:00 committed by GitHub
parent bd8240c85c
commit e8199d3498
2 changed files with 7 additions and 5 deletions

View File

@ -76,7 +76,7 @@ export default {
page: 1, page: 1,
size: 50, size: 50,
sort: null, sort: null,
total: null total: 1
}, },
logQueryParam: { logQueryParam: {
page: 0, page: 0,

View File

@ -291,8 +291,8 @@ export default {
hide() hide()
}) })
}, },
handleDeleteTheme(key) { handleDeleteTheme(themeId) {
themeApi.delete(key).then(response => { themeApi.delete(themeId).then(response => {
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.loadThemes() this.loadThemes()
}) })
@ -347,23 +347,25 @@ export default {
this.themeSettingVisible = true this.themeSettingVisible = true
}, },
handleConfirmDelete(item) { handleConfirmDelete(item) {
const that = this
this.$confirm({ this.$confirm({
title: '提示', title: '提示',
maskClosable: true, maskClosable: true,
content: '确定删除【' + item.name + '】主题?', content: '确定删除【' + item.name + '】主题?',
onOk() { onOk() {
this.handleDeleteTheme(item.id) that.handleDeleteTheme(item.id)
}, },
onCancel() {} onCancel() {}
}) })
}, },
handleConfirmUpdate(item) { handleConfirmUpdate(item) {
const that = this
this.$confirm({ this.$confirm({
title: '提示', title: '提示',
maskClosable: true, maskClosable: true,
content: '确定更新【' + item.name + '】主题?', content: '确定更新【' + item.name + '】主题?',
onOk() { onOk() {
this.handleUpdateTheme(item.id) that.handleUpdateTheme(item.id)
}, },
onCancel() {} onCancel() {}
}) })