fix: 商品名称固定宽度,库存移到最后
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-04-03 01:45:14 +00:00
parent fbcd930887
commit 870e1c612d

View File

@@ -46,7 +46,10 @@
<view v-for="(item, index) in orderItems" :key="index" class="order-item">
<view class="item-info">
<text class="item-name">{{ item.productName }}</text><text class="item-spec">{{ item.spec ? ' ' + item.spec : '' }}</text><text class="item-dims" v-if="item.length && item.width">{{ item.length }}x{{ item.width }}</text>
<text class="item-name-box">{{ item.productName }}</text>
<text class="item-spec">{{ item.spec ? ' ' + item.spec : '' }}</text>
<text class="item-dims" v-if="item.length && item.width">{{ item.length }}x{{ item.width }}</text>
<text class="item-stock">库存: {{ stocks[item.productId] || 0 }}</text>
</view>
<view class="item-edit">
<view class="quantity-edit">
@@ -61,7 +64,6 @@
/>
<text class="qty-btn" @click="qtyPlus(index)">+</text>
</view>
<text class="stock-info">库存: {{ stocks[item.productId] || 0 }}</text>
</view>
<view class="price-edit">
<text class="qty-label">单价</text>
@@ -581,10 +583,14 @@ export default {
flex-wrap: wrap;
}
.item-name {
.item-name-box {
font-size: 28rpx;
font-weight: bold;
color: #333;
width: 170rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-spec {
@@ -601,6 +607,12 @@ export default {
margin-left: 8rpx;
}
.item-stock {
font-size: 22rpx;
color: #999;
margin-left: auto;
}
.item-edit {
display: flex;
align-items: center;