bugfix: 商品编辑页样式
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user