Skip to content

Commit

Permalink
fix: support class
Browse files Browse the repository at this point in the history
  • Loading branch information
cafadev committed Aug 2, 2024
1 parent bff23d8 commit b53b2c0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo-quasar/src/viewer/FDateViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const form = useForm({
placeholder: 'Seleccionar',
type: FieldType.datepicker,
wrapper: {
class: 'col-span-12',
class: 'col-span-6',
},
},
},
Expand Down
5 changes: 5 additions & 0 deletions demo-quasar/src/viewer/FTableViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ const table = useTable({
created_at: {
format: (value: unknown) => 'Lo que sea',
},
is_active: {
input: {
isEnable: true
}
},
actions: { value: 'actions', label: '', align: 'left' },
},
settings: {
Expand Down
11 changes: 10 additions & 1 deletion packages/wrapper-quasar/src/form/WqDatepicker.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<q-input v-model="modelValue" mask="date" :error-message="hintText" :hint="hintText" :error="hasFieldErrors">
<q-input v-model="modelValue" mask="date" :error-message="hintText" :hint="hintText" :error="hasFieldErrors" v-bind="attributes">
<template #append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
Expand All @@ -25,5 +25,14 @@ const props = defineProps<{
}>()
const { hintText, modelValue, hasFieldErrors } = useDatepickerField<any>(props)
const attributes = computed(() => {
const { modelValue, rules, type, ...attrs} = props.field
return {
...attrs,
...props.field.wrapper,
}
})
</script>

0 comments on commit b53b2c0

Please sign in to comment.