fix: 修复头像裁剪容器高度异常
- 穿透设置 cropperjs 动态插入的 cropper-canvas 高度 - 解决头像上传裁剪区域只显示 100px 的问题master
parent
849f33c5a1
commit
caa6fa9be3
|
|
@ -146,3 +146,13 @@ function getRoundedCanvas(sourceCanvas: HTMLCanvasElement) {
|
||||||
return canvas
|
return canvas
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$prefix-cls: #{$namespace}-cropper-image;
|
||||||
|
|
||||||
|
.#{$prefix-cls} {
|
||||||
|
// cropperjs 动态插入的自定义元素不受 scoped 样式约束,需要穿透设置高度
|
||||||
|
> :deep(cropper-canvas) {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue