提交 89bee666 authored 作者: 徐立's avatar 徐立

关闭移动端input

上级 76b9d6bc
...@@ -215,6 +215,7 @@ export default class isNewTable extends Component { ...@@ -215,6 +215,7 @@ export default class isNewTable extends Component {
style={{ style={{
...style, ...style,
}} }}
border={false}
> >
{item.map((ary, j) => { {item.map((ary, j) => {
if (!ary.content) { if (!ary.content) {
......
...@@ -27,8 +27,8 @@ import { ...@@ -27,8 +27,8 @@ import {
notification, notification,
} from 'antd'; } from 'antd';
import QRCode from 'qrcode.react'; import QRCode from 'qrcode.react';
import {EditorState,Editor} from 'draft-js'; import { EditorState, Editor } from 'draft-js';
import MyBlockRenderer from '../App/MyBlockRender' import MyBlockRenderer from '../App/MyBlockRender';
import { import {
InputItem as MobileInputItem, InputItem as MobileInputItem,
ImagePicker as MobileImagePicker, ImagePicker as MobileImagePicker,
...@@ -64,7 +64,7 @@ import { date } from '../libs/formList/config'; ...@@ -64,7 +64,7 @@ import { date } from '../libs/formList/config';
import Highlighter from 'react-highlight-words'; import Highlighter from 'react-highlight-words';
import Signature from '../Signature'; import Signature from '../Signature';
import baseX from 'base-x'; import baseX from 'base-x';
import {changeToDraftState} from '../utils/myutils' import { changeToDraftState } from '../utils/myutils';
const Bs64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; const Bs64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
const base64 = baseX(Bs64); const base64 = baseX(Bs64);
import { Base16Encode } from '../Base16/index'; import { Base16Encode } from '../Base16/index';
...@@ -137,7 +137,7 @@ export default class tableCom extends Component { ...@@ -137,7 +137,7 @@ export default class tableCom extends Component {
sqlModel: {}, sqlModel: {},
columns: [], columns: [],
sqlContent: null, sqlContent: null,
modalProps:{}, modalProps: {},
modalTitle: '', modalTitle: '',
modalInit: {}, modalInit: {},
modalCode: null, modalCode: null,
...@@ -156,14 +156,19 @@ export default class tableCom extends Component { ...@@ -156,14 +156,19 @@ export default class tableCom extends Component {
callback: callback, callback: callback,
}); });
}; };
showModal = (fk, title, data,modalProps) => { showModal = (fk, title, data, modalProps) => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
type: 'DataColumn/showModal', type: 'DataColumn/showModal',
payload: { isShowModal: true }, payload: { isShowModal: true },
callback: () => { callback: () => {
this.setState({ modalInit: data, modalTitle: title, modalCode: fk,modalProps:modalProps }); this.setState({
modalInit: data,
modalTitle: title,
modalCode: fk,
modalProps: modalProps,
});
}, },
}); });
}; };
...@@ -234,7 +239,8 @@ export default class tableCom extends Component { ...@@ -234,7 +239,8 @@ export default class tableCom extends Component {
(sqlContent != null && sqlContent.indexOf(key) == -1) || (sqlContent != null && sqlContent.indexOf(key) == -1) ||
(json.formula != null && (json.formula != null &&
json.formula.indexOf(key) == -1 && json.formula.indexOf(key) == -1 &&
json.funcs != null && json.funcs.indexOf(key) == -1)) json.funcs != null &&
json.funcs.indexOf(key) == -1))
) { ) {
this.excludeKeys.push(key); this.excludeKeys.push(key);
...@@ -1432,7 +1438,7 @@ export default class tableCom extends Component { ...@@ -1432,7 +1438,7 @@ export default class tableCom extends Component {
isEdit, isEdit,
datas, datas,
} = this.props; } = this.props;
const { options, labels, selectDis, modalCode, modalTitle, modalInit,modalProps } = this.state; const { options, labels, selectDis, modalCode, modalTitle, modalInit, modalProps } = this.state;
const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form; const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form;
const disabled = json != null ? json.disabled : false; const disabled = json != null ? json.disabled : false;
if (json == null) { if (json == null) {
...@@ -1834,11 +1840,14 @@ export default class tableCom extends Component { ...@@ -1834,11 +1840,14 @@ export default class tableCom extends Component {
// cm = <img src={queryApiActionPath()+obj[dataColumn.base52]} /> // cm = <img src={queryApiActionPath()+obj[dataColumn.base52]} />
// break; // break;
case 'RichText': case 'RichText':
cm = <Editor key={dataColumn.base52} cm = (
<Editor
key={dataColumn.base52}
readOnly={true} readOnly={true}
blockRendererFn={MyBlockRenderer.bind(this, true,null,null,null)} blockRendererFn={MyBlockRenderer.bind(this, true, null, null, null)}
editorState={changeToDraftState(obj[dataColumn.base52])} editorState={changeToDraftState(obj[dataColumn.base52])}
/>; />
);
break; break;
case 'TextArea': case 'TextArea':
cm = ( cm = (
...@@ -2300,83 +2309,83 @@ export default class tableCom extends Component { ...@@ -2300,83 +2309,83 @@ export default class tableCom extends Component {
break; break;
case 'Input': case 'Input':
if (get === 'mobile') { // if (get === 'mobile') {
// cm = (<div className={styles.form}><MobileInputItem // // cm = (<div className={styles.form}><MobileInputItem
// // type={'text'}
// // className="mobile-form-input-left"
// // {...getFieldProps(dataColumn.base52, {
// // initialValue: initValue, // 默认值
// // rules: json.vlds && json.vlds.length > 0 ? json.vlds : [{
// // required: required,
// // message: '请输入' + title,
// // }],
// // })}
// // clear
// // disabled={disabled}
// // placeholder={json.placeholder ? json.placeholder : '请输入' + (title ? title : '')}
// // >
// // {json.isLabel ?
// // title ?
// // <span className={styles.text}>
// // {required ? must : ''}
// // {title}</span>
// // : ''
// // : get === 'mobile' ?
// // <span className={styles.text}>{required ? must : ''}请输入:
// // {/* {title} */}
// // </span>
// // : ''}
// // </MobileInputItem></div>)
// cm = (
// <MobileList>
// <Item arrow="empty" multipleLine onClick={() => {}}>
// {json.isLabel ? (
// title ? (
// <span className={styles.text}>
// {required ? must : ''}
// {title}
// </span>
// ) : (
// ''
// )
// ) : get === 'mobile' ? (
// <span className={styles.text}>
// {required ? must : ''}请输入:
// {/* {title} */}
// </span>
// ) : (
// ''
// )}
// <Brief>
// <div className={styles.form}>
// <MobileInputItem
// type={'text'} // type={'text'}
// className="mobile-form-input-left" // className="mobile-form-input-left"
// {...getFieldProps(dataColumn.base52, { // {...getFieldProps(dataColumn.base52, {
// initialValue: initValue, // 默认值 // initialValue: initValue, // 默认值
// rules: json.vlds && json.vlds.length > 0 ? json.vlds : [{ // rules:
// json.vlds && json.vlds.length > 0
// ? json.vlds
// : [
// {
// required: required, // required: required,
// message: '请输入' + title, // message: '请输入' + title,
// }], // },
// ],
// })} // })}
// clear // clear
// disabled={disabled} // disabled={disabled}
// placeholder={json.placeholder ? json.placeholder : '请输入' + (title ? title : '')} // placeholder={
// > // json.placeholder ? json.placeholder : '请输入' + (title ? title : '')
// {json.isLabel ? // }
// title ? // ></MobileInputItem>
// <span className={styles.text}> // </div>
// {required ? must : ''} // </Brief>
// {title}</span> // </Item>
// : '' // </MobileList>
// : get === 'mobile' ? // );
// <span className={styles.text}>{required ? must : ''}请输入: // break;
// {/* {title} */} // }
// </span>
// : ''}
// </MobileInputItem></div>)
cm = (
<MobileList>
<Item arrow="empty" multipleLine onClick={() => {}}>
{json.isLabel ? (
title ? (
<span className={styles.text}>
{required ? must : ''}
{title}
</span>
) : (
''
)
) : get === 'mobile' ? (
<span className={styles.text}>
{required ? must : ''}请输入:
{/* {title} */}
</span>
) : (
''
)}
<Brief>
<div className={styles.form}>
<MobileInputItem
type={'text'}
className="mobile-form-input-left"
{...getFieldProps(dataColumn.base52, {
initialValue: initValue, // 默认值
rules:
json.vlds && json.vlds.length > 0
? json.vlds
: [
{
required: required,
message: '请输入' + title,
},
],
})}
clear
disabled={disabled}
placeholder={
json.placeholder ? json.placeholder : '请输入' + (title ? title : '')
}
></MobileInputItem>
</div>
</Brief>
</Item>
</MobileList>
);
break;
}
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
rules: rules:
...@@ -2834,10 +2843,8 @@ export default class tableCom extends Component { ...@@ -2834,10 +2843,8 @@ export default class tableCom extends Component {
break; break;
case 'RichText': case 'RichText':
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue:{editorState:changeToDraftState(initValue)}, initialValue: { editorState: changeToDraftState(initValue) },
})( })(<DraftEditor placeholder={json.placeholder} />);
<DraftEditor placeholder={json.placeholder}/>,
);
if (get === 'mobile' && json.isLabel && title) { if (get === 'mobile' && json.isLabel && title) {
cm = ( cm = (
<Form.Item <Form.Item
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论