fix(#4953): use beforeMount to generate unique component id (#4954)

pull/5098/head
Alexander 2024-01-16 14:28:03 +03:00 committed by GitHub
parent 23360e7654
commit e8b5b8f3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 43 additions and 28 deletions

View File

@ -79,7 +79,7 @@ export default {
this.d_activeIndex = newValue;
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
methods: {

View File

@ -223,9 +223,10 @@ export default {
this.autoUpdateModel();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.autoUpdateModel();
},
updated() {

View File

@ -114,9 +114,10 @@ export default {
this.autoUpdateModel();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.autoUpdateModel();
},
beforeUnmount() {

View File

@ -76,9 +76,10 @@ export default {
}
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
if (this.global) {
this.bindDocumentContextMenuListener();
}

View File

@ -110,7 +110,7 @@ export default {
this.id = newValue || UniqueComponentId();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
methods: {

View File

@ -215,9 +215,10 @@ export default {
this.autoUpdateModel();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.autoUpdateModel();
this.bindLabelClickListener();
},

View File

@ -156,9 +156,10 @@ export default {
this.autoUpdateModel();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.autoUpdateModel();
},
methods: {

View File

@ -98,8 +98,10 @@ export default {
}
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.bindMatchMediaListener();
},
beforeUnmount() {

View File

@ -73,9 +73,10 @@ export default {
resizeListener: null,
container: null,
list: null,
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
if (!this.popup) {
this.bindResizeListener();
this.bindOutsideClickListener();

View File

@ -93,8 +93,10 @@ export default {
outsideClickListener: null,
container: null,
menubar: null,
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.bindMatchMediaListener();
},
beforeUnmount() {

View File

@ -241,9 +241,10 @@ export default {
this.autoUpdateModel();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.autoUpdateModel();
},
beforeUnmount() {

View File

@ -116,9 +116,10 @@ export default {
this.reorderDirection = null;
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
if (this.responsive) {
this.createStyle();
}

View File

@ -76,7 +76,7 @@ export default {
this.id = newValue || UniqueComponentId();
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
methods: {

View File

@ -276,9 +276,10 @@ export default {
this.destroyStyle();
this.destroyMedia();
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
if (this.responsive) {
this.createStyle();
this.initMedia();

View File

@ -84,9 +84,10 @@ export default {
this.d_visible = newValue;
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
if (this.type !== 'linear') {
const button = DomHandler.findSingle(this.container, '[data-pc-name="button"]');
const firstItem = DomHandler.findSingle(this.list, '[data-pc-section="menuitem"]');

View File

@ -121,9 +121,10 @@ export default {
this.scrollInView({ index: newValue });
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
mounted() {
this.updateInkBar();
this.scrollable && this.updateButtonState();
},

View File

@ -85,7 +85,7 @@ export default {
}
}
},
mounted() {
beforeMount() {
this.id = this.id || UniqueComponentId();
},
beforeUnmount() {