feat: 升级vue3 v1.8.0

This commit is contained in:
xingyu
2022-10-11 13:59:30 +08:00
parent a98af3edbc
commit 7a717ef80d
42 changed files with 191 additions and 271 deletions

View File

@@ -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,21 @@ 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 fixedMenu = ref(appStore.getFixedMenu)
const fixedMenuChange = (show: boolean) => {
appStore.setFixedMenu(show)
}
const layout = computed(() => appStore.getLayout)
watch(
@@ -185,5 +200,15 @@ 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 class="flex justify-between items-center">
<span class="text-14px">{{ t('setting.fixedMenu') }}</span>
<ElSwitch v-model="fixedMenu" @change="fixedMenuChange" />
</div>
</div>
</template>