Skip to content

修改version版本取值方式,灵感组件id更新 #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions packages/hap-compiler/src/style/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,21 +401,15 @@ const validateTime = function (v) {
}
// 灵感组件颜色值
const themeColors = [
'uxCardColorTheme',
'uxCardColorBackground',
'uxCardColorAccent',
'uxCardColorPrimary',
'uxCardColorSecondary',
'uxCardColorSecondaryVariant',
'uxCardColorTertiary',
'uxCardColorQuaternary',
'uxCardColorContainer',
'uxCardBackground',
'uxCardColorHue',
'uxCardColorHueSecondary',
'uxIconColorAccent',
'uxIconColorPrimary',
'uxIconColorSecondary',
'uxIconColorBackground'
'uxCardColorPrimary',
'uxCardColorQuaternary',
'uxCardColorSecondaryVariant',
'uxCardColorTertiary'
]
const validator = {
/**
Expand Down Expand Up @@ -2711,9 +2705,8 @@ const validatorMap = {
themeColor: makeEnumValidator(themeColors),
themeBackgroundColor: makeEnumValidator(themeColors),
themeLayerColor: makeEnumValidator(themeColors),
themeThumbColor: makeEnumValidator(themeColors),
themeTrackColor: makeEnumValidator(themeColors),
themeSelectColor: makeEnumValidator(themeColors),
themeSelectedColor: makeEnumValidator(themeColors),
themeBlockColor: makeEnumValidator(themeColors),
letterSpacing: validator.letterSpacing
}
Expand Down
2 changes: 1 addition & 1 deletion packages/hap-server/src/preview/create-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default async function createRouter(previewTarget) {
type,
script,
scriptNotFound: !scriptExists(script),
webJsUrl: genWebJsUrl(ctx.conf.options.webVersion),
webJsUrl: genWebJsUrl(browerOptions.options.version || ctx.conf.options.webVersion), // 更改预览版本号修改为同媒介查询一样的传参方式,同时兼容之前的方式
language: currentLanguage,
mediaQueryParams: JSON.stringify(mediaQueryParams) // 传给页面的媒介查询参数
})
Expand Down