components中设置单独组件, token中所有组件,单独会覆盖所有组件样式
<script setup lang="ts">
import { ConfigProvider, message } from 'ant-design-vue';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
message.config({
top: '60px'
});
</script>
<template>
<ConfigProvider
:locale="zhCN"
:theme="{
components: {
Message: {
colorText: '#fff',
colorBgElevated: '#191932'
},
Tabs: {
colorPrimary: '#009999'
},
Checkbox: {
colorPrimary: '#009999'
}
},
token: {
colorPrimary: '#353F42',
colorPrimaryText: '#EBEBEB',
colorText: '#000000'
}
}">
<router-view></router-view>
</ConfigProvider>
</template>