From 735028c43055e8e80ebc7344af0cd0f51c744f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E6=9C=A8?= Date: Sun, 4 Jul 2021 02:41:55 +0800 Subject: [PATCH] fix(table): auto hide unnecessary scrollbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 隐藏无需显示的滚动条时 --- CHANGELOG.zh_CN.md | 1 + src/design/ant/index.less | 1 + src/design/ant/table.less | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 src/design/ant/table.less diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index e79ab4ee..4baf8ac9 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -26,6 +26,7 @@ - 修复全局配置`fetchSetting`可能会被局部配置意外修改的问题 - 修复`handleSearchInfoFn`的参数包含多余空白键的问题 - 修复为 table 提供 rowSelection.onChange 时,无法手动变更 table 的选中项的问题 + - 修复滚动条在无需显示的时候仍然持续显示的问题 - **Icon** 修复 SvgIcon 缺少部分样式的问题 - **Menu** - 修复路由映射模式下,单级菜单刷新不会激活 diff --git a/src/design/ant/index.less b/src/design/ant/index.less index 4aaea865..3f24c992 100644 --- a/src/design/ant/index.less +++ b/src/design/ant/index.less @@ -1,6 +1,7 @@ @import './pagination.less'; @import './input.less'; @import './btn.less'; +@import './table.less'; // TODO beta.11 fix .ant-col { diff --git a/src/design/ant/table.less b/src/design/ant/table.less new file mode 100644 index 00000000..48a8c490 --- /dev/null +++ b/src/design/ant/table.less @@ -0,0 +1,32 @@ +@prefix-cls: ~'@{namespace}-basic-table'; + +// fix table unnecessary scrollbar +.@{prefix-cls} { + .ant-table-wrapper { + .ant-spin-nested-loading { + .ant-spin-container { + .ant-table { + .ant-table-content { + .ant-table-scroll { + .ant-table-hide-scrollbar { + overflow-y: auto !important; + } + + .ant-table-body { + overflow: auto !important; + } + } + + .ant-table-fixed-right { + .ant-table-body-outer { + .ant-table-body-inner { + overflow-y: auto !important; + } + } + } + } + } + } + } + } +} -- GitLab