From 43b4b35afd2ebecccc686681e31f10fbd67114b1 Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Tue, 20 May 2025 11:38:23 +0800 Subject: [PATCH] 优化样式; --- src/components/IndexCenter/IndexCenter.js | 2 +- src/components/IndexCenter/index.less | 2 +- src/global.less | 87 +++++++++++++++------------------------------------------------------------------------ 3 files changed, 17 insertions(+), 74 deletions(-) diff --git a/src/components/IndexCenter/IndexCenter.js b/src/components/IndexCenter/IndexCenter.js index 552452f..71e13a6 100644 --- a/src/components/IndexCenter/IndexCenter.js +++ b/src/components/IndexCenter/IndexCenter.js @@ -823,7 +823,7 @@ class IndexCenter extends Component { size="middle" pagination={false} id="kpiTable" - scroll={{ x: 'max-content', y: 'calc(100vh - 250px)' }} + scroll={{ x: 'max-content', y: 'calc(100vh - 235px)' }} onRow={(record) => { return { onDoubleClick: () => { this.handleDoubleClick(record); } }; }} rowClassName={this.getRowClassName} /> diff --git a/src/components/IndexCenter/index.less b/src/components/IndexCenter/index.less index fe92eee..73a3faf 100644 --- a/src/components/IndexCenter/index.less +++ b/src/components/IndexCenter/index.less @@ -108,7 +108,7 @@ height: 100%; border: 1px solid #d9d9d9; border-top: 0; - height: calc(100vh - 240px); + height: calc(100vh - 235px); overflow: auto; // border-right: 0; &::-webkit-scrollbar { diff --git a/src/global.less b/src/global.less index 6b27529..ea70766 100644 --- a/src/global.less +++ b/src/global.less @@ -1,91 +1,34 @@ -@import "antd-v4/dist/antd.css"; +@import "antd-v4/dist/antd.compact.css"; @import "./index.less"; @import "./default.less"; @import "./variable.less"; -.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item, -.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu { - padding: 0 12px; -} - -:where(.css-dev-only-do-not-override-240cud).ant-tabs .ant-tabs-tab { - color: inherit; -} - -:where(.css-dev-only-do-not-override-240cud).ant-tabs>.ant-tabs-nav .ant-tabs-nav-more, -:where(.css-dev-only-do-not-override-240cud).ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-more { - color: inherit; -} - -.ant-btn { - padding: 3px 11px; - font-size: 12px; - height: 28px; -} - -.ant-btn>.anticon+span, -.ant-btn>span+.anticon { - margin-left: 4px; -} - -.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab, -.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-tab { - padding: 4px 8px; -} - -.ant-card { - font-size: 12px; -} - .ant-card-head { - padding: 0 12px; border-bottom: 1px solid #d9d9d9; - min-height: 36px; } -.ant-card-head-title { - padding: 8.5px 0; -} - -.ant-card-body { - padding: 12px; -} - -.ant-tree { - font-size: 12px; - line-height: 1.66667; -} - -.ant-tree .ant-tree-treenode { - padding: 0; - height: 22px; +.ant-table .ant-table-thead>tr>th { + background: #e6e6e6; } -.ant-menu-vertical>.ant-menu-item, -.ant-menu-vertical-left>.ant-menu-item, -.ant-menu-vertical-right>.ant-menu-item, -.ant-menu-inline>.ant-menu-item, -.ant-menu-vertical>.ant-menu-submenu>.ant-menu-submenu-title, -.ant-menu-vertical-left>.ant-menu-submenu>.ant-menu-submenu-title, -.ant-menu-vertical-right>.ant-menu-submenu>.ant-menu-submenu-title, -.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title { - height: 32px; - line-height: 32px; +.ant-table-thead>tr>th, +.ant-table-tbody>tr>td { + border-bottom: 1px solid #d9d9d9; } -.ant-layout-footer { - font-size: 12px; +.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th { + border-right: 1px solid #d9d9d9; } -.ant-table .ant-table-thead>tr>th { - background: #e6e6e6; +.ant-table.ant-table-bordered>.ant-table-container { + border-left: 1px solid #d9d9d9; } -.ant-table.ant-table-middle .ant-table-thead>tr>th { - padding: 8px; - font-size: 12px; +.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table, +.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table { + border-top: 1px solid #d9d9d9; } -.ant-table-tbody>tr>td { - border-bottom: 1px solid #d9d9d9; +.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td { + border-right: 1px solid #d9d9d9 !important; } \ No newline at end of file -- libgit2 0.22.2