tdesign-vue-next-starter/src/App.vue

26 lines
509 B
Vue
Raw Normal View History

<template>
<router-view :class="[mode]" />
</template>
2022-02-16 19:56:36 +08:00
<script setup lang="ts">
import { computed, onMounted } from 'vue';
import { useStore } from 'vuex';
2021-12-31 12:16:26 +08:00
import config from '@/config/style';
2022-02-16 19:56:36 +08:00
const store = useStore();
2022-02-16 19:56:36 +08:00
const mode = computed(() => {
return store.getters['setting/mode'];
});
2022-02-16 19:56:36 +08:00
onMounted(() => {
store.dispatch('setting/changeTheme', { ...config });
});
</script>
<style lang="less">
@import '@/style/variables.less';
#nprogress .bar {
background: @brand-color !important;
}
</style>