From ffab0bcd0938e18c23e111d53197da44eb46cf01 Mon Sep 17 00:00:00 2001 From: "ext.pangzhaoqun1" Date: Mon, 24 Jan 2022 15:40:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8B=89=E5=8F=96=E8=BF=9C=E7=A8=8Bv1.2.2?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/steps/table/index.less | 7 ++++++- src/steps/table/index.tsx | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/steps/table/index.less b/src/steps/table/index.less index 157b1c1..fe73e92 100644 --- a/src/steps/table/index.less +++ b/src/steps/table/index.less @@ -1,7 +1,7 @@ .ccms-antd-table { &>.ccms-antd-table-header { display: flex; - justify-content: space-between; + // justify-content: space-between; align-items: center; margin-bottom: 16px; @@ -13,5 +13,10 @@ &>.ccms-antd-table-tableOperation { margin-left: 16px; } + &>.ccms-antd-table-title-explain { + margin-left: 16px; + font-size: 14px; + color: #abb7c4; + } } } \ No newline at end of file diff --git a/src/steps/table/index.tsx b/src/steps/table/index.tsx index 1ca32da..51b7a30 100644 --- a/src/steps/table/index.tsx +++ b/src/steps/table/index.tsx @@ -1,8 +1,8 @@ import React from 'react' import { TableStep } from 'ccms' import { ITable, ITableColumn, ITableStepOperationConfirm, ITableStepOperationModal, ITableStepRowOperation, ITableStepRowOperationButton, ITableStepRowOperationGroup, ITableStepRowOperationGroupItem, ITableStepTableOperation, ITableStepTableOperationButton, ITableStepTableOperationGroup, ITableStepTableOperationGroupItem } from 'ccms/dist/src/steps/table' -import { Table, Button, Dropdown, Menu, Modal, Space } from 'antd' -import { DownOutlined } from '@ant-design/icons' +import { Table, Button, Dropdown, Menu, Modal, Space, Tooltip } from 'antd' +import { DownOutlined, InfoCircleOutlined } from '@ant-design/icons' import getALLComponents from '../../components/tableColumns' import CCMS from '../../main' import InterfaceHelper from '../../util/interface' @@ -32,14 +32,42 @@ export default class TableStepComponent extends TableStep { primary, columns, data, - pagination + pagination, + description } = props + const text = prompt text; + return (
{(title || tableOperations) && (
{title}
+
+ {(description && description?.type === 'text' && description?.label !== undefined && description?.label !== "") && + + {description?.label} + } + {(description && description?.type === 'tooltip' && description?.label !== undefined && description?.label !== "") && + ele.parentElement || document.body}> + + {description?.label} + + } + {(description && description?.type === 'modal' && description?.label !== undefined && description?.label !== "") && + { + Modal.success({ + getContainer: () => document.getElementById('ccms-antd') || document.body, + content: description?.content, + }); + }}> + {description?.label} + + } +
{tableOperations}
)} -- Gitee From 36efef323fc20caf40a58416acf3155c931b302a Mon Sep 17 00:00:00 2001 From: "ext.pangzhaoqun1" Date: Tue, 25 Jan 2022 18:54:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9review=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/steps/table/index.less | 17 ++++++------ src/steps/table/index.tsx | 53 +++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/src/steps/table/index.less b/src/steps/table/index.less index fe73e92..6eb2aba 100644 --- a/src/steps/table/index.less +++ b/src/steps/table/index.less @@ -1,22 +1,23 @@ .ccms-antd-table { &>.ccms-antd-table-header { display: flex; - // justify-content: space-between; + justify-content: space-between; align-items: center; margin-bottom: 16px; - &>.ccms-antd-table-title { color: #000000d9; font-weight: 500; font-size: 16px; + display: flex; + &>.ccms-antd-table-title-explain { + margin-left: 16px; + font-size: 14px; + color: #abb7c4; + margin-top: 2px; + } } &>.ccms-antd-table-tableOperation { margin-left: 16px; } - &>.ccms-antd-table-title-explain { - margin-left: 16px; - font-size: 14px; - color: #abb7c4; - } } - } \ No newline at end of file + } diff --git a/src/steps/table/index.tsx b/src/steps/table/index.tsx index 51b7a30..c465b4c 100644 --- a/src/steps/table/index.tsx +++ b/src/steps/table/index.tsx @@ -36,37 +36,38 @@ export default class TableStepComponent extends TableStep { description } = props - const text = prompt text; - return (
{(title || tableOperations) && (
-
{title}
-
- {(description && description?.type === 'text' && description?.label !== undefined && description?.label !== "") && - - {description?.label} - } - {(description && description?.type === 'tooltip' && description?.label !== undefined && description?.label !== "") && - ele.parentElement || document.body}> - +
{title} +
+ {(description && description?.type === 'text' && description?.label !== undefined && description?.label !== "") && + {(description.showIcon) && ()} + {description?.label} + } + {(description && description?.type === 'tooltip' && description?.label !== undefined && description?.label !== "") && + ele.parentElement || document.body}> + {(description.showIcon) && ()} + {description?.label} + + } + {(description && description?.type === 'modal' && description?.label !== undefined && description?.label !== "") && + { + Modal.success({ + getContainer: () => document.getElementById('ccms-antd') || document.body, + content: description?.content, + }); + }}> + {(description.showIcon) && ()} {description?.label} - - } - {(description && description?.type === 'modal' && description?.label !== undefined && description?.label !== "") && - { - Modal.success({ - getContainer: () => document.getElementById('ccms-antd') || document.body, - content: description?.content, - }); - }}> - {description?.label} - - } + + } +
{tableOperations}
-- Gitee From aa9b284926ea7c21e3b3abc1b8ead20a05ca2e45 Mon Sep 17 00:00:00 2001 From: niuxg0 Date: Sat, 29 Jan 2022 11:09:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=9D=A1=E4=BB=B6/=E8=B0=83=E6=95=B4UI=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/steps/table/index.tsx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/steps/table/index.tsx b/src/steps/table/index.tsx index c465b4c..6036507 100644 --- a/src/steps/table/index.tsx +++ b/src/steps/table/index.tsx @@ -38,33 +38,34 @@ export default class TableStepComponent extends TableStep { return (
- {(title || tableOperations) && ( + {(title || (description && ((description.label !== undefined && description.label !== '') || description.showIcon)) || tableOperations) && (
{title}
- {(description && description?.type === 'text' && description?.label !== undefined && description?.label !== "") && + {(description && description.type === 'text' && ((description.label !== undefined && description.label !== "") || description.showIcon)) && {(description.showIcon) && ()} - {description?.label} + {description.label} } - {(description && description?.type === 'tooltip' && description?.label !== undefined && description?.label !== "") && + {(description && description.type === 'tooltip' && ((description.label !== undefined && description.label !== "") || description.showIcon)) && ele.parentElement || document.body}> {(description.showIcon) && ()} - {description?.label} + {description.label} } - {(description && description?.type === 'modal' && description?.label !== undefined && description?.label !== "") && - { - Modal.success({ + {(description && description.type === 'modal' && ((description.label !== undefined && description.label !== "") || description.showIcon)) && + { + Modal.info({ getContainer: () => document.getElementById('ccms-antd') || document.body, - content: description?.content, + content: (
{description.content}
), + okText: '知道了' }); }}> {(description.showIcon) && ()} - {description?.label} + {description.label}
}
-- Gitee