diff --git a/src/api/theme.js b/src/api/theme.js
index 35dfd2bc..5c603ef0 100644
--- a/src/api/theme.js
+++ b/src/api/theme.js
@@ -32,4 +32,11 @@ themeApi.active = theme => {
})
}
+themeApi.delete = key => {
+ return service({
+ url: `${baseUrl}/${key}`,
+ method: 'delete'
+ })
+}
+
export default themeApi
diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue
index f7baa884..807e8b08 100644
--- a/src/views/interface/ThemeList.vue
+++ b/src/views/interface/ThemeList.vue
@@ -26,7 +26,13 @@
已启用
启用
设置
-
+
删除
@@ -72,8 +78,11 @@ export default {
this.loadThemes()
})
},
- deleteTheme(theme) {
- this.$message.success('删除' + theme)
+ deleteTheme(key) {
+ themeApi.delete(key).then(response => {
+ this.$message.success('删除成功!')
+ this.loadThemes()
+ })
}
}
}