feat: 裁剪组件
This commit is contained in:
@@ -224,7 +224,6 @@
|
||||
fixedBox
|
||||
isProduct
|
||||
:info="false"
|
||||
:autoCropWidth="90"
|
||||
v-bind="$attrs"
|
||||
:type="cropType"
|
||||
/>
|
||||
@@ -405,15 +404,17 @@ const handleClickCrop = (data, type) => {
|
||||
const titleList = {
|
||||
sketch: "Crop Sketch",
|
||||
mainProductImage: "Crop Main Product Image",
|
||||
cover: "Crop Cover"
|
||||
cover: "Crop Cover",
|
||||
apparel: "Crop Apparel Sketch"
|
||||
}
|
||||
const ratio = type === "apparel" ? [4, 5] : [9, 16]
|
||||
cropType.value = type
|
||||
imageClipDialogRef.value.open(
|
||||
data,
|
||||
(file) => {
|
||||
selectList.value[currentIndex.value].sketch = URL.createObjectURL(file)
|
||||
},
|
||||
{ ratio: [9, 16], isPreview: true, title: titleList[type], isProduct: true }
|
||||
{ ratio, isPreview: true, title: titleList[type], isProduct: true }
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user