mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
add .sync support for Dialog and Pagination
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user