Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

造物平台生成的低代码组件怎么暴露属性和方法给外部调用? #2410

Open
zhuyuanmin opened this issue Aug 26, 2023 · 4 comments
Assignees
Labels
discussion Discussion / 方案探讨

Comments

@zhuyuanmin
Copy link

造物平台生成的低代码组件怎么暴露属性和方法给外部调用?

@eternalsky
Copy link
Collaborator

定义属性就可以了

@zhuyuanmin
Copy link
Author

定义属性就可以了

咱们理解上可能有偏差。我的意思是外部组件可以通过ref调到当前组件的属性或者方法。跟高码类似。怎么通过ref暴露

@eternalsky
Copy link
Collaborator

一般来说,组件对外通信都是通过属性来暴露的。对内可以是 value,对外可以是 onChange。ref 这种可以试下,在js 面板里定义方法看看。

@eternalsky eternalsky added the discussion Discussion / 方案探讨 label Sep 5, 2023
@zhuyuanmin
Copy link
Author

一般来说,组件对外通信都是通过属性来暴露的。对内可以是 value,对外可以是 onChange。ref 这种可以试下,在js 面板里定义方法看看。

试过了,外部无法通过 组件的refId 获取其方法和属性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion / 方案探讨
Projects
None yet
Development

No branches or pull requests

2 participants