Skip to content

Commit

Permalink
feat: 样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xucz committed May 4, 2022
1 parent 36b0a09 commit 07c81a1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 19 deletions.
3 changes: 2 additions & 1 deletion src/components/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ export const TrendIcon = ({ trend, trendNum }: { trend?: ETrend; trendNum?: stri
</div>
);

const Board = ({ title, count, desc, trend, trendNum, Icon, dark }: IBoardProps) => (
const Board = ({ title, count, desc, trend, trendNum, Icon, dark, border }: IBoardProps) => (
<Card
title={<div className={Style.boardTitle}>{title}</div>}
header
className={classnames({
[Style.boardPanelDark]: dark,
})}
bordered={border}
footer={
<div className={Style.boardItemBottom}>
<div className={Style.boardItemDesc}>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/Header.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
z-index: 101;
display: flex;
justify-content: space-between;
//border-bottom: 1px solid var(--td-gray-color-10);
border-bottom: 1px solid var(--td-component-stroke);
}
12 changes: 6 additions & 6 deletions src/pages/Dashboard/Base/components/RankList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const SALE_COLUMNS: TdPrimaryTableProps['columns'] = [
title: '排名',
width: 80,
fixed: 'left',
render: ({ rowIndex }) => (
cell: ({ rowIndex }) => (
<span className={classnames(Style.rankIndex, { [Style.rankIndexTop]: rowIndex < 3 })}>{rowIndex + 1}</span>
),
},
Expand All @@ -36,7 +36,7 @@ const SALE_COLUMNS: TdPrimaryTableProps['columns'] = [
colKey: 'growUp',
width: 100,
title: '较上周',
render: ({ row }) => <TrendIcon trend={row.growUp < 0 ? ETrend.down : ETrend.up} trendNum={Math.abs(row.growUp)} />,
cell: ({ row }) => <TrendIcon trend={row.growUp < 0 ? ETrend.down : ETrend.up} trendNum={Math.abs(row.growUp)} />,
},
{
align: 'center',
Expand All @@ -56,7 +56,7 @@ const SALE_COLUMNS: TdPrimaryTableProps['columns'] = [
fixed: 'right',
title: '操作',
width: 80,
render: ({ row }) => (
cell: ({ row }) => (
<Button variant='text' theme='primary' onClick={() => console.log(row)}>
操作
</Button>
Expand All @@ -71,7 +71,7 @@ const PURCHASE_COLUMNS: TdPrimaryTableProps['columns'] = [
title: '排名',
width: 80,
fixed: 'left',
render: ({ rowIndex }) => (
cell: ({ rowIndex }) => (
<span className={classnames(Style.rankIndex, { [Style.rankIndexTop]: rowIndex < 3 })}>{rowIndex + 1}</span>
),
},
Expand All @@ -87,7 +87,7 @@ const PURCHASE_COLUMNS: TdPrimaryTableProps['columns'] = [
colKey: 'growUp',
width: 100,
title: '较上周',
render: ({ row }) => <TrendIcon trend={row.growUp < 0 ? ETrend.down : ETrend.up} trendNum={Math.abs(row.growUp)} />,
cell: ({ row }) => <TrendIcon trend={row.growUp < 0 ? ETrend.down : ETrend.up} trendNum={Math.abs(row.growUp)} />,
},
{
align: 'center',
Expand All @@ -107,7 +107,7 @@ const PURCHASE_COLUMNS: TdPrimaryTableProps['columns'] = [
title: '操作',
fixed: 'right',
width: 80,
render: ({ row }) => (
cell: ({ row }) => (
<Button variant='text' theme='primary' onClick={() => console.log(row)}>
操作
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard/Detail/components/PurchaseTrend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ProductTrend = ({ type, isSetup, description, name, icon }: IProductTrendP

<p className={Style.productName}>{name}</p>
<p className={Style.productDesc}>{description}</p>
<Row justify='space-between' align='middle' className='cardControlClass'>
<Row justify='space-between' align='middle'>
<div className={Style.iconWrap}>
<Button shape='circle' disabled={!isSetup}>
{type}
Expand Down
9 changes: 1 addition & 8 deletions src/pages/List/Base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,14 @@ export default memo(() => {
},
{
align: 'left',
width: 300,
minWidth: 300,
width: 50,
ellipsis: true,
colKey: 'name',
title: '合同名称',
},
{
align: 'left',
width: 200,
minWidth: 200,
ellipsis: true,
colKey: 'status',
title: '合同状态',
Expand All @@ -135,15 +133,13 @@ export default memo(() => {
{
align: 'left',
width: 200,
minWidth: 200,
ellipsis: true,
colKey: 'no',
title: '合同编号',
},
{
align: 'left',
width: 200,
minWidth: 200,
ellipsis: true,
colKey: 'contractType',
title: '合同类型',
Expand All @@ -154,7 +150,6 @@ export default memo(() => {
{
align: 'left',
width: 200,
minWidth: 200,
ellipsis: true,
colKey: 'paymentType',
title: '合同收付类型',
Expand All @@ -165,7 +160,6 @@ export default memo(() => {
{
align: 'left',
width: 200,
minWidth: 200,
ellipsis: true,
colKey: 'amount',
title: '合同金额(元)',
Expand All @@ -174,7 +168,6 @@ export default memo(() => {
align: 'left',
fixed: 'right',
width: 200,
minWidth: 200,
colKey: 'op',
title: '操作',
cell() {
Expand Down
2 changes: 0 additions & 2 deletions src/pages/List/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const SelectTable = () => {
{
title: '合同名称',
fixed: 'left',
minWidth: '300',
align: 'left',
ellipsis: true,
colKey: 'name',
Expand Down Expand Up @@ -108,7 +107,6 @@ export const SelectTable = () => {
align: 'left',
fixed: 'right',
width: 200,
minWidth: 200,
colKey: 'op',
title: '操作',
cell(record) {
Expand Down

0 comments on commit 07c81a1

Please sign in to comment.