This commit is contained in:
X1627315083
2025-05-09 16:07:47 +08:00
parent ae4977abd9
commit 42dbe8ddc4
3 changed files with 17 additions and 9 deletions

View File

@@ -295,9 +295,12 @@ export default defineComponent({
imgWidth[key] = setImageWidth(key,img);
}
let url = imgUrl.split('?')[0]
var match = url.match(/^(?:https?:\/\/[^\/]+)\/(.*)/);
minioUrl = match[1]
// let url = imgUrl.split('?')[0]
// var match = url.match(/^(?:https?:\/\/[^\/]+)\/(.*)/);
// minioUrl = match[1]
const { pathname } = new URL(imgUrl);
const result = pathname.slice(1);
minioUrl = result
// let id =
let proportion = img.height / img.width; //计算图形宽高比例
let scaleWH = imgWidth[key] / img.width; //计算放到画布上缩小倍率