|
@@ -1,5 +1,5 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { computed } from 'vue';
|
|
|
|
|
|
|
+import { computed, watch } from 'vue';
|
|
|
|
|
|
|
|
import { useAntdDesignTokens } from '@vben/hooks';
|
|
import { useAntdDesignTokens } from '@vben/hooks';
|
|
|
import { preferences, usePreferences } from '@vben/preferences';
|
|
import { preferences, usePreferences } from '@vben/preferences';
|
|
@@ -28,6 +28,14 @@ const tokenTheme = computed(() => {
|
|
|
token: tokens,
|
|
token: tokens,
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+watch(
|
|
|
|
|
+ tokenTheme,
|
|
|
|
|
+ (themeConfig) => {
|
|
|
|
|
+ ConfigProvider.config({ theme: themeConfig });
|
|
|
|
|
+ },
|
|
|
|
|
+ { immediate: true },
|
|
|
|
|
+);
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|