From 05f869af18c8f457344aaeb2422296c10a94a5c8 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 28 May 2026 23:46:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(widget.js):=20=E6=89=A9=E5=B1=95opts=5Fset?= =?UTF-8?q?=5Fstyle=E6=94=AF=E6=8C=81=E6=9B=B4=E5=A4=9ACSS=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增支持的样式属性: - 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响应式缩放机制 --- bricks/widget.js | 47 ++++++++++++++++++++++++++++++++++++++++++++++- dist/bricks.js | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/bricks/widget.js b/bricks/widget.js index 7fe9873..f5d5d9b 100644 --- a/bricks/widget.js +++ b/bricks/widget.js @@ -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" diff --git a/dist/bricks.js b/dist/bricks.js index 24e9adc..6ba6505 100644 --- a/dist/bricks.js +++ b/dist/bricks.js @@ -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"