LogicFlow icon indicating copy to clipboard operation
LogicFlow copied to clipboard

[Bug Report]: 主题设置的两种方式一同使用时,属性合并不完全

Open wuchenguang1998 opened this issue 10 months ago • 0 comments

发生了什么?

主题设置有两种方式,一种是初始化lf传入,另一种是使用setTheme方法。当两种方式一同使用时,对同一种类型的样式属性不能完全合并。 比如初始化lf时,设置以下属性: style: { inputText: { background: 'blue' }, baseNode: { fill: 'yellow' }, }, 然后使用setTheme,设置以下属性: lf.setTheme({ polyline: { stroke: 'red' }, baseNode: { stroke: 'green' }, }); 这两种方式的设置能合并,但不完全,实际效果是:inputText和polyline的样式都能生效,但baseNode的样式只有stroke: 'green'生效了,而fill: 'yellow'样式没有生效。 复现示例:https://codesandbox.io/p/sandbox/theme-setting-fcd8wv

logicflow/core版本

1.2.24

logicflow/extension版本

1.2.24

logicflow/engine版本

No response

浏览器&环境

No response

wuchenguang1998 avatar Apr 10 '24 15:04 wuchenguang1998