feat: use composable to unify logic
This commit is contained in:
parent
4de23c31b3
commit
1761cc23e0
|
@ -6,9 +6,9 @@ import { useAttrs } from 'vue';
|
|||
import VnDate from './VnDate.vue';
|
||||
import { useRequired } from 'src/composables/useRequired';
|
||||
|
||||
const $attrs = useAttrs();
|
||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||
const model = defineModel({ type: [String, Date] });
|
||||
const $attrs = useAttrs();
|
||||
const { t } = useI18n();
|
||||
|
||||
const $props = defineProps({
|
||||
|
|
|
@ -5,9 +5,9 @@ import { date } from 'quasar';
|
|||
import VnTime from './VnTime.vue';
|
||||
import { useRequired } from 'src/composables/useRequired';
|
||||
|
||||
const $attrs = useAttrs();
|
||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||
const { t } = useI18n();
|
||||
const $attrs = useAttrs();
|
||||
const model = defineModel({ type: String });
|
||||
const props = defineProps({
|
||||
timeOnly: {
|
||||
|
|
|
@ -7,8 +7,8 @@ import { useAttrs } from 'vue';
|
|||
import { useRequired } from 'src/composables/useRequired';
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['update:model-value', 'update:options']);
|
||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||
const $attrs = useAttrs();
|
||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||
const props = defineProps({
|
||||
location: {
|
||||
type: Object,
|
||||
|
|
Loading…
Reference in New Issue