Skip to content

Commit d53c103

Browse files
feat: add media query scene for oppo card (#145)
* feat: add pictorial for oppo card * feat: add segmented type for progress * fix: remove unused code
1 parent 4a95f03 commit d53c103

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

packages/hap-compiler/src/style/mediaquery.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const featureValidator = {
114114
},
115115
scene(value) {
116116
const reg =
117-
/^(assistantscreen|launcher|globalsearch|calendar|lockscreen|suggestion|voiceassistant|sms|servicecenter|cardesktop)$/
117+
/^(assistantscreen|launcher|globalsearch|calendar|lockscreen|suggestion|voiceassistant|sms|servicecenter|cardesktop|pictorial)$/
118118
if (reg.test(value)) {
119119
return { value }
120120
}
@@ -125,7 +125,7 @@ const featureValidator = {
125125
feature +
126126
'` 的值 `' +
127127
value +
128-
'` 不正确, 必须为 `assistantscreen | launcher | globalsearch | calendar | lockscreen | suggestion | voiceassistant | sms | servicecenter | cardesktop`'
128+
'` 不正确, 必须为 `assistantscreen | launcher | globalsearch | calendar | lockscreen | suggestion | voiceassistant | sms | servicecenter | cardesktop | pictorial`'
129129
)
130130
}
131131
}

packages/hap-compiler/src/style/validator.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -400,19 +400,19 @@ const validateTime = function (v) {
400400
}
401401
}
402402
// 灵感组件颜色值
403-
const themeColors = [
404-
'uxCardColorBackground',
405-
'uxCardColorAccent',
406-
'uxCardColorTheme',
407-
'uxCardColorContainer',
408-
'uxCardColorPrimary',
409-
'uxCardColorQuaternary',
410-
'uxCardColorSecondary',
411-
'uxCardColorSecondaryVariant',
412-
'uxCardColorTertiary',
413-
'uxCardColorHue',
414-
'uxCardColorHueSecondary'
415-
]
403+
// const themeColors = [
404+
// 'uxCardColorBackground',
405+
// 'uxCardColorAccent',
406+
// 'uxCardColorTheme',
407+
// 'uxCardColorContainer',
408+
// 'uxCardColorPrimary',
409+
// 'uxCardColorQuaternary',
410+
// 'uxCardColorSecondary',
411+
// 'uxCardColorSecondaryVariant',
412+
// 'uxCardColorTertiary',
413+
// 'uxCardColorHue',
414+
// 'uxCardColorHueSecondary'
415+
// ]
416416
const validator = {
417417
/**
418418
* 整数校验

packages/hap-compiler/src/template/validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ const tagNatives = {
550550
def: 0
551551
},
552552
type: {
553-
enum: ['horizontal', 'circular', 'round']
553+
enum: ['horizontal', 'circular', 'round', 'segmented']
554554
}
555555
}
556556
},

0 commit comments

Comments
 (0)