Refactor #4953 - For ScrollPanel
parent
2b1b235f5e
commit
ae45937af5
|
@ -61,13 +61,20 @@ export default {
|
||||||
outsideClickListener: null,
|
outsideClickListener: null,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: UniqueComponentId(),
|
id: this.$attrs.id,
|
||||||
orientation: 'vertical',
|
orientation: 'vertical',
|
||||||
lastScrollTop: 0,
|
lastScrollTop: 0,
|
||||||
lastScrollLeft: 0
|
lastScrollLeft: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$attrs.id': function (newValue) {
|
||||||
|
this.id = newValue || UniqueComponentId();
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.id = this.id || UniqueComponentId();
|
||||||
|
|
||||||
if (this.$el.offsetParent) {
|
if (this.$el.offsetParent) {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
}
|
}
|
||||||
|
@ -362,7 +369,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
contentId() {
|
contentId() {
|
||||||
return UniqueComponentId() + '_content';
|
return this.id + '_content';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue