mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Convert to composition API
This commit is contained in:
parent
eaa03d8e72
commit
d2b191ed6e
8 changed files with 109 additions and 172 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue