Skip to content

Commit

Permalink
fix(theme): 修复主题使用别名切换主题时部分全局样式失效的问题 (#2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxi-20 authored Oct 26, 2024
1 parent 52844a1 commit c69c56c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/theme/build/edit‐dir‐theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ const createTheme = (callbackFn) => {
.replace(/\, \/\//g, '; //')
.replace('{', '') + ';\n}'

newDataStr = baseContent.replace('}', newDataStr)
newDataStr = baseContent.replace('}', newDataStr).replace(
':root',
`@import '../../base/reset.less';
@import '../../base/transition.less';
@import '../../svg/index.less';
:root`
)

writeFile(buildThemePathMap[fileDir] + '/index.less', newDataStr)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-theme",
"version": "3.18.3",
"version": "3.18.4",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
"license": "MIT",
Expand Down Expand Up @@ -87,4 +87,4 @@
]
}
}
}
}

0 comments on commit c69c56c

Please sign in to comment.