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

优化移动端代码

上级 3cd60082
......@@ -385,7 +385,7 @@ export default class ZdyTable extends Component {
configs;
initExcel = (configs, callback) => {
this.configs = configs;
console.log(configs);
// console.log(configs);
if (configs == null || configs.trees == null) {
if (callback) callback();
return;
......
......@@ -5,14 +5,11 @@ import React, { Component } from 'react';
import { Row, Col } from 'antd';
import TableCom from '../tableCompon/index';
export default class isNewTable extends Component {
export default class IsNewTable extends Component {
render() {
const {
isRowCol,
items,
checkAllHidden,
isBorder,
borderStyle,
fatherCode,
userId,
index,
......@@ -23,15 +20,12 @@ export default class isNewTable extends Component {
get,
obj,
mapData,
form,
sqlData,
defaultValues,
width,
routerState,
messageData,
formCode,
formId,
fatherObj,
style,
isPreview,
modalInit,
......@@ -51,7 +45,7 @@ export default class isNewTable extends Component {
const allhidden = checkAllHidden(items);
return (
<div
key={i}
key={item && Array.isArray(item) && item.length > 0 ? item[0].uuid : i}
style={{
marginTop: 0,
background: '#ffffff',
......@@ -73,6 +67,7 @@ export default class isNewTable extends Component {
''
) : (
<div
key={ary.uuid || j}
style={{
...styles,
textAlign: 'left',
......@@ -133,6 +128,7 @@ export default class isNewTable extends Component {
const allhidden = checkAllHidden(items);
return (
<Row
key={item && Array.isArray(item) && item.length > 0 ? item[0].uuid : i}
style={{
...style,
}}>
......@@ -148,6 +144,7 @@ export default class isNewTable extends Component {
if (ary.content?.comName === 'Label') {
return (
<Col
key={ary.uuid || j}
style={{
display:
ary.content &&
......@@ -202,6 +199,7 @@ export default class isNewTable extends Component {
}
return (
<Col
key={ary.uuid || j}
span={24}
style={{
display:
......
import React, {useMemo} from 'react';
import React, {useMemo, Component} from 'react';
import {List, Picker} from 'antd-mobile';
import styles from './styles.less';
......@@ -20,11 +20,14 @@ const getItemChildren = (childrenList, parent) => {
return childrenList;
}
export default function MobileCascader(props) { // 级联选择
const {onChange, options, label, disabled, value, json, otherProps} = props;
export default class MobileCascader extends Component{
constructor(props) {
super(props);
}
render() {
const {onChange, options, label, disabled, value, json, otherProps} = this.props;
// console.log(props);
let opt = useMemo(() => {
return options &&
let opt = options &&
Array.isArray(options) &&
options.map((x) => {
return {
......@@ -33,7 +36,6 @@ export default function MobileCascader(props) { // 级联选择
children: getItemChildren(x.children, x),
};
});
}, [options]);
return (
<div className={styles.mobileFormInput}>
<Picker
......@@ -55,4 +57,10 @@ export default function MobileCascader(props) { // 级联选择
</Picker>
</div>
);
}
}
//
//
// export default function MobileCascader(props) { // 级联选择
//
// }
......@@ -2651,13 +2651,18 @@ export default class tableCom extends Component {
/>,
);
if (get === 'mobile') {
console.log(json.vlds);
cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue,
rules:
json.vlds && json.vlds.length > 0
? json.vlds
: [{ required: required, message: '请选择' + dataColumn.title }],
})(<MobileCascader options={options} label={title} disabled={disabled} json={json} />);
})(<MobileCascader options={options}
label={title}
disabled={disabled}
json={json}
/>);
}
if (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论