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

修复换行问题

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