Skip to content
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
12 changes: 7 additions & 5 deletions packages/hap-compiler/src/style/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,18 @@
}
}
// 灵感组件颜色值
const themeColors = [

Check warning on line 403 in packages/hap-compiler/src/style/validator.js

View workflow job for this annotation

GitHub Actions / unit-test

'themeColors' is assigned a value but never used

Check warning on line 403 in packages/hap-compiler/src/style/validator.js

View workflow job for this annotation

GitHub Actions / test-cov

'themeColors' is assigned a value but never used
'uxCardColorBackground',
'uxCardColorAccent',
'uxCardColorTheme',
'uxCardColorContainer',
'uxCardColorHue',
'uxCardColorHueSecondary',
'uxCardColorPrimary',
'uxCardColorQuaternary',
'uxCardColorSecondary',
'uxCardColorSecondaryVariant',
'uxCardColorTertiary'
'uxCardColorTertiary',
'uxCardColorHue',
'uxCardColorHueSecondary'
]
const validator = {
/**
Expand Down Expand Up @@ -2702,12 +2704,12 @@
// font
fontSrc: validator.fontSrc,
fontFamily: validator.fontFamily,
themeColor: makeEnumValidator(themeColors),
/* themeColor: makeEnumValidator(themeColors),
themeBackgroundColor: makeEnumValidator(themeColors),
themeLayerColor: makeEnumValidator(themeColors),
themeTrackColor: makeEnumValidator(themeColors),
themeSelectedColor: makeEnumValidator(themeColors),
themeBlockColor: makeEnumValidator(themeColors),
themeBlockColor: makeEnumValidator(themeColors), */
letterSpacing: validator.letterSpacing
}

Expand Down
5 changes: 3 additions & 2 deletions packages/hap-packager/src/common/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,10 @@ function populateWidgetFields(widgetsObj) {
conf.minPlatformVersion = conf.minCardPlatformVersion
} else if (!conf.minPlatformVersion) {
// 没写 minCardPlatformVersion 和 minPlatformVersion 字段
colorconsole.throw(
// 不填minCardPlatformVersion也能编译
/* colorconsole.throw(
`manifest.json 文件 widgets 字段下,${routePath} 缺少 minCardPlatformVersion 字段`
)
) */
}
}
if (conf.type === 'lite' && !conf.minCardPlatformVersion) {
Expand Down