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

一站式 datePicker 组件 bug修改

上级 ef4ca222
...@@ -6,15 +6,15 @@ import { fetchTemplateByCode, fetchTableItem } from '@/webPublic/Services'; ...@@ -6,15 +6,15 @@ import { fetchTemplateByCode, fetchTableItem } from '@/webPublic/Services';
export default function RenderForm({ get = 'web', isCg = 'yes', style, ...rest }) { export default function RenderForm({ get = 'web', isCg = 'yes', style, ...rest }) {
const tableRoot = useRef(); const tableRoot = useRef();
useEffect(() => { useEffect(() => {
// const timerId = setTimeout(() => { const timerId = setTimeout(() => {
// const div = tableRoot.current && tableRoot.current.root; const div = tableRoot.current && tableRoot.current.root;
// if (div) { if (div) {
// div.style.overflow = 'unset'; div.style.overflow = 'unset';
// } }
// }, 0); }, 0);
// return () => { return () => {
// clearTimeout(timerId); clearTimeout(timerId);
// } }
}, []); }, []);
return ( return (
<div className={styles.zyd_onestop_style_class} style={style}> <div className={styles.zyd_onestop_style_class} style={style}>
......
...@@ -791,7 +791,7 @@ export default class tableCom extends Component { ...@@ -791,7 +791,7 @@ export default class tableCom extends Component {
reqUrls[url] = { params: params }; reqUrls[url] = { params: params };
isChange = true; isChange = true;
} }
if (!isChange) { if (!isChange) {
if (callback) { if (callback) {
const data = reqUrls[url].data; const data = reqUrls[url].data;
...@@ -1110,7 +1110,7 @@ export default class tableCom extends Component { ...@@ -1110,7 +1110,7 @@ export default class tableCom extends Component {
fun, fun,
); );
let obj; let obj;
if (!this.props.isEdit && this.props.fatherCode) { if (!this.props.isEdit && this.props.fatherCode) {
obj = { obj = {
...this.props.fatherObj, ...this.props.fatherObj,
...@@ -1125,7 +1125,7 @@ export default class tableCom extends Component { ...@@ -1125,7 +1125,7 @@ export default class tableCom extends Component {
...this.props.defaultValues[this.props.formKey], ...this.props.defaultValues[this.props.formKey],
}; };
} }
const value = fun1( const value = fun1(
obj, obj,
this.props.init, this.props.init,
...@@ -1476,7 +1476,7 @@ export default class tableCom extends Component { ...@@ -1476,7 +1476,7 @@ export default class tableCom extends Component {
); );
} }
if (json.comName == 'PartForm') { if (json.comName == 'PartForm') {
const fk = this.props.form.getFieldValue(this.props.uuid) || json.childFormKey; const fk = this.props.form.getFieldValue(this.props.uuid) || json.childFormKey;
if (fk == null) { if (fk == null) {
...@@ -1485,7 +1485,7 @@ export default class tableCom extends Component { ...@@ -1485,7 +1485,7 @@ export default class tableCom extends Component {
if (formKey == fk) { if (formKey == fk) {
return <>片段表单key不能和自身相同</>; return <>片段表单key不能和自身相同</>;
} }
return ( return (
<> <>
{this.props.form.getFieldDecorator(this.props.uuid, { {this.props.form.getFieldDecorator(this.props.uuid, {
...@@ -1542,7 +1542,7 @@ export default class tableCom extends Component { ...@@ -1542,7 +1542,7 @@ export default class tableCom extends Component {
})(<Input type="hidden" />)} })(<Input type="hidden" />)}
<span <span
style={{ style={{
fontWeight: get == 'mobile' ? 'bold' : '', fontWeight: get == 'mobile' ? 'bold' : '',
marginRight: get == 'mobile' ? 12 : '', marginRight: get == 'mobile' ? 12 : '',
}} }}
...@@ -1560,7 +1560,7 @@ export default class tableCom extends Component { ...@@ -1560,7 +1560,7 @@ export default class tableCom extends Component {
})(<Input type="hidden" />)} })(<Input type="hidden" />)}
<span <span
style={{ style={{
fontWeight: get == 'mobile' ? 'bold' : '', fontWeight: get == 'mobile' ? 'bold' : '',
marginRight: get == 'mobile' ? 12 : '', marginRight: get == 'mobile' ? 12 : '',
}} }}
...@@ -2788,7 +2788,6 @@ export default class tableCom extends Component { ...@@ -2788,7 +2788,6 @@ export default class tableCom extends Component {
: [{ required: required, message: '请选择起止时间' }], : [{ required: required, message: '请选择起止时间' }],
})( })(
<DatePicker <DatePicker
key={Math.random()}
disabled={disabled} disabled={disabled}
showTime={json.showTime != null ? json.showTime : true} showTime={json.showTime != null ? json.showTime : true}
onOpenChange={ onOpenChange={
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论