Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite

This commit is contained in:
李志鹏
2026-05-06 13:45:29 +08:00
2 changed files with 16 additions and 5 deletions

View File

@@ -132,7 +132,11 @@
if (!props.isProduct) { if (!props.isProduct) {
if (!url || !callback) return if (!url || !callback) return
} }
coverOrigin.value = [] coverOrigin.value = []
data.url = null
currentOrigin.value = 'sketch'
data.url = url data.url = url
data.callback = callback data.callback = callback
data.ratio = options.ratio || [1, 1] data.ratio = options.ratio || [1, 1]
@@ -143,7 +147,7 @@
if (options.hasOwnProperty("isPreview")) data.isPreview = options.isPreview if (options.hasOwnProperty("isPreview")) data.isPreview = options.isPreview
data.isProduct = options.isProduct data.isProduct = options.isProduct
} }
if (origin?.length) { if (origin?.length && !data.url) {
coverOrigin.value = origin coverOrigin.value = origin
data.url = origin[0].url data.url = origin[0].url
} }

View File

@@ -96,24 +96,26 @@
return label return label
} }
const centerLabelTop = "8px"
const cropLabelMap = { const cropLabelMap = {
cover: [ cover: [
{ text: "crown", top: "2.67%", className: "label-h" }, { text: "crown", top: "2.67%", className: "label-h" },
{ text: "hip line", top: "63.47%", className: "label-h" }, { text: "hip line", top: "63.47%", className: "label-h" },
{ text: "mid-thigh", top: "92.8%", className: "label-h" }, { text: "mid-thigh", top: "92.8%", className: "label-h" },
{ text: "center", top: "0", className: "label-v" } { text: "center", top: centerLabelTop, className: "label-v" }
], ],
mainProductImage: [ mainProductImage: [
{ text: "crown", top: "2.67%", className: "label-h" }, { text: "crown", top: "2.67%", className: "label-h" },
{ text: "footbase", top: "97.6%", className: "label-h" }, { text: "footbase", top: "97.6%", className: "label-h" },
{ text: "center", top: "0", className: "label-v" } { text: "center", top: centerLabelTop, className: "label-v" }
], ],
sketch: [ sketch: [
{ text: "crown", top: "2.67%", className: "label-h" }, { text: "crown", top: "2.67%", className: "label-h" },
{ text: "footbase", top: "97.6%", className: "label-h" }, { text: "footbase", top: "97.6%", className: "label-h" },
{ text: "center", top: "0", className: "label-v" } { text: "center", top: centerLabelTop, className: "label-v" }
], ],
apparel: [{ text: "center", top: "0", className: "label-v" }] apparel: [{ text: "center", top: centerLabelTop, className: "label-v" }]
} }
const injectCropLabel = () => { const injectCropLabel = () => {
@@ -288,11 +290,16 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box;
border: 1px solid rgba(75, 165, 255, 0.85);
pointer-events: none; pointer-events: none;
z-index: 9; /* 位于图片之上,但在控制点之下 */ z-index: 9; /* 位于图片之上,但在控制点之下 */
background-image: none; background-image: none;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
:deep(.vue-cropper .crop-point) {
z-index: 10;
}
} }
&[data-crop-type="cover"] { &[data-crop-type="cover"] {