Skip to content

Commit c69c56c

Browse files
authored
fix(theme): 修复主题使用别名切换主题时部分全局样式失效的问题 (#2395)
1 parent 52844a1 commit c69c56c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/theme/build/edit‐dir‐theme.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,13 @@ const createTheme = (callbackFn) => {
232232
.replace(/\, \/\//g, '; //')
233233
.replace('{', '') + ';\n}'
234234

235-
newDataStr = baseContent.replace('}', newDataStr)
235+
newDataStr = baseContent.replace('}', newDataStr).replace(
236+
':root',
237+
`@import '../../base/reset.less';
238+
@import '../../base/transition.less';
239+
@import '../../svg/index.less';
240+
:root`
241+
)
236242

237243
writeFile(buildThemePathMap[fileDir] + '/index.less', newDataStr)
238244
}

packages/theme/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opentiny/vue-theme",
3-
"version": "3.18.3",
3+
"version": "3.18.4",
44
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
55
"author": "OpenTiny Team",
66
"license": "MIT",
@@ -87,4 +87,4 @@
8787
]
8888
}
8989
}
90-
}
90+
}

0 commit comments

Comments
 (0)