Kaynağa Gözat

fix表格判断是否存在子表头判断方法

Zimo 2 gün önce
ebeveyn
işleme
530a6f4b65
1 değiştirilmiş dosya ile 8 ekleme ve 8 silme
  1. 8 8
      src/components/ZmTable/index.vue

+ 8 - 8
src/components/ZmTable/index.vue

@@ -119,7 +119,7 @@ const isColumnNode = (node: VNode) => {
 
 const canResolveColumnChildren = (node: VNode) => {
   const nodeProps = node.props
-  return toBoolean(getPropValue(nodeProps, 'isParent'))
+  return toBoolean(getPropValue(nodeProps, 'isParent', 'is-parent'))
 }
 
 const getColumnKey = (node: VNode, index: number, parentKey?: string) => {
@@ -420,7 +420,7 @@ defineExpose({
   --zm-table-hover-bg: #f5f9ff;
   --zm-table-current-bg: #eef6ff;
   --zm-table-cell-height: 38px;
-  --zm-table-cell-padding-x: 0px;
+  --zm-table-cell-padding-x: 12px;
   --zm-table-cell-first-padding-left: 0px;
   --zm-table-cell-last-padding-right: 0px;
   --zm-table-cell-line-height: 18px;
@@ -566,15 +566,15 @@ defineExpose({
       color: var(--zm-table-strong-text-color);
 
       &:first-child {
-        .cell {
-          padding-left: var(--zm-table-cell-first-padding-left);
-        }
+        // .cell {
+        //   padding-left: var(--zm-table-cell-first-padding-left);
+        // }
       }
 
       &:last-child {
-        .cell {
-          padding-right: var(--zm-table-cell-last-padding-right);
-        }
+        // .cell {
+        //   padding-right: var(--zm-table-cell-last-padding-right);
+        // }
       }
     }
   }