Просмотр исходного кода

feat: 合同管理第一层节点加粗显示且不能删除

lanjianrong 4 лет назад
Родитель
Сommit
1ef32bef24

+ 3 - 0
src/pages/Contract/Content/Income/components/TableContent/index.module.scss

@@ -15,6 +15,9 @@
     :global(.ant-input-group-addon) {
       padding: 0 6px;
     }
+    :global(.ant-table-row.ant-table-row-level-0) {
+      font-weight: 600;
+    }
     // :global(.ant-table-tbody > tr > td) {
     //   padding: 0.3rem;
     // }

+ 1 - 1
src/pages/Contract/Content/Income/index.tsx

@@ -133,7 +133,7 @@ const Income: React.FC<RouteComponentProps> = (props) => {
                     <Button type="text" icon={<SvgIcon type="xxh-plus" style={{ color: '#007bff', fontSize: 12 }} />} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId, name: '' })} />
                   </Tooltip>
                   {
-                    !row.children?.length ?
+                    !row.children?.length && row.depth !== 1?
                       <Tooltip title="删除">
                         <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff', fontSize: 12 }} />} onClick={() => treeResfulApiHandler('del', { id: row.id, bidsectionId: row.bidsectionId })} />
                       </Tooltip>