|
@@ -1,5 +1,5 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { ElSwitch } from 'element-plus'
|
|
|
+import { ElSwitch, ElMessage } from 'element-plus'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
import { useAppStore } from '@/store/modules/app'
|
|
|
import { computed, ref, watch } from 'vue'
|
|
@@ -107,6 +107,14 @@ const greyModeChange = (show: boolean) => {
|
|
|
appStore.setGreyMode(show)
|
|
|
}
|
|
|
|
|
|
+// 动态路由
|
|
|
+const dynamicRouter = ref(appStore.getDynamicRouter)
|
|
|
+
|
|
|
+const dynamicRouterChange = (show: boolean) => {
|
|
|
+ ElMessage.info(t('setting.reExperienced'))
|
|
|
+ appStore.setDynamicRouter(show)
|
|
|
+}
|
|
|
+
|
|
|
const layout = computed(() => appStore.getLayout)
|
|
|
|
|
|
watch(
|
|
@@ -185,5 +193,10 @@ watch(
|
|
|
<span class="text-14px">{{ t('setting.greyMode') }}</span>
|
|
|
<ElSwitch v-model="greyMode" @change="greyModeChange" />
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="flex justify-between items-center">
|
|
|
+ <span class="text-14px">{{ t('setting.dynamicRouter') }}</span>
|
|
|
+ <ElSwitch v-model="dynamicRouter" @change="dynamicRouterChange" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|