优化摸大红前台交互与主题按钮样式

列表改为滚动触底自动分页,详情与订单页铺满主内容区,按钮统一为橙色主题描边/实心样式。
This commit is contained in:
yml2213
2026-07-16 19:40:37 +08:00
parent 6d61027318
commit 094a91c985
5 changed files with 427 additions and 99 deletions
@@ -214,7 +214,9 @@ async function handleBuy() {
>
{{ canBuy ? '立即购买' : '暂时缺货' }}
</el-button>
<el-button size="large" @click="router.push('/mohong')">返回列表</el-button>
<el-button size="large" class="btn-outline" @click="router.push('/mohong')">
返回列表
</el-button>
</div>
<div class="tips">
@@ -288,14 +290,15 @@ async function handleBuy() {
<style scoped>
.mohong-detail-page {
width: 100%;
max-width: 1200px;
}
.detail-layout {
display: grid;
grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
gap: 28px;
/* 左图固定合理宽度,右侧信息铺满剩余空间,避免整页右侧大片空白 */
grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
gap: 24px;
align-items: start;
width: 100%;
}
.gallery-panel,
@@ -304,13 +307,15 @@ async function handleBuy() {
border: 1px solid #eef1f5;
border-radius: 16px;
padding: 18px;
min-width: 0;
}
.main-image {
width: 100%;
aspect-ratio: 1;
border-radius: 12px;
overflow: hidden;
background: #f3f6fb;
background: #111;
}
.main-image img {
@@ -436,10 +441,27 @@ async function handleBuy() {
.actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 20px;
}
.actions :deep(.el-button--primary) {
--el-button-bg-color: #ff6a00;
--el-button-border-color: #ff6a00;
--el-button-hover-bg-color: #e55d00;
--el-button-hover-border-color: #e55d00;
}
.actions :deep(.btn-outline) {
--el-button-bg-color: #fff8f2;
--el-button-border-color: rgba(255, 106, 0, 0.32);
--el-button-text-color: #ff6a00;
--el-button-hover-bg-color: #fff3e8;
--el-button-hover-border-color: #ff6a00;
--el-button-hover-text-color: #ff6a00;
}
.tips {
padding-top: 16px;
border-top: 1px solid #eef1f5;
@@ -527,5 +549,9 @@ async function handleBuy() {
.detail-layout {
grid-template-columns: 1fr;
}
.gallery-panel {
max-width: 420px;
}
}
</style>