feat: type defineEmits for ProjectSearch
This commit is contained in:
parent
9d2e79f725
commit
f38a5c9220
@ -37,11 +37,13 @@ const props = withDefaults(defineProps<{
|
|||||||
modelValue?: IProject
|
modelValue?: IProject
|
||||||
savedFiltersOnly?: boolean
|
savedFiltersOnly?: boolean
|
||||||
}>(), {
|
}>(), {
|
||||||
modelValue: new ProjectModel(),
|
modelValue: () => new ProjectModel(),
|
||||||
savedFiltersOnly: false,
|
savedFiltersOnly: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue'])
|
const emit = defineEmits<{
|
||||||
|
'update:modelValue': [value: IProject]
|
||||||
|
}>()
|
||||||
|
|
||||||
const project = reactive<IProject>(new ProjectModel())
|
const project = reactive<IProject>(new ProjectModel())
|
||||||
|
|
||||||
@ -55,6 +57,7 @@ watch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const projectStore = useProjectStore()
|
const projectStore = useProjectStore()
|
||||||
|
|
||||||
const foundProjects = ref<IProject[]>([])
|
const foundProjects = ref<IProject[]>([])
|
||||||
function findProjects(query: string) {
|
function findProjects(query: string) {
|
||||||
if (query === '') {
|
if (query === '') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user