refactor: #7090 for Accordion
parent
2f8e0ccda1
commit
e8105b8971
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue