瀏覽代碼

perf(views): 优化“首次使用”页面,已配置项禁止点击

wangcong 1 月之前
父節點
當前提交
a34157e3db
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      src/views/first-usage/FirstUsage.vue

+ 9 - 3
src/views/first-usage/FirstUsage.vue

@@ -68,7 +68,7 @@ const configList = computed<ConfigItem[]>(() => {
           :class="['config-container', { 'config-container-done': item.done }]"
           v-for="(item, index) in configList"
           :key="index"
-          @click="$router.push({ path: item.path, query: route.query })"
+          @click="item.done || $router.push({ path: item.path, query: route.query })"
         >
           <img class="config-icon" :src="item.icon" />
           <div>
@@ -128,8 +128,14 @@ const configList = computed<ConfigItem[]>(() => {
 }
 
 .config-container-done {
-  background: #f5f7fa;
-  border-color: #f5f7fa;
+  cursor: not-allowed;
+
+  &,
+  &:hover {
+    background: #f5f7fa;
+    border-color: #f5f7fa;
+    outline: none;
+  }
 }
 
 .config-icon {