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

移动端 执行templateWillMount公式 在表单渲染前

这样可以让 表单 Form.create(options) 把options 传入 方便设置回调函数
上级 28f617ad
...@@ -28,6 +28,7 @@ export const fetchTemplateByCode = (code) => ...@@ -28,6 +28,7 @@ export const fetchTemplateByCode = (code) =>
export const fetchTemplateById = (id) => export const fetchTemplateById = (id) =>
uaaRequest('/UnifiedAppApi/getDetail', { id }).then((res) => { uaaRequest('/UnifiedAppApi/getDetail', { id }).then((res) => {
console.log('ggggg');
return prepareShow(res).then((x) => { return prepareShow(res).then((x) => {
return res; return res;
}); });
......
...@@ -72,7 +72,6 @@ export default class DraftEditorCom extends React.Component { ...@@ -72,7 +72,6 @@ export default class DraftEditorCom extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
const value = props.value || {}; const value = props.value || {};
console.log(value);
const editorState = changeToDraftState(value); const editorState = changeToDraftState(value);
this.state = { this.state = {
editorState: editorState, editorState: editorState,
......
...@@ -149,7 +149,7 @@ const myCollect = { ...@@ -149,7 +149,7 @@ const myCollect = {
return; return;
} }
yield call(prepareShow, deepCopy(response)); yield call(prepareShow, deepCopy(response)); // prepareShow( // 执行templateWillMount公式
if (callback) { if (callback) {
callback(response); callback(response);
} }
......
...@@ -103,7 +103,7 @@ const myCollect = { ...@@ -103,7 +103,7 @@ const myCollect = {
yield put({ type: 'nom' }); yield put({ type: 'nom' });
return; return;
} }
yield call(prepareShow, response); yield call(prepareShow, response); // prepareShow( // 执行templateWillMount公式
if (callback) { if (callback) {
callback(response); callback(response);
......
...@@ -801,9 +801,9 @@ export default class tableCom extends Component { ...@@ -801,9 +801,9 @@ export default class tableCom extends Component {
}; };
sqlUtil = (base52, json, orgCallback, sqlKey, params, callback, options = {}) => { sqlUtil = (base52, json, orgCallback, sqlKey, params, callback, options = {}) => {
console.log({ // console.log({
base52, json, orgCallback, sqlKey, params, callback, options // base52, json, orgCallback, sqlKey, params, callback, options
}) // })
//查缓存 //查缓存
var isChange = false; var isChange = false;
...@@ -1526,7 +1526,6 @@ export default class tableCom extends Component { ...@@ -1526,7 +1526,6 @@ export default class tableCom extends Component {
break; break;
case 'Input': case 'Input':
console.log(value);
cm = ( cm = (
<span style={{ paddingRight: get === 'mobile' ? 8 : '' }}> <span style={{ paddingRight: get === 'mobile' ? 8 : '' }}>
{value} {value}
......
...@@ -92,7 +92,6 @@ export default function Index({ ...@@ -92,7 +92,6 @@ export default function Index({
]; ];
editor.create(); editor.create();
console.log(value);
editor.txt.html(value); editor.txt.html(value);
// if (value && value.indexOf('wangEditorHtml') > -1) { // if (value && value.indexOf('wangEditorHtml') > -1) {
......
...@@ -88,7 +88,6 @@ export default function Index({ ...@@ -88,7 +88,6 @@ export default function Index({
]; ];
editor.create(); editor.create();
console.log(value);
if (value && value.indexOf('wangEditorHtml') > -1) { if (value && value.indexOf('wangEditorHtml') > -1) {
editor.txt.html(value); editor.txt.html(value);
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论