add .sync support for Dialog and Pagination

This commit is contained in:
Leopoldthecoder
2017-04-29 16:30:08 +08:00
committed by 杨奕
parent d6265daf73
commit defd128f54
13 changed files with 59 additions and 85 deletions

View File

@@ -84,18 +84,10 @@
},
beforeClose: Function
},
data() {
return {
visible: false
};
},
watch: {
value(val) {
this.visible = val;
},
visible(val) {
this.$emit('input', val);
this.$emit('update:visible', val);
if (val) {
this.$emit('open');
this.$el.addEventListener('scroll', this.updatePopper);
@@ -137,7 +129,7 @@
},
mounted() {
if (this.value) {
if (this.visible) {
this.rendered = true;
this.open();
}