File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 328
328
// 关闭控件
329
329
off () {
330
330
this .show = false ;
331
+ this .$emit (' close' );
331
332
},
332
333
// 设置步骤
333
334
setStep (step ) {
Original file line number Diff line number Diff line change 9
9
<el-button type =" primary" icon =" upload" style =" position : absolute ;bottom : 15px ;margin-left : 40px ;" @click =" imagecropperShow=true" >修改头像
10
10
</el-button >
11
11
12
- <ImageCropper :width =" 300" :height =" 300" url =" https://httpbin.org/post" @crop-upload-success =" cropSuccess" :key =" imagecropperKey" v-show =" imagecropperShow" />
12
+ <ImageCropper :width =" 300" :height =" 300" url =" https://httpbin.org/post" @close =' close' @crop-upload-success =" cropSuccess"
13
+ :key =" imagecropperKey" v-show =" imagecropperShow" />
13
14
</div >
14
15
</template >
16
+
15
17
<script >
16
18
import ImageCropper from ' components/ImageCropper' ;
17
19
import PanThumb from ' components/PanThumb' ;
29
31
this .imagecropperShow = false ;
30
32
this .imagecropperKey = this .imagecropperKey + 1 ;
31
33
this .image = resData .files .avatar ;
34
+ },
35
+ close () {
36
+ this .imagecropperShow = false ;
32
37
}
33
38
}
34
39
};
You can’t perform that action at this time.
0 commit comments