diff --git a/src/assets/icons/CTrash.svg b/src/assets/icons/CTrash.svg
new file mode 100644
index 00000000..cdb97690
--- /dev/null
+++ b/src/assets/icons/CTrash.svg
@@ -0,0 +1,5 @@
+
diff --git a/src/views/SellerDashboard/MyListings/EditDetail/components/TopImageSection.vue b/src/views/SellerDashboard/MyListings/EditDetail/components/TopImageSection.vue
index 22db6171..054e30f9 100644
--- a/src/views/SellerDashboard/MyListings/EditDetail/components/TopImageSection.vue
+++ b/src/views/SellerDashboard/MyListings/EditDetail/components/TopImageSection.vue
@@ -16,6 +16,13 @@
>
+
+
+
-
+
{{ $t("SellerListEdit.productImageDesc") }}
@@ -54,6 +61,7 @@
const emit = defineEmits<{
(e: "crop", data: string | null, type: TopImageType): void
+ (e: "remove-image", type: TopImageType): void
}>()
const topImageList: TopImageType[] = ["sketch", "mainProductImage", "cover"]
@@ -117,6 +125,18 @@
cursor: pointer;
}
+ .delete-tool {
+ position: absolute;
+ top: 3.4rem;
+ right: 0.8rem;
+ width: 2rem;
+ height: 2rem;
+ border-radius: 50%;
+ background-color: #9a9a9a;
+ // z-index: 1;
+ cursor: pointer;
+ }
+
.sketch-img {
height: 100%;
object-fit: contain;
@@ -136,8 +156,6 @@
row-gap: 1.2rem;
}
-
-
.trigger-tips {
font-size: 1.2rem;
text-align: center;
@@ -145,8 +163,8 @@
line-height: 1.3;
}
}
- &.mainProductImage{
- .trigger-tips{
+ &.mainProductImage {
+ .trigger-tips {
margin: 0 -2rem;
}
}
diff --git a/src/views/SellerDashboard/MyListings/EditDetail/index.vue b/src/views/SellerDashboard/MyListings/EditDetail/index.vue
index a274cd1d..52d5c5fa 100644
--- a/src/views/SellerDashboard/MyListings/EditDetail/index.vue
+++ b/src/views/SellerDashboard/MyListings/EditDetail/index.vue
@@ -19,7 +19,7 @@
-
+
{
+ const listing = currentListing.value
+ if (type === "mainProductImage") {
+ listing.prodImageList.forEach((item) => {
+ if (item.url === listing.mainProductImage && !item.isVideo) {
+ item.selected = false
+ }
+ })
+ listing.mainProductImage = ""
+ listing.firstSelectedIndex = null
+ } else if (type === "cover") {
+ listing.cover = ""
+ }
+ }
+
const cropType = ref("")
const handleClickCrop = (
data: string | null,