antd全局主题变量

304 阅读1分钟

1.config下建立theme.config.ts文件 export default { '@font-size-base': '18px',// 全局字体 }; 2.在config.ts下引入 import theme from './theme.config'; export default defineConfig({ base: '/', history: { type: 'hash', }, routes: routes, links: [{ rel: '', href: '' }], request: { dataField: '', }, proxy: { '/路径': { target: 'http://ip:端口号', changeOrigin: true, pathRewrite: { '^/路径': '/路径' }, }, }, theme, }); 3.修改theme.config.ts文件下的变量即可。 github.com/ant-design/… gitee.com/ant-design/… (国内镜像)