提交 c11d44a7 authored 作者: 徐立's avatar 徐立

修复换行问题

上级 8496736f
......@@ -1294,14 +1294,14 @@ export default class tableCom extends Component {
const x = base52.split('.');
base52 = x[x.length - 1];
}
if(obj[base52]){
dispatch({
type: 'DataColumn/getSqlLabels',
payload: { sqlKey, values: obj[base52], labelName, valueName, allValues },
callback: labels => {
this.setState({ labels, selectDis: false });
},
});
if (obj[base52]) {
dispatch({
type: 'DataColumn/getSqlLabels',
payload: { sqlKey, values: obj[base52], labelName, valueName, allValues },
callback: labels => {
this.setState({ labels, selectDis: false });
},
});
}
} else {
dispatch({
......@@ -1866,7 +1866,15 @@ export default class tableCom extends Component {
break;
case 'Input':
cm = <span>{obj[dataColumn.base52]}</span>;
cm = (
<span
style={{
wordBreak: 'break-all',
}}
>
{obj[dataColumn.base52]}
</span>
);
break;
case 'InputHidden':
......@@ -2041,36 +2049,38 @@ export default class tableCom extends Component {
);
} else {
const files = !isEmpty(ary) ? ary : [];
console.log(files);
cm = (
<ul>
{files.map((f, index2) => {
if (f.filePath.indexOf('.png') != -1 || f.filePath.indexOf('.jpg') != -1) {
{Array.isArray(files) &&
files.map((f, index2) => {
if (f.filePath.indexOf('.png') != -1 || f.filePath.indexOf('.jpg') != -1) {
return (
<img
key={index2}
style={{ width: 100, height: 100 }}
src={queryApiActionPath() + f.filePath}
/>
);
}
// if(get === 'web'){
// return <li key={index2}><FilePreview
// path={queryApiActionPath() + f.path}
// pathName={f.name}
// /></li>
// }
return (
<img
key={index2}
style={{ width: 100, height: 100 }}
src={queryApiActionPath() + f.filePath}
/>
<li key={index2}>
<a
target="_blank"
key={f.filePath}
href={queryApiActionPath() + f.filePath}
>
{f.fileName}
</a>
</li>
);
}
// if(get === 'web'){
// return <li key={index2}><FilePreview
// path={queryApiActionPath() + f.path}
// pathName={f.name}
// /></li>
// }
return (
<li key={index2}>
<a
target="_blank"
key={f.filePath}
href={queryApiActionPath() + f.filePath}
>
{f.fileName}
</a>
</li>
);
})}
})}
</ul>
);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论