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