fix: todo

This commit is contained in:
xingyu
2022-11-17 23:45:47 +08:00
parent 8c5b330cc8
commit de6fc54626
2 changed files with 31 additions and 5 deletions

View File

@ -118,9 +118,17 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => {
if (schemaItem?.isSearch || schemaItem.search?.show) {
let itemRenderName = schemaItem?.search?.itemRender?.name || '$input'
const options: any[] = []
let itemRender: FormItemRenderOptions = {
name: itemRenderName,
props: { placeholder: t('common.inputText') }
let itemRender: FormItemRenderOptions
if (schemaItem.search?.itemRender) {
itemRender = schemaItem.search.itemRender
} else {
itemRender = {
name: itemRenderName,
props:
itemRenderName == '$input'
? { placeholder: t('common.inputText') }
: { placeholder: t('common.selectText') }
}
}
if (schemaItem.dictType) {
const allOptions = { label: '全部', value: '' }