Commit 355184c3 authored by 左玲玲's avatar 左玲玲 😬

1725

parent 7fc08338
...@@ -585,7 +585,7 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) { ...@@ -585,7 +585,7 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
formRef?.current?.setFieldsValue({ [curkey]: ifclean }); formRef?.current?.setFieldsValue({ [curkey]: ifclean });
} }
return res?.data?.dataList ?? []; return item.showAll && res?.data?.dataList?.length > 0 ? [{ label: '全部', key: 'all' }, ...res?.data?.dataList] : [];
}} }}
showSearch showSearch
/> />
...@@ -604,13 +604,13 @@ function NolinkSelect({ item, colProps }) { ...@@ -604,13 +604,13 @@ function NolinkSelect({ item, colProps }) {
if (Array.isArray(curoption)) { if (Array.isArray(curoption)) {
options = { options = {
options: [...curoption], options: item.showAll && curoption?.length > 0 ? [{ label: '全部', key: 'all' }] : [...curoption],
}; };
} else if (curoption) { } else if (curoption) {
options = { options = {
request: async (params) => { request: async (params) => {
let list = await doFetch({ url: curoption?.path, params: curoption?.params }); let list = await doFetch({ url: curoption?.path, params: curoption?.params });
return list.data.dataList; return item.showAll && list?.data?.dataList?.length > 0 ? [{ label: '全部', key: 'all' }, ...list?.data?.dataList] : [];
}, },
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment