mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 17:21:53 +08:00
fix: todo
This commit is contained in:
parent
8c5b330cc8
commit
de6fc54626
@ -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: '' }
|
||||
|
@ -1,7 +1,10 @@
|
||||
import { reactive } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const crudSchemas = reactive<VxeCrudSchema>({
|
||||
primaryKey: 'id',
|
||||
primaryType: 'seq',
|
||||
@ -60,8 +63,23 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||
slots: {
|
||||
default: 'resultCode'
|
||||
}
|
||||
},
|
||||
isSearch: true // TODO 星语:这里可能有点特殊,不确定好不好处理哈。管理后台返回的是错误码,最终前台展示的是 成功 or 失败,然后筛选页是这样的
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作结果',
|
||||
field: 'success',
|
||||
isTable: false,
|
||||
search: {
|
||||
show: true,
|
||||
itemRender: {
|
||||
name: '$select',
|
||||
props: { placeholder: t('common.selectText') },
|
||||
options: [
|
||||
{ label: '成功', value: 'true' },
|
||||
{ label: '失败', value: 'false' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作日期',
|
||||
|
Loading…
Reference in New Issue
Block a user