|
|
@ -273,6 +273,14 @@ const reset = async () => { |
|
|
|
emit('reset', model) |
|
|
|
} |
|
|
|
|
|
|
|
const getSearchFormData = async () => { |
|
|
|
await unref(elFormRef)?.validate() |
|
|
|
const { getFormData } = methods |
|
|
|
const model = await getFormData() |
|
|
|
console.log(model) |
|
|
|
return model |
|
|
|
} |
|
|
|
|
|
|
|
const bottonButtonStyle = computed(() => { |
|
|
|
return { |
|
|
|
textAlign: props.buttomPosition as unknown as 'left' | 'center' | 'right' |
|
|
@ -293,7 +301,7 @@ const onBlur = async (field, e) => { |
|
|
|
} |
|
|
|
const Search = ref() |
|
|
|
onMounted(() => {}) |
|
|
|
defineExpose({setFormValues,search}) // 提供 open 方法,用于打开弹窗 |
|
|
|
defineExpose({setFormValues,search,getSearchFormData}) // 提供 open 方法,用于打开弹窗 |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
@ -319,6 +327,7 @@ defineExpose({setFormValues,search}) // 提供 open 方法,用于打开弹窗 |
|
|
|
> |
|
|
|
<template #action> |
|
|
|
<div v-if="layout === 'inline'"> |
|
|
|
<slot name="actionMoreTop"></slot> |
|
|
|
<!-- update by 芋艿:去除搜索的 type="primary",颜色变淡一点 --> |
|
|
|
<ElButton type="info" plain v-if="showSearch" @click="search"> |
|
|
|
<Icon class="mr-5px" icon="ep:search" /> |
|
|
|