bugfix: 商品编辑页样式
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
:fixedNumber="ratio"
|
||||
:fixed="isProduct ? type !== 'apparel' : true"
|
||||
movable
|
||||
:centerBox="isProduct"
|
||||
:info="false"
|
||||
@realTime="onChange"
|
||||
outputType="png"
|
||||
:full="true"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div class="trigger-img placeholder"></div>
|
||||
<SvgIcon name="picture" size="24" />
|
||||
<div class="trigger-tips">
|
||||
{{ $t("SellerListEdit.productImageDesc") }}
|
||||
</div>
|
||||
@@ -136,12 +136,7 @@
|
||||
row-gap: 1.2rem;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
border-radius: 0.6rem;
|
||||
background: linear-gradient(135deg, #efefef 0%, #cdcdcd 100%);
|
||||
}
|
||||
|
||||
|
||||
.trigger-tips {
|
||||
font-size: 1.2rem;
|
||||
@@ -150,6 +145,11 @@
|
||||
line-height: 1.3;
|
||||
}
|
||||
}
|
||||
&.mainProductImage{
|
||||
.trigger-tips{
|
||||
margin: 0 -2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</seller-header>
|
||||
<div class="edit-detail-content flex">
|
||||
<div class="edit-detail-content flex" ref="editDetailContentRef">
|
||||
<div class="left">
|
||||
<TopImageSection :images="previewImageMap" @crop="handleClickCrop" />
|
||||
<ProductImageList
|
||||
@@ -31,20 +31,22 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<ListingForm
|
||||
:product-name="currentListing.productName"
|
||||
:price="currentListing.price"
|
||||
:desc="currentListing.desc"
|
||||
:gender="currentListing.gender"
|
||||
:category="currentListing.category"
|
||||
:gender-options="genderOptions"
|
||||
:category-options="categoryOptions"
|
||||
@update:product-name="currentListing.productName = $event"
|
||||
@update:price="currentListing.price = $event"
|
||||
@update:desc="currentListing.desc = $event"
|
||||
@update:gender="handleUpdateGender"
|
||||
@update:category="currentListing.category = $event"
|
||||
/>
|
||||
<div class="right-content" ref="rightContentRef">
|
||||
<ListingForm
|
||||
:product-name="currentListing.productName"
|
||||
:price="currentListing.price"
|
||||
:desc="currentListing.desc"
|
||||
:gender="currentListing.gender"
|
||||
:category="currentListing.category"
|
||||
:gender-options="genderOptions"
|
||||
:category-options="categoryOptions"
|
||||
@update:product-name="currentListing.productName = $event"
|
||||
@update:price="currentListing.price = $event"
|
||||
@update:desc="currentListing.desc = $event"
|
||||
@update:gender="handleUpdateGender"
|
||||
@update:category="currentListing.category = $event"
|
||||
/>
|
||||
</div>
|
||||
<div class="page-control flex align-center" v-if="selectList.length > 1">
|
||||
<a-pagination
|
||||
v-model:current="currentPage"
|
||||
@@ -105,6 +107,8 @@
|
||||
const { t } = useI18n()
|
||||
|
||||
const imageClipDialogRef = ref<InstanceType<typeof ImageClipDialog> | null>(null)
|
||||
const editDetailContentRef = ref<HTMLElement | null>(null)
|
||||
const rightContentRef = ref<HTMLElement | null>(null)
|
||||
|
||||
defineOptions({
|
||||
name: "EditDetail"
|
||||
@@ -646,7 +650,19 @@
|
||||
})
|
||||
}
|
||||
|
||||
const resetScrollPositions = () => {
|
||||
if (editDetailContentRef.value) {
|
||||
editDetailContentRef.value.scrollTop = 0
|
||||
}
|
||||
if (rightContentRef.value) {
|
||||
rightContentRef.value.scrollTop = 0
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 重置滚动条位置
|
||||
resetScrollPositions()
|
||||
|
||||
// 从 sessionStorage 获取参数
|
||||
const paramsStr = sessionStorage.getItem('listingEditParams')
|
||||
const data = paramsStr ? JSON.parse(paramsStr) : {}
|
||||
@@ -730,7 +746,7 @@
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
justify-content: space-between;
|
||||
justify-content: space-around;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 0;
|
||||
@@ -740,10 +756,26 @@
|
||||
.right {
|
||||
width: 55.2rem;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
|
||||
.right-content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.page-control {
|
||||
justify-content: flex-end;
|
||||
margin-top: 4rem;
|
||||
margin-top: 2rem;
|
||||
padding: 2rem 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,13 +168,17 @@ const publishListing = async (item: any)=>{
|
||||
message.success($t('Seller.publishMessage'))
|
||||
}
|
||||
|
||||
const editListing = (item: any)=>{
|
||||
const editListing = (item: any) => {
|
||||
sessionStorage.setItem('listingEditParams', JSON.stringify({
|
||||
id:item.id,
|
||||
type:'edit'
|
||||
}))
|
||||
router.push({
|
||||
path:'/home/seller/myListings/edit',
|
||||
state: {
|
||||
id:item.id,
|
||||
type:'edit'
|
||||
}
|
||||
// state: {
|
||||
// id:item.id,
|
||||
// type:'edit'
|
||||
// }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user