|
@@ -84,7 +84,7 @@ export interface ColsTreeProps extends DataNode { |
|
@@ -84,7 +84,7 @@ export interface ColsTreeProps extends DataNode { |
84
|
|
84
|
|
85
|
export interface ColSelectProps {
|
85
|
export interface ColSelectProps {
|
86
|
//请求参数,单选多选查询选项等
|
86
|
//请求参数,单选多选查询选项等
|
87
|
- params?: { appCode?: string; funCode: string; useId?: boolean };
|
87
|
+ params?: { appCode?: string; funCode?: string; useId?: boolean };
|
88
|
extract?: any;
|
88
|
extract?: any;
|
89
|
value: MappingValueProps[];
|
89
|
value: MappingValueProps[];
|
90
|
//字段code or id
|
90
|
//字段code or id
|
|
@@ -155,6 +155,7 @@ export interface paramColSelectProps extends ColSelectProps { |
|
@@ -155,6 +155,7 @@ export interface paramColSelectProps extends ColSelectProps { |
155
|
dateSelected?: any; // 时间可选 日期字段
|
155
|
dateSelected?: any; // 时间可选 日期字段
|
156
|
iconText?: string; // Popover-icon 自定义 后面跟随文本
|
156
|
iconText?: string; // Popover-icon 自定义 后面跟随文本
|
157
|
allowClear?: boolean;
|
157
|
allowClear?: boolean;
|
|
|
158
|
+ popupOnBody?: boolean; // 下拉 跟随 body 还是自身
|
158
|
}
|
159
|
}
|
159
|
|
160
|
|
160
|
export const QxFieldSetter: React.FC<paramColSelectProps> = ({
|
161
|
export const QxFieldSetter: React.FC<paramColSelectProps> = ({
|
|
@@ -231,7 +232,7 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({ |
|
@@ -231,7 +232,7 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({ |
231
|
}
|
232
|
}
|
232
|
|
233
|
|
233
|
request(params.appCode ? params.appCode : 'id', params.funCode, _data).then((res: any) => {
|
234
|
request(params.appCode ? params.appCode : 'id', params.funCode, _data).then((res: any) => {
|
234
|
- if (res) {
|
235
|
+ if (!!res?.length) {
|
235
|
setOptions(
|
236
|
setOptions(
|
236
|
res.filter((item: any) => {
|
237
|
res.filter((item: any) => {
|
237
|
item.code = item.code.toString();
|
238
|
item.code = item.code.toString();
|
|
@@ -1269,7 +1270,11 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({ |
|
@@ -1269,7 +1270,11 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({ |
1269
|
<Select
|
1270
|
<Select
|
1270
|
key={props.field}
|
1271
|
key={props.field}
|
1271
|
getPopupContainer={(triggerNode) => {
|
1272
|
getPopupContainer={(triggerNode) => {
|
1272
|
- return triggerNode;
|
1273
|
+ if (props?.popupOnBody) {
|
|
|
1274
|
+ return document.body;
|
|
|
1275
|
+ } else {
|
|
|
1276
|
+ return triggerNode;
|
|
|
1277
|
+ }
|
1273
|
}}
|
1278
|
}}
|
1274
|
className={'select qx-filter-select' + (colsTree ? '' : 'full')}
|
1279
|
className={'select qx-filter-select' + (colsTree ? '' : 'full')}
|
1275
|
mode={
|
1280
|
mode={
|
|
@@ -1369,7 +1374,11 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({ |
|
@@ -1369,7 +1374,11 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({ |
1369
|
<Select
|
1374
|
<Select
|
1370
|
className={'select ' + (colsTree ? '' : 'full')}
|
1375
|
className={'select ' + (colsTree ? '' : 'full')}
|
1371
|
getPopupContainer={(triggerNode) => {
|
1376
|
getPopupContainer={(triggerNode) => {
|
1372
|
- return triggerNode;
|
1377
|
+ if (props?.popupOnBody) {
|
|
|
1378
|
+ return document.body;
|
|
|
1379
|
+ } else {
|
|
|
1380
|
+ return triggerNode;
|
|
|
1381
|
+ }
|
1373
|
}}
|
1382
|
}}
|
1374
|
placeholder="请选择"
|
1383
|
placeholder="请选择"
|
1375
|
mode={Boolean(isMultiple) ? 'multiple' : undefined}
|
1384
|
mode={Boolean(isMultiple) ? 'multiple' : undefined}
|