Commit be3c7709 authored by 张烨's avatar 张烨

fix: 修复ts报错

parent 73c913e7
......@@ -37,7 +37,7 @@ interface PicturesWallType {
cropRate?: number | boolean;
isCrop?: boolean;
type?: 'CityTemp'|'icon'|'androidMenu'|'menuNew',
value?: string,
value?: string | string[],
}
class PicturesWall extends React.Component<PicturesWallType> {
......@@ -48,12 +48,17 @@ class PicturesWall extends React.Component<PicturesWallType> {
previewTitle: '',
imgBed: [],
curSelectedImg: '',
fileList: this.props.value ? [{
fileList: this.props.value ? Array.isArray(this.props.value) ? this.props.value.map((v) => ({
url: v,
uid: uuid(8, 16),
name: '熊猫运维中台系统',
status: 'done',
})) as UploadFile<any>[]: [{
url: this.props.value,
uid: uuid(8, 16),
name: '熊猫运维中台系统',
status: 'done',
}] : [],
}] as UploadFile<any>[] : [],
};
handleCancel = () => this.setState({ previewVisible: false });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment