|
|
@ -21,7 +21,7 @@ import { set } from 'lodash-es' |
|
|
|
import { FormProps } from './types' |
|
|
|
import { Icon } from '@/components/Icon' |
|
|
|
import { FormSchema, FormSetPropsType } from '@/types/form' |
|
|
|
import { Search } from '@element-plus/icons-vue' |
|
|
|
import { Search,CircleClose } from '@element-plus/icons-vue' |
|
|
|
|
|
|
|
const { getPrefixCls } = useDesign() |
|
|
|
|
|
|
@ -245,7 +245,18 @@ export default defineComponent({ |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<ElTooltip placement="top" content={formModel.value[item.field]} > |
|
|
|
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} /> |
|
|
|
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} v-slots={{ |
|
|
|
suffix: () => ( |
|
|
|
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{ |
|
|
|
if(Array.isArray(formModel.value[item.field])){ |
|
|
|
formModel.value[item.field] = [] |
|
|
|
}else{ |
|
|
|
formModel.value[item.field] = '' |
|
|
|
} |
|
|
|
}}> |
|
|
|
</ElButton> |
|
|
|
) |
|
|
|
}}/> |
|
|
|
</ElTooltip> |
|
|
|
<ElButton icon={Search} onClick={()=>{ |
|
|
|
opensearchTable( |
|
|
@ -263,7 +274,20 @@ export default defineComponent({ |
|
|
|
formItemSlotsSearchList[item.field] = () => { |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} /> |
|
|
|
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} v-slots={{ |
|
|
|
suffix: () => ( |
|
|
|
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{ |
|
|
|
if(Array.isArray(formModel.value[item.field])){ |
|
|
|
formModel.value[item.field] = [] |
|
|
|
}else{ |
|
|
|
formModel.value[item.field] = '' |
|
|
|
} |
|
|
|
}}> |
|
|
|
</ElButton> |
|
|
|
) |
|
|
|
}}> |
|
|
|
</ElInput> |
|
|
|
|
|
|
|
<ElButton icon={Search} onClick={()=>{ |
|
|
|
opensearchTable( |
|
|
|
item.field, item?.componentProps?.searchField, |
|
|
|