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

一站式一直loading bug修改

上级 9cf50305
...@@ -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}>
......
...@@ -16,14 +16,17 @@ export default { ...@@ -16,14 +16,17 @@ export default {
}, },
effects: { effects: {
*showModal({ payload, callback }, { call, put }) { *showModal({ payload, callback }, { call, put }) {
yield put({ yield put({
type: 'show', type: 'show',
payload: payload, payload: payload,
}); });
if (callback) callback();
if (callback && typeof callback === 'function'){
callback();
}
}, },
*clear({ payload, callback }, { call, put }) { *clear({ payload, callback }, { call, put }) {
...@@ -31,7 +34,9 @@ export default { ...@@ -31,7 +34,9 @@ export default {
type: 'list', type: 'list',
payload: [], payload: [],
}); });
if (callback) callback(); if (callback && typeof callback === 'function'){
callback();
}
}, },
*autoCreate({ payload, callback }, { call, put }) { *autoCreate({ payload, callback }, { call, put }) {
const response = yield call(apiRequest,api+"/autoCreate" ,payload); const response = yield call(apiRequest,api+"/autoCreate" ,payload);
...@@ -246,6 +251,6 @@ export default { ...@@ -246,6 +251,6 @@ export default {
}, },
}, },
}; };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论