未验证 提交 f5199c2a 编写于 作者: 云淇淋 提交者: GitHub

Merge pull request #1206 from cloudIC/master

feat(datetime-picker): add visible-change and closeOnClickModal
......@@ -11,6 +11,8 @@
<mt-datetime-picker
ref="picker1"
v-model="value"
:closeOnClickModal="false"
@visible-change="handleVisibleChange"
@confirm="handleChange">
</mt-datetime-picker>
<mt-datetime-picker
......@@ -89,6 +91,10 @@
message: '已选择 ' + value.toString(),
position: 'bottom'
});
},
handleVisibleChange(isVisible) {
console.log('弹窗是否展示:', isVisible);
}
}
};
......
<template>
<mt-popup v-model="visible" position="bottom" class="mint-datetime">
<mt-popup v-model="visible" :closeOnClickModal="closeOnClickModal" position="bottom" class="mint-datetime">
<mt-picker
:slots="dateSlots"
@change="onChange"
......@@ -124,6 +124,10 @@
type: Number,
default: 7
},
closeOnClickModal: {
type: Boolean,
default: true
},
value: null
},
......@@ -412,6 +416,10 @@
rims() {
this.generateSlots();
},
visible(val) {
this.$emit('visible-change', val);
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册