Compare commits
3 Commits
4a078186a9
...
aab96bbe70
| Author | SHA1 | Date | |
|---|---|---|---|
| aab96bbe70 | |||
| 4004fa2703 | |||
| fafccf0352 |
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-detail-wrapper flex-1">
|
||||
<seller-header
|
||||
class="edit-detail-header"
|
||||
>
|
||||
<seller-header class="edit-detail-header">
|
||||
<template #right>
|
||||
<div class="operate-menu flex">
|
||||
<div class="menu-btn flex align-center save" @click="handleClickMenu('draft')">
|
||||
@@ -44,7 +42,7 @@
|
||||
@update:product-name="currentListing.productName = $event"
|
||||
@update:price="currentListing.price = $event"
|
||||
@update:desc="currentListing.desc = $event"
|
||||
@update:gender="currentListing.gender = $event"
|
||||
@update:gender="handleUpdateGender"
|
||||
@update:category="currentListing.category = $event"
|
||||
/>
|
||||
<div class="page-control flex align-center" v-if="selectList.length > 1">
|
||||
@@ -128,7 +126,14 @@
|
||||
sketchList: []
|
||||
})
|
||||
|
||||
const genderOptions = STORE.state.UserHabit?.sex.value || []
|
||||
const genderOptions = computed(() => {
|
||||
return (
|
||||
STORE.state.UserHabit?.sex.value.map((el) => ({
|
||||
...el,
|
||||
name: el.key.toLowerCase()
|
||||
})) || []
|
||||
)
|
||||
})
|
||||
|
||||
const fallbackCategoryOptions: Record<string, RadioOption[]> = {
|
||||
MALE: STORE.state.UserHabit?.MalePosition || [],
|
||||
@@ -150,6 +155,13 @@
|
||||
|
||||
const currentListing = computed(() => selectList.value[currentIndex.value])
|
||||
|
||||
const handleUpdateGender = (gender: string) => {
|
||||
if (currentListing.value.gender === gender) return
|
||||
|
||||
currentListing.value.gender = gender
|
||||
currentListing.value.category = null
|
||||
}
|
||||
|
||||
const previewImageMap = computed(() => ({
|
||||
sketch: currentListing.value.sketch,
|
||||
mainProductImage: currentListing.value.mainProductImage,
|
||||
@@ -449,7 +461,7 @@
|
||||
onMounted(() => {
|
||||
const data = history.state
|
||||
if (data?.type === "edit") {
|
||||
itemId.value = history.state?.id
|
||||
itemId.value = history.state?.id
|
||||
handleGetDetailById()
|
||||
} else {
|
||||
const designItemIds = history.state?.designItemIds || []
|
||||
|
||||
Reference in New Issue
Block a user