Skip to content

Commit 94bdba0

Browse files
authored
fix(sub-canvas): background dot fill color (bytedance#437)
1 parent 93aa3e7 commit 94bdba0

File tree

1 file changed

+3
-1
lines changed
  • packages/plugins/free-container-plugin/src/sub-canvas/components/background

1 file changed

+3
-1
lines changed

packages/plugins/free-container-plugin/src/sub-canvas/components/background/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export const SubCanvasBackground: FC = () => {
2424
const dotColor = backgroundConfig.dotColor ?? '#eceeef';
2525
const dotOpacity = backgroundConfig.dotOpacity ?? 0.5;
2626
const backgroundColor = backgroundConfig.backgroundColor ?? '#f2f3f5';
27-
const dotFillColor = backgroundConfig.dotFillColor ?? dotColor;
27+
// 只有当 dotFillColor 被明确设置且与 dotColor 不同时才添加 fill 属性
28+
const dotFillColor =
29+
backgroundConfig.dotFillColor === dotColor ? '' : backgroundConfig.dotFillColor;
2830

2931
// 生成唯一的 pattern ID
3032
const patternId = `sub-canvas-dot-pattern-${node.id}`;

0 commit comments

Comments
 (0)