🐛(table): 修复 scroll 在固定列时不固定的问题
This commit is contained in:
parent
35118feb60
commit
826dc0fa75
@ -285,7 +285,7 @@ const renderFixedStyle = (column: any, columnIndex: number) => {
|
||||
}
|
||||
return { left: `${left}px` } as StyleValue;
|
||||
} else {
|
||||
var right = 0;
|
||||
var right = scrollWidthCell.value > 0 ? scrollWidthCell.value : 0;
|
||||
for (var i = columnIndex + 1; i < props.columns.length; i++) {
|
||||
if (props.columns[i].fixed && props.columns[i].fixed == "right") {
|
||||
right = right + props.columns[i]?.width.replace("px", "");
|
||||
@ -472,9 +472,12 @@ const renderTotalRowCell = (column: any) => {
|
||||
</template>
|
||||
<th
|
||||
v-if="scrollWidthCell > 0"
|
||||
class="layui-table-fixed-right"
|
||||
|
||||
:style="{
|
||||
padding: 0,
|
||||
width: `${scrollWidthCell}px`,
|
||||
background: '#fafafa'
|
||||
}"
|
||||
></th>
|
||||
</tr>
|
||||
|
@ -977,7 +977,7 @@ export default {
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-table :columns="columns5" id="id" :expand-index="1" :data-source="dataSource5" v-model:selected-keys="selectedKeys5" :checkbox="checkbox5" :default-toolbar="defaultToolbar5" @row="rowClick5">
|
||||
<lay-table :columns="columns5" id="id" :expand-index="1" :data-source="dataSource5" v-model:selected-keys="selectedKeys5" :checkbox="checkbox5" :default-toolbar="defaultToolbar5" @row="rowClick5" max-height="200px">
|
||||
<template v-slot:toolbar>
|
||||
<lay-button size="sm">新增</lay-button>
|
||||
<lay-button size="sm">删除</lay-button>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<ul>
|
||||
<a name="1-3-1"></a>
|
||||
<li>
|
||||
<h3>1.3.0 <span class="layui-badge-rim">2022-07-20</span></h3>
|
||||
<h3>1.3.1 <span class="layui-badge-rim">2022-07-20</span></h3>
|
||||
<ul>
|
||||
<li>[新增] input 组件 append 与 prepend 插槽。</li>
|
||||
<li>[新增] input 组件 password 属性, 开启密码模式。</li>
|
||||
|
@ -151,7 +151,7 @@
|
||||
</lay-tooltip>
|
||||
</lay-col>
|
||||
<lay-col :md="3">
|
||||
<lay-tooltip content="lite-flow" position="top">
|
||||
<lay-tooltip content="LiteFlow" position="top">
|
||||
<a
|
||||
style="height: 40px; display: inline-block"
|
||||
href="https://liteflow.yomahub.com"
|
||||
@ -165,7 +165,7 @@
|
||||
</lay-tooltip>
|
||||
</lay-col>
|
||||
<lay-col :md="3">
|
||||
<lay-tooltip content="cc-flow" position="top">
|
||||
<lay-tooltip content="CCFlow" position="top">
|
||||
<a
|
||||
style="height: 40px; display: inline-block"
|
||||
href="http://ccflow.org/"
|
||||
@ -179,7 +179,7 @@
|
||||
</lay-tooltip>
|
||||
</lay-col>
|
||||
<lay-col :md="3">
|
||||
<lay-tooltip content="pear-admin" position="top">
|
||||
<lay-tooltip content="Pear Admin" position="top">
|
||||
<a
|
||||
style="height: 40px; display: inline-block"
|
||||
href="http://www.pearadmin.com"
|
||||
|
Loading…
Reference in New Issue
Block a user