Browse Source

宣传视频编辑

dev
巴林闲侠 2 years ago
parent
commit
a840bdcd90
  1. 36
      web/client/src/components/Upload/index.js

36
web/client/src/components/Upload/index.js

@ -27,28 +27,28 @@ class Uploads extends Component {
return showName
}
// setFileList = (value) => {
// let defaultFileList = [];
// defaultFileList = value.map((u, index) => {
// let fileUrl = `${this.ApiRoot}/${u.url}`;
// return {
// uid: -index - 1,
// name: this.dealName(u.url),
// status: 'done',
// storageUrl: u.url,
// url: fileUrl
// };
// });
// onChange(defaultFileList)
// this.setState({
// fileList: defaultFileList
// });
// };
setFileList = (value) => {
let defaultFileList = [];
defaultFileList = value.map((u, index) => {
let fileUrl = `${this.ApiRoot}/${u.url}`;
return {
uid: -index - 1,
name: this.dealName(u.url),
status: 'done',
storageUrl: u.url,
url: fileUrl
};
});
// onChange(defaultFileList)
this.setState({
fileList: defaultFileList
});
};
componentDidMount() {
const { value } = this.props;
if (value) {
this.setState(value);
this.setFileList(value);
}
}

Loading…
Cancel
Save