OCR 调整

dev
张同海 2 years ago
parent d3f7db405b
commit e8f45f2949

@ -658,9 +658,8 @@ export default {
ctx.lineWidth = 1
this.width = e.offsetX - x
this.height = e.offsetY - y
this.Bx = e.offsetX
this.By = e.offsetY
ctx.strokeRect(x, y, e.offsetX + 5 - x, e.offsetY + 5 - y)
ctx.strokeRect(x, y, e.offsetX - x, e.offsetY - y)
}
},
mousemove(e) {
@ -672,14 +671,14 @@ export default {
this.$refs.myCanvas.getContext('2d').clearRect(0, 0, this.$refs.myCanvas.width, this.$refs.myCanvas.height)
if (this.imgSrc) {
this.flag = true
this.x = e.offsetX + 5 // X
this.y = e.offsetY + 5 // Y
this.x = e.offsetX // X
this.y = e.offsetY // Y
this.CvBoxType = false
this.width = 0
this.height = 0
}
},
mouseup() {
mouseup(e) {
// console.log(this.width, this.flag, this.imgSrc)
this.flag = false
if (this.imgSrc && this.width != 0 && this.height != 0) {
@ -692,6 +691,8 @@ export default {
scale: this.scale
}).then(res => {
this.Rdata = res.data
this.Bx = this.x + this.width
this.By = this.y + this.height
this.CvBoxType = true
})
}
@ -1227,6 +1228,7 @@ export default {
}
.OCRBox {
/deep/.ant-drawer-body {
position: relative;
padding: 0 !important;
}
}
@ -1248,9 +1250,9 @@ export default {
}
}
.CV {
width: 100%;
height: auto;
background-repeat: no-repeat;
// width: 100%;
// height: auto;
// background-repeat: no-repeat;
}
@import url('../index.less');
.operation-area {

Loading…
Cancel
Save