未验证 提交 0acf1e06 编写于 作者: Y yangjinjun3 提交者: GitHub

feat(menu): 小程序添加open和close方法 (#1985)

上级 29116afa
......@@ -106,7 +106,7 @@ export default create({
[Popup.name]: Popup,
NutScrollView
},
emits: ['update:modelValue', 'change'],
emits: ['update:modelValue', 'change', 'open', 'close'],
setup(props, { emit, slots }) {
const state = reactive({
zIndex: _zIndex,
......@@ -169,6 +169,7 @@ export default create({
if (show) {
state.showWrapper = true;
emit('open');
state.zIndex = ++_zIndex;
}
};
......@@ -194,12 +195,14 @@ export default create({
};
const handleClose = () => {
emit('close');
state.showWrapper = false;
state.isShowPlaceholderElement = false;
};
const handleClickOutside = () => {
state.showPopup = false;
emit('close');
};
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册