修复 搜索组件
This commit is contained in:
parent
94fafa8cab
commit
2ec371bd9a
|
|
@ -97,6 +97,10 @@ const setVisible = () => {
|
|||
unref(elFormRef)?.resetFields()
|
||||
visible.value = !unref(visible)
|
||||
}
|
||||
defineExpose({
|
||||
reset,
|
||||
search
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -131,8 +135,8 @@ const setVisible = () => {
|
|||
<slot name="actionMore"></slot>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="name in Object.keys($slots)" :key="name" #[name]>
|
||||
<slot :name="name"></slot>
|
||||
<template v-for="name in Object.keys($slots)" :key="name" #[name]="data">
|
||||
<slot :name="name" :data="data" ></slot>
|
||||
</template>
|
||||
</Form>
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const visible = ref(true)
|
|||
const newSchema = computed(() => {
|
||||
let schema: FormSchema[] = cloneDeep(props.schema)
|
||||
if (props.expand && props.expandField && !unref(visible)) {
|
||||
const index = findIndex(schema, (v: FormSchema) => props.expandField.indexOf(v.field) === -1)
|
||||
const index = findIndex(schema, (v: FormSchema) => v.field === props.expandField)
|
||||
if (index > -1) {
|
||||
const length = schema.length
|
||||
schema.splice(index + 1, length)
|
||||
|
|
|
|||
Loading…
Reference in New Issue