-
我加了两个自定义组件,可以让用户拖放到编辑区:
因为这个设计器,是给编辑用的。当编辑设置好了第一个组件的 id后,如果编辑把第二个组件拖动到了编辑区,那么这第二个组件就自动使用第一个组件的id,不需要切换到预览窗口。 |
Beta Was this translation helpful? Give feedback.
Answered by
scil
Nov 11, 2022
Replies: 1 comment
-
突然开窍了 这种联动不需要陷入到设计器或者 formily里头去。其实从 React角度解决就行。 目前我用 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
scil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
突然开窍了 这种联动不需要陷入到设计器或者 formily里头去。其实从 React角度解决就行。 目前我用
import { observable } from '@formily/reactive'
来定义要共享的数据,在自定义组件内,用'@formily/reactive-react'
提供的observer
来显示数据。