Kaynağa Gözat

update Dashboard.vue

reghao 3 ay önce
ebeveyn
işleme
07eec7a857
1 değiştirilmiş dosya ile 27 ekleme ve 0 silme
  1. 27 0
      src/views/admin/Dashboard.vue

+ 27 - 0
src/views/admin/Dashboard.vue

@@ -98,6 +98,9 @@
       </div>
       <div v-else>
         <h3>Dashboard</h3>
+        <el-button size="mini" type="upload" icon="el-icon-upload" @click="goToDisk">Disk</el-button>
+        <el-button size="mini" type="upload" icon="el-icon-upload" @click="goToVod">VOD</el-button>
+        <el-button size="mini" type="upload" icon="el-icon-upload" @click="goToBlog">Blog</el-button>
       </div>
     </el-main>
   </el-container>
@@ -140,6 +143,30 @@ export default {
       }).catch(error => {
         this.$message.error(error.message)
       })
+    },
+    goToDisk() {
+      const path = '/disk'
+      if (this.$route.path === path) {
+        this.$router.go(0)
+        return
+      }
+      this.$router.push(path)
+    },
+    goToVod() {
+      const path = '/vod'
+      if (this.$route.path === path) {
+        this.$router.go(0)
+        return
+      }
+      this.$router.push(path)
+    },
+    goToBlog() {
+      const path = '/blog'
+      if (this.$route.path === path) {
+        this.$router.go(0)
+        return
+      }
+      this.$router.push(path)
     }
   }
 }