Convert to composition API

This commit is contained in:
Mert Sincan 2024-10-23 22:57:52 +01:00
parent eaa03d8e72
commit d2b191ed6e
8 changed files with 109 additions and 172 deletions

View file

@ -4,18 +4,10 @@
</label>
</template>
<script>
export default {
name: 'DynamicFormLabel',
inject: {
$fcDynamicFormField: {
default: undefined
}
},
computed: {
htmlFor() {
return this.$fcDynamicFormField?.$props.groupId;
}
}
};
<script setup>
import { computed, inject } from 'vue';
const $fcDynamicFormField = inject('$fcDynamicFormField', undefined);
const htmlFor = computed(() => $fcDynamicFormField?.groupId);
</script>