Commit 25ab3d6759a0b2380cc484c61a7a16926f687183

Authored by 田强
1 parent c2a6ab6f

chore: theme

... ... @@ -17,19 +17,37 @@ export default defineConfig({
17 17 history: {
18 18 type: 'hash'
19 19 },
  20 + locale: {},
20 21 routes,
21 22 alias: {
22 23 '@/src': 'src',
23 24 },
24 25 fastRefresh: {},
25 26 qiankun: {
26   - slave: {},
  27 + slave: {
  28 + },
  29 + master: {
  30 + apps: [
  31 + {
  32 + name: 'rt',
  33 + entry: '//localhost:3000',
  34 + }
  35 + ],
  36 + },
27 37 },
  38 + dynamicImportSyntax: {},
28 39 lessLoader: {
29   - modifyVars: {
30   - 'hack': `true; @import "~@/src/variable.less";`
  40 + globalVars: {
  41 + theme: 'true;@import "~@/src/variable.less"',
31 42 }
32 43 },
  44 + antd: {
  45 + config: {
  46 + }
  47 + },
  48 + theme: {
  49 + 'root-entry-name': 'variable'
  50 + },
33 51 chainWebpack(memo, { env, webpack, createCSSRule }) {
34 52 // 设置 alias
35 53 memo.resolve.alias.set('@', path.resolve(__dirname, './libs/src'));
... ... @@ -42,5 +60,5 @@ export default defineConfig({
42 60 'process.env.wf.appCode': 'wf',
43 61 'process.env.wf.funCode': 'ew57e',
44 62 'process.env.openUrl': '/open',
45   - }
  63 + },
46 64 });
... ...
... ... @@ -15,6 +15,12 @@ export async function getInitialState(): Promise<{}> {
15 15 * @see https://v3.umijs.org/zh-CN/docs/runtime-config#rootcontainerlastrootcontainer-args
16 16 */
17 17 export function rootContainer(container: ReactNode) {
  18 + const { defaultSettings } = window.qx.getModuleData();
  19 + ConfigProvider.config({
  20 + theme: {
  21 + primaryColor: defaultSettings?.primaryColor,
  22 + },
  23 + });
18 24 return (
19 25 <ConfigProvider
20 26 getPopupContainer={() => document.getElementById(name) || document.body}
... ...
1   -
2   -@import '~antd/es/style/themes/default.less';
  1 +@import '~antd/lib/style/themes/variable.less';
... ...