fix: 修复坯布库存表格在东集上列错位

This commit is contained in:
2026-11-08 18:54:20 +08:00
parent db12e1a249
commit 5b6690b4d8
2 changed files with 11 additions and 16 deletions
@@ -1,6 +1,5 @@
<template>
<view class="warehouse-table-wrap" :class="{ 'is-auto-height': isAutoHeight }">
<scroll-view scroll-x class="tableScrollX">
<wyb-table
ref="table"
:headers="headers"
@@ -10,7 +9,6 @@
:first-line-fixed="firstLineFixed"
@onCellClick="onCellClick"
/>
</scroll-view>
</view>
</template>
@@ -24,7 +22,7 @@ export default {
contents: { type: Array, default: () => [] },
// auto:高度随内容撑开,纵向滚动交给外层 scroll-view,避免与下拉刷新抢手势
height: { type: String, default: 'auto' },
firstLineFixed: { type: Boolean, default: true },
firstLineFixed: { type: Boolean, default: false },
},
computed: {
isAutoHeight() {
@@ -50,9 +48,6 @@ export default {
width: 100%;
background: #fff;
}
.tableScrollX {
width: 100%;
}
/* 取消表格内部纵向滚动,只保留横向;纵向由页面 scroll-view 处理 */
.is-auto-height ::v-deep .wyb-table-scroll-view {
height: auto !important;
+1 -1
View File
@@ -73,7 +73,7 @@
borderRight: index === headers.length - 1 || (!showVertBorder && index !== 0) ? 'none' : '1px solid' + borderColor,
zIndex: index === 0 ? 20 : 0,
left: index === 0 && firstLineFixed ? (enableCheck ? checkColWidth + 'rpx' : 0) : 'auto',
position: index === 0 ? 'sticky' : 'static'}">
position: index === 0 && firstLineFixed ? 'sticky' : 'static'}">
<text :style="{marginLeft: autoSortShow(index) && textAlign !== 'left' ? fontSize[0] * 0.65 + 'rpx' : 0}">
{{item.label || emptyString}}
</text>