mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-28 18:05:08 +08:00
fix: 修复Search组件无法默认值
This commit is contained in:
@ -33,7 +33,11 @@ const props = defineProps({
|
||||
expand: propTypes.bool.def(false),
|
||||
// 伸缩的界限字段
|
||||
expandField: propTypes.string.def(''),
|
||||
inline: propTypes.bool.def(true)
|
||||
inline: propTypes.bool.def(true),
|
||||
model: {
|
||||
type: Object as PropType<Recordable>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['search', 'reset'])
|
||||
@ -62,7 +66,9 @@ const newSchema = computed(() => {
|
||||
return schema
|
||||
})
|
||||
|
||||
const { register, elFormRef, methods } = useForm()
|
||||
const { register, elFormRef, methods } = useForm({
|
||||
model: props.model || {}
|
||||
})
|
||||
|
||||
const search = async () => {
|
||||
await unref(elFormRef)?.validate(async (isValid) => {
|
||||
|
Reference in New Issue
Block a user