fix: 修复坯布库存表格在东集上列错位
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="warehouse-table-wrap" :class="{ 'is-auto-height': isAutoHeight }">
|
<view class="warehouse-table-wrap" :class="{ 'is-auto-height': isAutoHeight }">
|
||||||
<scroll-view scroll-x class="tableScrollX">
|
|
||||||
<wyb-table
|
<wyb-table
|
||||||
ref="table"
|
ref="table"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
@@ -10,7 +9,6 @@
|
|||||||
:first-line-fixed="firstLineFixed"
|
:first-line-fixed="firstLineFixed"
|
||||||
@onCellClick="onCellClick"
|
@onCellClick="onCellClick"
|
||||||
/>
|
/>
|
||||||
</scroll-view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -24,7 +22,7 @@ export default {
|
|||||||
contents: { type: Array, default: () => [] },
|
contents: { type: Array, default: () => [] },
|
||||||
// auto:高度随内容撑开,纵向滚动交给外层 scroll-view,避免与下拉刷新抢手势
|
// auto:高度随内容撑开,纵向滚动交给外层 scroll-view,避免与下拉刷新抢手势
|
||||||
height: { type: String, default: 'auto' },
|
height: { type: String, default: 'auto' },
|
||||||
firstLineFixed: { type: Boolean, default: true },
|
firstLineFixed: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isAutoHeight() {
|
isAutoHeight() {
|
||||||
@@ -50,9 +48,6 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.tableScrollX {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
/* 取消表格内部纵向滚动,只保留横向;纵向由页面 scroll-view 处理 */
|
/* 取消表格内部纵向滚动,只保留横向;纵向由页面 scroll-view 处理 */
|
||||||
.is-auto-height ::v-deep .wyb-table-scroll-view {
|
.is-auto-height ::v-deep .wyb-table-scroll-view {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
borderRight: index === headers.length - 1 || (!showVertBorder && index !== 0) ? 'none' : '1px solid' + borderColor,
|
borderRight: index === headers.length - 1 || (!showVertBorder && index !== 0) ? 'none' : '1px solid' + borderColor,
|
||||||
zIndex: index === 0 ? 20 : 0,
|
zIndex: index === 0 ? 20 : 0,
|
||||||
left: index === 0 && firstLineFixed ? (enableCheck ? checkColWidth + 'rpx' : 0) : 'auto',
|
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}">
|
<text :style="{marginLeft: autoSortShow(index) && textAlign !== 'left' ? fontSize[0] * 0.65 + 'rpx' : 0}">
|
||||||
{{item.label || emptyString}}
|
{{item.label || emptyString}}
|
||||||
</text>
|
</text>
|
||||||
|
|||||||
Reference in New Issue
Block a user