Closed eevin closed 4 years ago
经常一提问就找到了答案
getSelectedStyle(item) { return { // lineWidth: 5, stroke: 'red', }; },
经常一提问就找到了答案
getSelectedStyle(item) { return { // lineWidth: 5, stroke: 'red', }; },
有效果? 不是操作完之后就没了样式了?
@moxiewf 是的操作完成就没效果了。 如果不使用FlowItemPanel 组件也是有效果的,或者重写getActivedStyle 才得行。
getSelectedStyle(item) { return { stroke: 'red', lineWidth: 3, }; }, getActivedStyle(item) { return !item.isSelected ? { stroke: '#44C0FF', lineWidth: 3, } : {}; }
但是这种写法选中后箭头会消失。 哎,文档缺失,版本低,实在太痛苦了。 这次之后直接使用G6吧,不在偷懒了。想找个东西太难。
@moxiewf 是的操作完成就没效果了。 如果不使用FlowItemPanel 组件也是有效果的,或者重写getActivedStyle 才得行。
getSelectedStyle(item) { return { stroke: 'red', lineWidth: 3, }; }, getActivedStyle(item) { return !item.isSelected ? { stroke: '#44C0FF', lineWidth: 3, } : {}; }
但是这种写法选中后箭头会消失。 哎,文档缺失,版本低,实在太痛苦了。 这次之后直接使用G6吧,不在偷懒了。想找个东西太难。
是的,各种写法都不行…… 十分感谢大佬指导
Ant Pro中的选中效果实在不明显。甲方爸爸要求调整。
自定义边中stroke,lineWidth,lineAppendWidth 等都没问题。 假如设置lineWidth > 1 取消选中后,lineWidth会变成1。
在边的定义中添加setState 却无法监听到状态的改变