Fixed #3558 - Unique values created in components are set incorrectly.

This commit is contained in:
mertsincan 2023-01-19 04:01:03 +00:00
parent 86a34cde87
commit 2da56f7ed9
18 changed files with 120 additions and 52 deletions

View file

@ -78,14 +78,21 @@ export default {
},
data() {
return {
id: this.$attrs.id,
d_activeIndex: this.activeIndex
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
},
activeIndex(newValue) {
this.d_activeIndex = newValue;
}
},
mounted() {
this.id = this.id || UniqueComponentId();
},
methods: {
isAccordionTab(child) {
return child.type.name === 'AccordionTab';
@ -255,9 +262,6 @@ export default {
return tabs;
}, []);
},
id() {
return this.$attrs.id || UniqueComponentId();
}
},
directives: {