refactor: #7090 for Accordion

pull/7007/merge
Mert Sincan 2025-01-14 11:10:02 +00:00
parent 2f8e0ccda1
commit e8105b8971
1 changed files with 0 additions and 8 deletions

View File

@ -28,7 +28,6 @@
</template>
<script>
import { UniqueComponentId } from '@primevue/core/utils';
import ChevronRightIcon from '@primevue/icons/chevronright';
import ChevronUpIcon from '@primevue/icons/chevronup';
import AccordionContent from 'primevue/accordioncontent';
@ -44,14 +43,10 @@ export default {
emits: ['update:value', 'update:activeIndex', 'tab-open', 'tab-close', 'tab-click'],
data() {
return {
id: this.$attrs.id,
d_value: this.value
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
},
value(newValue) {
this.d_value = newValue;
},
@ -64,9 +59,6 @@ export default {
}
}
},
mounted() {
this.id = this.id || UniqueComponentId();
},
methods: {
isItemActive(value) {
return this.multiple ? this.d_value?.includes(value) : this.d_value === value;