feat(widget.js): 扩展opts_set_style支持更多CSS属性

新增支持的样式属性:
- borderRadius, borderTopLeftRadius等圆角属性
- border, borderColor, borderWidth, borderStyle等边框属性
- padding方向细分: paddingLeft/Right/Top/Bottom
- flex布局: flexGrow, flex, flexBasis, flexDirection, flexWrap, alignItems, justifyContent, gap, order
- 视觉效果: opacity, boxShadow, textShadow, transition, transform
- 文本: textDecoration, textTransform, whiteSpace, wordBreak
- 其他: pointerEvents, userSelect, objectFit, outline, boxSizing

注意: fontSize/fontWeight不加入keys,保留charsize响应式缩放机制
This commit is contained in:
yumoqing 2026-05-28 23:46:44 +08:00
parent e448d242d7
commit 05f869af18
2 changed files with 92 additions and 2 deletions

View File

@ -120,12 +120,18 @@ bricks.JsWidget = class {
"marginTop",
"marginBottom",
"padding",
"paddingLeft",
"paddingRight",
"paddingTop",
"paddingBottom",
"align",
"textAlign",
"overflowY",
"overflowX",
"overflow",
"flexShrink",
"flexGrow",
"flex",
"minWidth",
"maxWidth",
"minHeight",
@ -137,7 +143,46 @@ bricks.JsWidget = class {
"zIndex",
"overflowX",
"overflowY",
"color"
"color",
"borderRadius",
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomLeftRadius",
"borderBottomRightRadius",
"border",
"borderTop",
"borderBottom",
"borderLeft",
"borderRight",
"borderColor",
"borderWidth",
"borderStyle",
"opacity",
"boxShadow",
"textShadow",
"textDecoration",
"textTransform",
"whiteSpace",
"wordBreak",
"wordWrap",
"overflowWrap",
"gap",
"alignItems",
"alignSelf",
"justifyContent",
"flexDirection",
"flexWrap",
"flexBasis",
"order",
"transition",
"transform",
"pointerEvents",
"userSelect",
"listStyle",
"objectFit",
"objectPosition",
"outline",
"boxSizing"
];
var mapping_keys = {
"bgcolor":"backgroundColor"

47
dist/bricks.js vendored
View File

@ -1272,12 +1272,18 @@ bricks.JsWidget = class {
"marginTop",
"marginBottom",
"padding",
"paddingLeft",
"paddingRight",
"paddingTop",
"paddingBottom",
"align",
"textAlign",
"overflowY",
"overflowX",
"overflow",
"flexShrink",
"flexGrow",
"flex",
"minWidth",
"maxWidth",
"minHeight",
@ -1289,7 +1295,46 @@ bricks.JsWidget = class {
"zIndex",
"overflowX",
"overflowY",
"color"
"color",
"borderRadius",
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomLeftRadius",
"borderBottomRightRadius",
"border",
"borderTop",
"borderBottom",
"borderLeft",
"borderRight",
"borderColor",
"borderWidth",
"borderStyle",
"opacity",
"boxShadow",
"textShadow",
"textDecoration",
"textTransform",
"whiteSpace",
"wordBreak",
"wordWrap",
"overflowWrap",
"gap",
"alignItems",
"alignSelf",
"justifyContent",
"flexDirection",
"flexWrap",
"flexBasis",
"order",
"transition",
"transform",
"pointerEvents",
"userSelect",
"listStyle",
"objectFit",
"objectPosition",
"outline",
"boxSizing"
];
var mapping_keys = {
"bgcolor":"backgroundColor"