Skip to content

Commit

Permalink
fix: 手机端修改
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-advokate committed Jul 7, 2023
1 parent 6ff3eff commit daf0e36
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
VanButton: typeof import('vant/es')['Button']
VanCol: typeof import('vant/es')['Col']
VanConfigProvider: typeof import('vant/es')['ConfigProvider']
VanGrid: typeof import('vant/es')['Grid']
VanGridItem: typeof import('vant/es')['GridItem']
VanRow: typeof import('vant/es')['Row']
Expand Down
11 changes: 9 additions & 2 deletions src/views/layout/frame/Mobile.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<router-view></router-view>
<van-config-provider :theme="isThemDark ? 'dark' : 'light'">
<router-view></router-view>
</van-config-provider>
</template>

<script lang="ts" setup name="LayoutMobile"></script>
<script lang="ts" setup name="LayoutMobile">
import { appStore, getStoreRefs } from "@/store";
const { themeConfig } = getStoreRefs(appStore.useThemeConfig);
const isThemDark = ref(themeConfig.value.isDark);
</script>

<style scoped lang="scss"></style>

0 comments on commit daf0e36

Please sign in to comment.