24 lines
580 B
Vue
24 lines
580 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>
|
|
<a-config-provider :theme="themeConfig">
|
|
<RouterView />
|
|
</a-config-provider>
|
|
|
|
<DynamicDialog /> <ConfirmDialog /> <Toast />
|
|
</template>
|