refactor: #7090 for Stepper

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

View File

@ -7,7 +7,6 @@
</template> </template>
<script> <script>
import { UniqueComponentId } from '@primevue/core/utils';
import BaseStepper from './BaseStepper.vue'; import BaseStepper from './BaseStepper.vue';
export default { export default {
@ -17,21 +16,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) {