Files
vue-ts-example/src/App.vue
严浩 ec4906f441
All checks were successful
/ build-and-deploy-to-vercel (push) Successful in 3m15s
/ surge (push) Successful in 3m32s
/ playwright (push) Successful in 1m3s
/ cleanup_surge (push) Successful in 13s
/ lint-build-and-check (push) Successful in 6m2s
feat: update layout configuration to use naive-ui/AppLayout
2025-07-04 12:06:40 +08:00

42 lines
852 B
Vue

<script setup lang="ts">
import type { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
import { theme } from 'ant-design-vue';
import { useLayout } from './layouts/sakai-vue/composables/layout';
const { isDarkTheme } = useLayout();
const themeConfig = computed(() => {
return {
algorithm: isDarkTheme.value ? theme.darkAlgorithm : theme.defaultAlgorithm,
} satisfies ThemeConfig;
});
</script>
<template>
<n-config-provider preflight-style-disabled>
<a-config-provider :theme="themeConfig">
<RouterView />
</a-config-provider>
</n-config-provider>
<DynamicDialog /> <ConfirmDialog /> <Toast />
</template>
<style>
.layout-wrapper {
isolation: isolate;
}
@supports (height: 100dvh) {
.h-screen {
height: 100dvh;
}
}
@supports (width: 100dvw) {
.w-screen {
width: 100dvw;
}
}
</style>