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

Popup visible-change 事件中的 visible 与 visiable #90

Closed
vhxubo opened this issue Jan 7, 2022 · 1 comment · Fixed by #91
Closed

Popup visible-change 事件中的 visible 与 visiable #90

vhxubo opened this issue Jan 7, 2022 · 1 comment · Fixed by #91

Comments

@vhxubo
Copy link
Contributor

vhxubo commented Jan 7, 2022

Describe Framework

tdesign-miniprogram

Describe Environment

Any

Describe the bug
文档中 visible-change 事件返回的参数应为 visible, 而在示例代码和组件源码中实际使用的是 visiable

Additional context

| visible-change | `(visible: boolean, context: PopupVisibleChangeContext)` | 当浮层隐藏或显示时触发,`context.trigger` 表示触发来源 |

onVisibleChange({ detail }) {
const { visiable } = detail;
this.setData({
top: visiable,
bottom: visiable,
center: visiable,
left: visiable,
right: visiable,
});
},

onOverlayClick() {
const { closeOnOverlayClick } = this.properties;
if (closeOnOverlayClick) {
this.triggerEvent('visible-change', { visiable: false });
}
}
onCloseClick() {
this.triggerEvent('visible-change', { visiable: false });
}

@LeeJim
Copy link
Collaborator

LeeJim commented Jan 7, 2022

收到,立马处理一下。
统一以文档为准

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants