File tree Expand file tree Collapse file tree 2 files changed +7
-28
lines changed Expand file tree Collapse file tree 2 files changed +7
-28
lines changed Original file line number Diff line number Diff line change 11<script setup lang='ts'>
2- import { FormKit , FormKitSchema } from ' @formkit/vue'
32import JsonEditorVue from ' json-editor-vue'
3+ import { FormKitDataEdit } from ' my-library'
44import { ref } from ' vue'
5- import FormKitDebug from ' ../../../src/components/FormKitDebug.vue'
65import { useMessages } from ' ../../composables/messages'
76
87const props = defineProps <{
@@ -36,21 +35,8 @@ async function submitHandler() {
3635 <slot />
3736 <div class =" flex gap-8 flex-wrap" >
3837 <div class =" min-w-32rem basis-1/2 xl:basis-1/3" >
39- <div class =" p-formkit-data-edit" >
40- <FormKit
41- id =" form"
42- v-model =" formData"
43- :form-class =" formClass"
44- type =" form"
45- submit-label =" Save"
46- :submit-attrs =" {
47- inputClass,
48- }"
49- @submit =" submitHandler"
50- >
51- <FormKitSchema :schema =" formSchema" :data =" formData" />
52- </FormKit >
53- <FormKitDebug :data =" formData" header =" Data" />
38+ <div >
39+ <FormKitDataEdit :data =" formData" :schema =" formSchema" debug-data @data-saved =" submitHandler" />
5440 </div >
5541 </div >
5642 <div class =" basis-1/2 xl:basis-1/3" >
Original file line number Diff line number Diff line change 11<script setup lang='ts'>
2- import { FormKit , FormKitSchema } from ' @formkit/vue'
32import JsonEditorVue from ' json-editor-vue'
3+ import { FormKitDataView } from ' my-library'
4+
45import { ref } from ' vue'
5- import FormKitDebug from ' ../../../src/components/FormKitDebug.vue'
66
77const props = defineProps <{
88 header: string
@@ -24,15 +24,8 @@ const formData = ref(props.data)
2424 <slot />
2525 <div class =" flex flex-wrap gap-8" >
2626 <div class =" min-w-30rem basis-1/3 md:basis-1/4" >
27- <div class =" p-formkit-data-view" >
28- <FormKit
29- v-model =" formData"
30- type =" form"
31- :actions =" false"
32- >
33- <FormKitSchema :schema =" formSchema" :data =" formData" />
34- </FormKit >
35- <FormKitDebug :data =" formData" header =" Data" />
27+ <div >
28+ <FormKitDataView :data =" formData" :schema =" formSchema" debug-data />
3629 </div >
3730 </div >
3831 <div class =" " >
You can’t perform that action at this time.
0 commit comments