Popover: fix visible

This commit is contained in:
qingwei.li
2016-09-02 19:32:17 +08:00
parent 3a6e663857
commit b808879ddb
4 changed files with 9 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ export default {
offset: {
default: 0
},
visible: Boolean,
value: Boolean,
visibleArrow: Boolean,
transition: String,
options: {
@@ -41,15 +41,17 @@ export default {
},
watch: {
visible: {
value: {
immediate: true,
handler(val) {
this.showPopper = val;
this.$emit('input', val);
}
},
showPopper(val) {
val ? this.updatePopper() : this.destroyPopper();
this.$emit('input', val);
}
},