fix: main btn & select input component props, etc

This commit is contained in:
puriphatt 2024-10-29 17:15:47 +07:00
parent 20254a41e4
commit 06a6bae2ca
2 changed files with 7 additions and 3 deletions

View file

@ -5,7 +5,7 @@ defineEmits<{
(e: 'click', v: MouseEvent): void;
}>();
defineProps<{
icon: string;
icon?: string;
color: string;
iconOnly?: boolean;
solid?: boolean;
@ -30,7 +30,7 @@ defineProps<{
type="button"
>
<slot name="icon">
<Icon :icon class="main-btn-icon" />
<Icon :icon="icon || ''" class="main-btn-icon" />
</slot>
<slot v-if="!iconOnly" />
</button>

View file

@ -3,7 +3,7 @@ import { onMounted, ref, watch } from 'vue';
import { selectFilterOptionRefMod } from 'src/stores/utils';
import { QSelect } from 'quasar';
const model = defineModel<string | null>();
const model = defineModel<string | Record<string, unknown> | null>();
const options = ref<Record<string, unknown>[]>([]);
let defaultFilter: (
@ -91,6 +91,10 @@ watch(
"
:rules
>
<template v-if="$slots.prepend" v-slot:prepend>
<slot name="prepend"></slot>
</template>
<template v-slot:no-option>
<slot name="noOption"></slot>