Ver código fonte

perf: layout set

xiaoxian521 3 anos atrás
pai
commit
c875d20e83
2 arquivos alterados com 5 adições e 5 exclusões
  1. 4 4
      src/layout/components/setting/index.vue
  2. 1 1
      types/global.d.ts

+ 4 - 4
src/layout/components/setting/index.vue

@@ -331,8 +331,8 @@ nextTick(() => {
       </el-tooltip>
     </ul>
 
-    <el-divider v-if="!dataTheme">主题色</el-divider>
-    <ul class="theme-color" v-if="!dataTheme">
+    <el-divider v-show="!dataTheme">主题色</el-divider>
+    <ul class="theme-color" v-show="!dataTheme">
       <li
         v-for="(item, index) in themeColors"
         :key="index"
@@ -351,7 +351,7 @@ nextTick(() => {
 
     <el-divider>界面显示</el-divider>
     <ul class="setting">
-      <li>
+      <li v-show="!dataTheme">
         <span>灰色模式</span>
         <el-switch
           v-model="settings.greyVal"
@@ -363,7 +363,7 @@ nextTick(() => {
         >
         </el-switch>
       </li>
-      <li>
+      <li v-show="!dataTheme">
         <span>色弱模式</span>
         <el-switch
           v-model="settings.weakVal"

+ 1 - 1
types/global.d.ts

@@ -81,8 +81,8 @@ declare global {
     KeepAlive?: boolean;
     Locale?: string;
     Layout?: string;
-    DarkMode?: boolean;
     Theme?: string;
+    DarkMode?: boolean;
     Grey?: boolean;
     Weak?: boolean;
     HideTabs?: boolean;