diff --git a/src/views/SellerDashboard/BrandProfile/image-clip-dialog.vue b/src/views/SellerDashboard/BrandProfile/image-clip-dialog.vue index fbdac93f..04b4b28e 100644 --- a/src/views/SellerDashboard/BrandProfile/image-clip-dialog.vue +++ b/src/views/SellerDashboard/BrandProfile/image-clip-dialog.vue @@ -1,6 +1,7 @@ diff --git a/src/views/SellerDashboard/BrandProfile/image-clip.vue b/src/views/SellerDashboard/BrandProfile/image-clip.vue index f704e1d6..662940ab 100644 --- a/src/views/SellerDashboard/BrandProfile/image-clip.vue +++ b/src/views/SellerDashboard/BrandProfile/image-clip.vue @@ -10,6 +10,7 @@ fixed movable centerBox + :fixedBox="fixedBox" @realTime="onChange" v-bind="$attrs" outputType="png" @@ -50,6 +51,10 @@ const props = defineProps({ isProduct: { type: Boolean, default: false + }, + fixedBox: { + type: Boolean, + default:true } }) const attrs = useAttrs() diff --git a/src/views/SellerDashboard/MyListings/EditDetail/index.vue b/src/views/SellerDashboard/MyListings/EditDetail/index.vue index 5eb75391..be553742 100644 --- a/src/views/SellerDashboard/MyListings/EditDetail/index.vue +++ b/src/views/SellerDashboard/MyListings/EditDetail/index.vue @@ -41,7 +41,7 @@
@@ -128,7 +128,10 @@ class="sketch-element flex flex-center" > -
+
@@ -222,6 +225,8 @@ isProduct :info="false" :autoCropWidth="90" + v-bind="$attrs" + :type="cropType" /> @@ -394,14 +399,21 @@ const handleSelectProdImg = (index: number) => { } } -const handleClickCrop = (data) => { - console.log(data) +const cropType = ref("") +const handleClickCrop = (data, type) => { + console.log(data, type) + const titleList = { + sketch: "Crop Sketch", + mainProductImage: "Crop Main Product Image", + cover: "Crop Cover" + } + cropType.value = type imageClipDialogRef.value.open( data, (file) => { selectList.value[currentIndex.value].sketch = URL.createObjectURL(file) }, - { ratio: [9, 16], isPreview: true, title: "Crop Brand Banner" } + { ratio: [9, 16], isPreview: true, title: titleList[type], isProduct: true } ) }