Skip to content

Commit a0aba21

Browse files
author
huangshuwei
committed
修复:
左侧固定列结合展开行,展开行宽度计算错误的问题
1 parent 81b4a40 commit a0aba21

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

packages/style/ve-table.less

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,13 @@
138138

139139
// virtual scroll phantom
140140
.ve-table-virtual-phantom {
141-
position: absolute;
142-
left: 0;
143-
top: 0;
144-
right: 0;
145-
z-index: @ve-virtual-phantom-index;
141+
&.ve-table-virtual-scroll {
142+
position: absolute;
143+
left: 0;
144+
top: 0;
145+
right: 0;
146+
z-index: @ve-virtual-phantom-index;
147+
}
146148
}
147149

148150
// 固定列效果

packages/ve-table/src/index.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,9 @@ export default {
763763
2、
764764
has left fixed column and expand option(resolve expand row content sticky)
765765
*/
766-
if (
767-
this.isVirtualScroll ||
768-
(this.hasLeftFixedColumn && this.expandOption)
769-
) {
766+
const { isVirtualScroll, hasLeftFixedColumn, expandOption } = this;
767+
768+
if (isVirtualScroll || (hasLeftFixedColumn && expandOption)) {
770769
const props = {
771770
props: {
772771
tagName: "div"
@@ -786,7 +785,10 @@ export default {
786785
content = (
787786
<div
788787
ref={this.virtualPhantomRef}
789-
class={clsName("virtual-phantom")}
788+
class={[
789+
clsName("virtual-phantom"),
790+
isVirtualScroll ? clsName("virtual-scroll") : ""
791+
]}
790792
>
791793
<VueDomResizeObserver {...props} />
792794
</div>

0 commit comments

Comments
 (0)