fix(系统模板):修复在优惠券中上传背景图后,页面展示空白,前端报错(偶现bug)

This commit is contained in:
Apple 2022-10-17 11:32:12 +08:00
parent 221acec118
commit 7ac263ecb4
1 changed files with 2 additions and 0 deletions

View File

@ -687,9 +687,11 @@ export default class edittemplate extends React.Component {
} }
componentWillUnmount() { componentWillUnmount() {
console.log('组件销毁');
if (document.querySelector('canvas')) { if (document.querySelector('canvas')) {
document.querySelector('canvas').remove() document.querySelector('canvas').remove()
} }
Bus.removeAllListeners();
} }
//组件名 //组件名
componentName(c) { componentName(c) {