refactor: #7090 for Tabs

pull/7064/merge
Mert Sincan 2025-01-14 11:13:25 +00:00
parent 60c596db96
commit 0252af5a20
1 changed files with 0 additions and 8 deletions

View File

@ -5,7 +5,6 @@
</template> </template>
<script> <script>
import { UniqueComponentId } from '@primevue/core/utils';
import BaseTabs from './BaseTabs.vue'; import BaseTabs from './BaseTabs.vue';
export default { export default {
@ -15,21 +14,14 @@ export default {
emits: ['update:value'], emits: ['update:value'],
data() { data() {
return { return {
id: this.$attrs.id,
d_value: this.value d_value: this.value
}; };
}, },
watch: { watch: {
'$attrs.id'(newValue) {
this.id = newValue || UniqueComponentId();
},
value(newValue) { value(newValue) {
this.d_value = newValue; this.d_value = newValue;
} }
}, },
mounted() {
this.id = this.id || UniqueComponentId();
},
methods: { methods: {
updateValue(newValue) { updateValue(newValue) {
if (this.d_value !== newValue) { if (this.d_value !== newValue) {