From 56b6c4986b18f598269f4b9f1d6933141026e966 Mon Sep 17 00:00:00 2001 From: "ext.pangzhaoqun1" Date: Mon, 14 Feb 2022 18:15:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/detail/detailColor/index.tsx | 21 +++++++++++++++++++++ src/components/detail/index.tsx | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/components/detail/detailColor/index.tsx diff --git a/src/components/detail/detailColor/index.tsx b/src/components/detail/detailColor/index.tsx new file mode 100644 index 0000000..662e720 --- /dev/null +++ b/src/components/detail/detailColor/index.tsx @@ -0,0 +1,21 @@ +import React from 'react' +import { DetailColorField } from 'ccms' +import { IColorProps, ColorDetailConfig } from 'ccms/dist/src/components/detail/detailColor' + +export const PropsType = (props: ColorDetailConfig) => {} + +export default class InfoDetailComponent extends DetailColorField { + renderComponent = (props: IColorProps) => { + + const { + value + } = props + + return ( +
+ {(value && )} + {(value && value )} +
+ ) + } +} diff --git a/src/components/detail/index.tsx b/src/components/detail/index.tsx index 69eac01..5daecbb 100644 --- a/src/components/detail/index.tsx +++ b/src/components/detail/index.tsx @@ -4,6 +4,7 @@ import StatementDetail from './statement' import EnumDetailComponent from './enum' import ImportSubformField from './importSubform' import InfoDetail from './detailInfo' +import ColorDetail from './detailColor' export default { text: TextField, @@ -11,5 +12,6 @@ export default { statement: StatementDetail, detail_enum: EnumDetailComponent, import_subform: ImportSubformField, - detail_info: InfoDetail + detail_info: InfoDetail, + detail_color: ColorDetail } -- Gitee From aaca968e1f996d79bba9441019af194aeedf5efd Mon Sep 17 00:00:00 2001 From: "ext.pangzhaoqun1" Date: Thu, 17 Mar 2022 17:12:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/detail/detailInfo/index.tsx | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/components/detail/detailInfo/index.tsx b/src/components/detail/detailInfo/index.tsx index de63460..2100457 100644 --- a/src/components/detail/detailInfo/index.tsx +++ b/src/components/detail/detailInfo/index.tsx @@ -14,29 +14,31 @@ export default class InfoDetailComponent extends DetailInfoField { return (
- {(description && description?.descType === 'text' && description?.label !== undefined && description?.label !== "") && - {(description.showIcon) && ()} - {description?.label} + {(description && description.descType === 'text' && description.label !== undefined && description.label !== "") && + {(description.showIcon) && ()} + {description.label} + } - {(description && description?.descType === 'tooltip' && description?.label !== undefined && description?.label !== "") && + {(description && description.descType === 'tooltip' && description.label !== undefined && description.label !== "") && ele.parentElement || document.body}> - {(description.showIcon) && ()} - {description?.label} + {(description.showIcon) && ()} + {description.label} } - {(description && description?.descType === 'modal' && description?.label !== undefined && description?.label !== "") && + {(description && description.descType === 'modal' && description.label !== undefined && description.label !== "") && { - Modal.success({ + Modal.info({ getContainer: () => document.getElementById('ccms-antd') || document.body, - content: description?.content, + content: (
{description.content}
), + okText: '知道了' }); }}> - {(description.showIcon) && ()} - {description?.label} + {(description.showIcon) && ()} + {description.label}
}
-- Gitee