Merge pull request #5486 from i7slegend/fix/5412-twice-render

Fix #5412 - Twice render if attribute id not defined
This commit is contained in:
Tuğçe Küçükoğlu 2024-04-03 17:45:37 +03:00 committed by GitHub
commit 52fc48780a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 151 additions and 120 deletions

View file

@ -71,8 +71,11 @@ export default {
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
'$attrs.id': {
immediate: true,
handler: function (newValue) {
this.id = newValue || UniqueComponentId();
}
},
activeItemPath(newPath) {
if (!this.popup) {
@ -86,9 +89,6 @@ export default {
}
}
},
mounted() {
this.id = this.id || UniqueComponentId();
},
beforeUnmount() {
this.unbindOutsideClickListener();
this.unbindResizeListener();