Ver código fonte

:recycle: Refactoring code.

冷冷 5 anos atrás
pai
commit
c62f17bd62
2 arquivos alterados com 4 adições e 14 exclusões
  1. 2 8
      src/page/logs/index.vue
  2. 2 6
      src/views/admin/user/index.vue

+ 2 - 8
src/page/logs/index.vue

@@ -57,10 +57,7 @@ export default {
       }).then(() => {
         this.$store.dispatch('SendLogs').then(() => {
           this.$parent.$parent.box = false
-          this.$message({
-            type: 'success',
-            message: '发送成功!'
-          })
+          this.$message.success( '发送成功!')
         })
       }).catch(() => {
 
@@ -74,10 +71,7 @@ export default {
       }).then(() => {
         this.$store.commit('CLEAR_LOGS')
         this.$parent.$parent.box = false
-        this.$message({
-          type: 'success',
-          message: '清空成功!'
-        })
+        this.$message.success( '清空成功!')
       }).catch(() => {
 
       })

+ 2 - 6
src/views/admin/user/index.vue

@@ -284,10 +284,7 @@
         })
       },
       deletes(row, index) {
-        this.$confirm(
-          '此操作将永久删除该用户(用户名:' + row.username + '), 是否继续?',
-          '提示',
-          {
+        this.$confirm('此操作将永久删除该用户(用户名:' + row.username + '), 是否继续?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
@@ -297,8 +294,7 @@
             .then(() => {
               this.list.splice(index, 1)
               this.$notify.success('删除成功')
-            })
-            .cache(() => {
+            }).catch(() => {
               this.$notify.error('删除失败')
             })
         })