Browse Source

默认下拉框

hella_online_20240829
wangyufei 2 months ago
parent
commit
d097a88fc3
  1. 4
      src/hooks/web/useCrudSchemas.ts

4
src/hooks/web/useCrudSchemas.ts

@ -271,6 +271,10 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For
comonentProps = { comonentProps = {
options: options options: options
} }
// 可编辑字典-下拉框默认选中第一条数据 --喜婷
if(options.length>0&&!schemaItem.form?.componentProps?.disabled){
defaultValue = options[0].value
}
if (!(schemaItem.form && schemaItem.form.component)) component = 'Select' if (!(schemaItem.form && schemaItem.form.component)) component = 'Select'
} }

Loading…
Cancel
Save