🐛(component): 修复 table 工具栏 dropdown 随滚动条滚动

This commit is contained in:
就眠儀式 2022-08-09 01:16:24 +08:00
parent 212ce9a599
commit e05781963d

View File

@ -187,7 +187,7 @@ function diff(arr1: any[], arr2: any[]) {
arr1 = Array.from(new Set(arr1)); //
arr2 = Array.from(new Set(arr2)); //
newArr = arr1.concat(arr2);
return newArr.filter(x=>!(arr1.includes(x) && arr2.includes(x)))
return newArr.filter((x) => !(arr1.includes(x) && arr2.includes(x)));
}
/**
@ -560,7 +560,7 @@ const renderTotalRowCell = (column: any) => {
<slot name="toolbar"></slot>
</div>
<div v-if="defaultToolbar" class="layui-table-tool-self">
<lay-dropdown>
<lay-dropdown updateAtScroll>
<div class="layui-inline" title="筛选列" lay-event="LAYTABLE_PRINT">
<i class="layui-icon layui-icon-cols"></i>
</div>
@ -618,7 +618,12 @@ const renderTotalRowCell = (column: any) => {
</template>
</colgroup>
<thead>
<template v-for="(tableHeadColumn, tableHeadColumnIndex) in tableHeadColumns" :key="tableHeadColumnIndex">
<template
v-for="(
tableHeadColumn, tableHeadColumnIndex
) in tableHeadColumns"
:key="tableHeadColumnIndex"
>
<tr>
<template
v-for="(column, columnIndex) in tableHeadColumn"