File tree Expand file tree Collapse file tree 7 files changed +26
-17
lines changed Expand file tree Collapse file tree 7 files changed +26
-17
lines changed Original file line number Diff line number Diff line change 55</template >
66
77<script setup lang="ts">
8- import CP1 from " ./views/FormFieldsTest .vue" ;
8+ import CP1 from " ./views/ModalFormTest .vue" ;
99 </script >
Original file line number Diff line number Diff line change 2020 </div >
2121 <div class =" ml-3 text-sm" >
2222 <label
23- :for =" option.name "
23+ :for =" `${id}-${index}` "
2424 class =" font-medium text-gray-700 cursor-pointer"
2525 >
2626 {{ option.name }}
Original file line number Diff line number Diff line change 2020 <slot :name =" name" v-bind =" slotData" />
2121 </template >
2222 </FormFields >
23- <slot name =" bottom" />
2423 <div class =" flex items-center justify-end pt-2 print:hidden" >
25- <ButtonBlue v-if =" submit" type =" submit" :loading =" loading" >
24+ <ButtonNormal v-if =" submit" type =" submit" :loading =" loading" >
2625 {{ submit }}
27- </ButtonBlue >
26+ </ButtonNormal >
2827 </div >
2928 </div >
3029 </form >
3130</template >
3231
3332<script lang="ts" setup>
34- import ButtonBlue from " ./ButtonNormal.vue" ;
33+ import ButtonNormal from " ./ButtonNormal.vue" ;
3534import { ref , toRefs } from " vue" ;
3635import { RequestFunction } from " ../types/shared" ;
3736import { FormField } from " ../types/form" ;
Original file line number Diff line number Diff line change 1616 @cancel =" $emit('update:modelValue', false)"
1717 @change =" $emit('change', $event)"
1818 >
19- <template # bottom >
20- <slot name =" bottom " />
19+ <template v-for = " ( _ , name ) in $slots " #[ name ]= " slotData " >
20+ <slot : name =" name " v-bind = " slotData " />
2121 </template >
2222 </FormGenerator >
2323 </ModalFree >
Original file line number Diff line number Diff line change 44 :title =" title"
55 @update:model-value =" $emit('update:modelValue', $event)"
66 >
7- <p v-if =" $slots.default" class =" mb-5 text-sm text-gray-500 break-words" >
8- <slot />
9- </p >
107 <FormGenerator
118 :fields =" fields"
129 :data =" data"
1714 @success =" $emit('success', $event)"
1815 @cancel =" $emit('update:modelValue', false)"
1916 @change =" $emit('change', $event)"
20- />
17+ >
18+ <template v-for =" (_ , name ) in $slots " #[name ]=" slotData " >
19+ <slot :name =" name" v-bind =" slotData" />
20+ </template >
21+ </FormGenerator >
2122 </ModalFree >
2223</template >
2324
Original file line number Diff line number Diff line change 1616 @cancel =" emit('update:modelValue', false)"
1717 @change =" emit('change', $event)"
1818 >
19- <template # bottom >
20- <slot name =" bottom " />
19+ <template v-for = " ( _ , name ) in $slots " #[ name ]= " slotData " >
20+ <slot : name =" name " v-bind = " slotData " />
2121 </template >
2222 </FormGenerator >
2323 </ModalFree >
Original file line number Diff line number Diff line change @@ -20,11 +20,20 @@ const open = ref(true);
2020
2121const fields: FormField [] = [
2222 {
23- label: " Force Delete " ,
23+ label: " Options " ,
2424 name: " force_delete" ,
2525 type: " checkbox" ,
26- helptext:
27- " If this checkbox is set the content inside the data sheets will be deleted as well." ,
26+ helptext: " These options add conditions on how to delete the object." ,
27+ options: [
28+ {
29+ name: " Force Delete" ,
30+ value: " force_delete" ,
31+ },
32+ {
33+ name: " Delete Instantly" ,
34+ value: " delete_instantly" ,
35+ },
36+ ],
2837 },
2938];
3039 </script >
You can’t perform that action at this time.
0 commit comments