wz-h5-design 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,14 @@ export interface TagProps {
19
19
  * @description 背景颜色,type='solid' 时生效
20
20
  */
21
21
  bgColor?: string;
22
+ /**
23
+ * @description 边框颜色,type='line' 时生效
24
+ */
25
+ borderColor?: string;
26
+ /**
27
+ * @description 圆角大小
28
+ */
29
+ borderRadius?: number | string;
22
30
  /**
23
31
  * @description 字体粗细
24
32
  */
@@ -1327,8 +1327,8 @@ const Divider = ({
1327
1327
  className: `wz-divider wz-divider--${direction} ${className}`,
1328
1328
  style: {
1329
1329
  background: color || defaultColor,
1330
- width: isVertical ? 2 : length || "100%",
1331
- height: isVertical ? length || 24 : 2,
1330
+ width: isVertical ? 1 : length || "100%",
1331
+ height: isVertical ? length || 16 : 2,
1332
1332
  margin,
1333
1333
  ...style
1334
1334
  }
@@ -2198,28 +2198,41 @@ const Tag = (props) => {
2198
2198
  size = "large",
2199
2199
  color,
2200
2200
  bgColor,
2201
+ borderColor,
2202
+ borderRadius,
2201
2203
  fontWeight,
2202
2204
  className,
2203
2205
  style,
2204
2206
  children
2205
2207
  } = props;
2206
- const classes = classNames("wz-tag", `wz-tag-${type}`, `wz-tag-${size}`, className);
2208
+ const classes = classNames(
2209
+ "wz-tag",
2210
+ `wz-tag-${type}`,
2211
+ `wz-tag-${size}`,
2212
+ className
2213
+ );
2207
2214
  const tagStyle = useMemo(() => {
2208
2215
  const newStyle = { ...style };
2209
2216
  if (color) {
2210
2217
  newStyle.color = color;
2211
- if (type === "line") {
2218
+ if (type === "line" && !borderColor) {
2212
2219
  newStyle.borderColor = hexToRgba(color, 0.5);
2213
2220
  }
2214
2221
  }
2215
- if (bgColor && type === "solid") {
2222
+ if (borderColor && type === "line") {
2223
+ newStyle.borderColor = borderColor;
2224
+ }
2225
+ if (bgColor) {
2216
2226
  newStyle.backgroundColor = bgColor;
2217
2227
  }
2228
+ if (borderRadius !== void 0) {
2229
+ newStyle.borderRadius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
2230
+ }
2218
2231
  if (fontWeight) {
2219
2232
  newStyle.fontWeight = fontWeight;
2220
2233
  }
2221
2234
  return newStyle;
2222
- }, [type, color, bgColor, fontWeight, style]);
2235
+ }, [type, color, bgColor, borderColor, borderRadius, fontWeight, style]);
2223
2236
  return /* @__PURE__ */ jsx("div", { className: classes, style: tagStyle, children });
2224
2237
  };
2225
2238
  const Tip = ({