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

设计器画布区,如何屏蔽按钮的点击事件 #2223

Closed
lynsun opened this issue Jun 26, 2023 · 2 comments
Closed

设计器画布区,如何屏蔽按钮的点击事件 #2223

lynsun opened this issue Jun 26, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation / 文档优化建议

Comments

@lynsun
Copy link

lynsun commented Jun 26, 2023

使用脚手架初始化的编辑器,在设计器的画布区,选中按钮会触发按钮绑定的点击事件

image

重现步骤:
1 使用脚手架初始化一个编辑器
2 安装依赖,启动项目
3 拖一个button进去,绑定button的点击事件
4 在设计器画布区选中这个按钮,发现触发了按钮之前绑定的点击事件

Environments (please complete the following information) (required): / 请提供如下信息(必填)

  • AliLowCodeEngine version: ^1.1.7
  • AliLowCodeEngineExt version: ^1.0.5
  • Browser: chrome 114
@liujuping
Copy link
Collaborator

liujuping commented Jul 3, 2023

可以通过 config.set('customizeIgnoreSelectors', fun) 配置点击忽略的 selectors。

/**
 * 定制画布中点击被忽略的 selectors,默认值:undefined
 */
  customizeIgnoreSelectors?: (defaultIgnoreSelectors: string[]) => string[];

@liujuping liujuping changed the title 设计器画布区,选中按钮会触发按钮绑定的点击事件 设计器画布区,如何屏蔽按钮的点击事件 Jul 3, 2023
@liujuping liujuping added the documentation Improvements or additions to documentation / 文档优化建议 label Jul 3, 2023
@lynsun
Copy link
Author

lynsun commented Jul 3, 2023

可以通过 config.set('customizeIgnoreSelectors', fun) 配置点击忽略的 selectors。

/**
 * 定制画布中点击被忽略的 selectors,默认值:undefined
 */
  customizeIgnoreSelectors?: (defaultIgnoreSelectors: string[]) => string[];

好的,多谢,我试一下这个配置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation / 文档优化建议
Projects
None yet
Development

No branches or pull requests

2 participants