Skip to content

Commit

Permalink
fix(x): 兼容 app.uvue 传递多 style 标签 globalStyle 为数组的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto-J authored and zhetengbiji committed Apr 22, 2024
1 parent 9df53a6 commit 4024eda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/runtime-x/src/helpers/useCssStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ export function parseStyleSheet({
const styles: NVueStyle[] = []
if (appContext && __globalStyles) {
// 全局样式,包括 app.css 以及 page.css
styles.push(__globalStyles)
const globalStyles = isArray(__globalStyles)
? __globalStyles
: [__globalStyles]
styles.push(...globalStyles)
}
// 合并页面样式
// TODO 添加额外缓存
Expand Down

0 comments on commit 4024eda

Please sign in to comment.