Commit 86568296 by wufan

fix:修复创建直播课上传图片限制

parent c420988c
......@@ -30,7 +30,8 @@ class AddLiveBasic extends React.Component {
showCutModal: false,
courseCatalogList:[],
showSelectFileModal: false,
cutImageBlob: null
cutImageBlob: null,
hasImgReady: false // 图片是否上传成功
}
}
componentWillUnmount() {
......@@ -142,6 +143,7 @@ class AddLiveBasic extends React.Component {
const _dataUrl = this.clip()
self.setState({
dataUrl: _dataUrl,
hasImgReady: false // 图片是否上传成功
})
}, 100)
......@@ -197,7 +199,8 @@ class AddLiveBasic extends React.Component {
}
render() {
const { showCutModal, imageFile,courseCatalogList,showSelectFileModal,visible,cutImageBlob} = this.state;
const { showCutModal, imageFile,courseCatalogList,showSelectFileModal,visible,cutImageBlob,hasImgReady
} = this.state;
const { data,pageType,isEdit} = this.props;
const { courseName,categoryName,coverUrl} = data;
const fileName = '';
......@@ -311,6 +314,7 @@ class AddLiveBasic extends React.Component {
<Button
key="submit"
type="primary"
disabled={!hasImgReady}
onClick={() => {
if (!cutFlag) {
cutFlag = true;
......
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