Browse Source

fix(table): fix tree node align

修复树形表格的带有展开图标的单元格的内容对齐问题

fixed: #829
无木 3 years ago
parent
commit
1e61da644f
2 changed files with 5 additions and 3 deletions
  1. 3 1
      CHANGELOG.zh_CN.md
  2. 2 2
      src/components/Table/src/components/ExpandIcon.tsx

+ 3 - 1
CHANGELOG.zh_CN.md

@@ -1,6 +1,8 @@
 ### 🐛 Bug Fixes
 
-- **Table** 修复滚动条样式问题
+- **Table**
+  - 修复滚动条样式问题
+  - 修复树形表格的带有展开图标的单元格的内容对齐问题
 - **AppSearch** 修复可能会搜索隐藏菜单的问题
 - **其它** 修复菜单默认折叠的配置不起作用的问题
 

+ 2 - 2
src/components/Table/src/components/ExpandIcon.tsx

@@ -3,11 +3,11 @@ import { BasicArrow } from '/@/components/Basic';
 export default () => {
   return (props: Recordable) => {
     if (!props.expandable) {
-      return <span />;
+      return <span class="ant-table-row-expand-icon ant-table-row-spaced" />;
     }
     return (
       <BasicArrow
-        class="mr-1"
+        style="margin-right: 8px"
         iconStyle="margin-top: -2px;"
         onClick={(e: Event) => {
           props.onExpand(props.record, e);