提交 c8e5d625 authored 作者: 钟是志's avatar 钟是志

28927 校三好学生管理/校三好学生申请,选择“班级/专业”时,滑动页面,它就到天上去了(20192601007,bdk@2022*$)

上级 c0a68ece
...@@ -3,6 +3,8 @@ import { DatePicker } from 'antd'; ...@@ -3,6 +3,8 @@ import { DatePicker } from 'antd';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import getPopupContainer
from '@/webPublic/one_stop_public/tableCompon/Split_Index/getPopupContainer';
export function getMomentArr({ export function getMomentArr({
begin, begin,
...@@ -44,6 +46,7 @@ export default function RangePickerDiy(props) { ...@@ -44,6 +46,7 @@ export default function RangePickerDiy(props) {
value, value,
json, json,
disabled, disabled,
uuid,
} = props; } = props;
const [bindValue, setBindValue] = useState([]); const [bindValue, setBindValue] = useState([]);
...@@ -79,9 +82,7 @@ export default function RangePickerDiy(props) { ...@@ -79,9 +82,7 @@ export default function RangePickerDiy(props) {
showTime={json.showTime != null ? json.showTime : true} showTime={json.showTime != null ? json.showTime : true}
format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'} format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'}
disabled={disabled} disabled={disabled}
getCalendarContainer={() => { getCalendarContainer={getPopupContainer(false, uuid)}
return document.body;
}}
/> />
); );
......
/**
* 28927 校三好学生管理/校三好学生申请,选择“班级/专业”时,滑动页面,它就到天上去了(20192601007,bdk@2022*$)
* 钟是志
* 2022年8月31日
* 没有很好的解决方案
* 如果用表单 的dom 在dom 高度不足时 会直接被遮住
* 还是使用body
* 暂时解决不了
* */
export default function getPopupContainer(isDynamic, uuid) {
if (isDynamic && document.querySelector('#dynamic_div')) {
return () => {
return document.querySelector('#dynamic_div');
};
} else {
return () => document.body;
return () => {
return document.querySelector(`td[data-cell-id="${uuid}"]`) || document.body;
};
}
}
...@@ -81,6 +81,8 @@ import CronEditorDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/C ...@@ -81,6 +81,8 @@ import CronEditorDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/C
import ButtonDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/ButtonDiy'; import ButtonDiy from '@/webPublic/one_stop_public/tableCompon/Split_Index/ButtonDiy';
import giveVarcharRules import giveVarcharRules
from '@/webPublic/one_stop_public/tableCompon/Split_Index/giveVarcharLength'; from '@/webPublic/one_stop_public/tableCompon/Split_Index/giveVarcharLength';
import getPopupContainer
from '@/webPublic/one_stop_public/tableCompon/Split_Index/getPopupContainer';
const { const {
MonthPicker, MonthPicker,
...@@ -3147,13 +3149,7 @@ ${obj[dataColumn.base52]} ...@@ -3147,13 +3149,7 @@ ${obj[dataColumn.base52]}
placeholder={json.placeholder} placeholder={json.placeholder}
style={{ width: json.width }} style={{ width: json.width }}
optionFilterProp="children" optionFilterProp="children"
getPopupContainer={ getPopupContainer={getPopupContainer(this.props.isDynamic, uuid)}
this.props.isDynamic && document.querySelector('#dynamic_div')
? () => {
return document.querySelector('#dynamic_div');
}
: ''
}
onFocus={() => { onFocus={() => {
get === 'mobile' // 移动端取消输入键盘弹出 get === 'mobile' // 移动端取消输入键盘弹出
? setTimeout(() => { ? setTimeout(() => {
...@@ -3261,13 +3257,7 @@ ${obj[dataColumn.base52]} ...@@ -3261,13 +3257,7 @@ ${obj[dataColumn.base52]}
data-cell-uuid-cascader={uuid} data-cell-uuid-cascader={uuid}
showSearch={{ filter: filterF }} showSearch={{ filter: filterF }}
disabled={disabled} disabled={disabled}
getPopupContainer={ getPopupContainer={getPopupContainer(this.props.isDynamic, uuid)}
this.props.isDynamic && document.querySelector('#dynamic_div')
? () => {
return document.querySelector('#dynamic_div');
}
: ''
}
placeholder={json.placeholder} placeholder={json.placeholder}
style={{ width: json.width }} style={{ width: json.width }}
{...otherProps} {...otherProps}
...@@ -3456,7 +3446,7 @@ ${obj[dataColumn.base52]} ...@@ -3456,7 +3446,7 @@ ${obj[dataColumn.base52]}
message: '请选择起止时间', message: '请选择起止时间',
}, },
], ],
})(<RangePickerDiy json={json} disabled={disabled}/>); })(<RangePickerDiy json={json} disabled={disabled} uuid={uuid}/>);
} }
if (json.label == null) title = '起止时间'; if (json.label == null) title = '起止时间';
break; break;
...@@ -3492,9 +3482,7 @@ ${obj[dataColumn.base52]} ...@@ -3492,9 +3482,7 @@ ${obj[dataColumn.base52]}
<DatePicker <DatePicker
disabled={disabled} disabled={disabled}
showTime={json.showTime != null ? json.showTime : true} showTime={json.showTime != null ? json.showTime : true}
getCalendarContainer={() => { getCalendarContainer={getPopupContainer(false, uuid)}
return document.body;
}}
onOpenChange={ onOpenChange={
get === 'mobile' get === 'mobile'
? () => { ? () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论