From 90b7c9fc94f7ec452f69633067f6066fdf105fa3 Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Mon, 25 Oct 2021 09:58:02 +0800 Subject: [PATCH] option-tag style (#92) --- packages/client/src/schemas/select/index.less | 3 +++ packages/client/src/schemas/select/index.tsx | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 packages/client/src/schemas/select/index.less diff --git a/packages/client/src/schemas/select/index.less b/packages/client/src/schemas/select/index.less new file mode 100644 index 000000000..742382a19 --- /dev/null +++ b/packages/client/src/schemas/select/index.less @@ -0,0 +1,3 @@ +.option-tag ~ .option-tag::before { + content: " , "; +} diff --git a/packages/client/src/schemas/select/index.tsx b/packages/client/src/schemas/select/index.tsx index 380e1389d..067f3a48f 100644 --- a/packages/client/src/schemas/select/index.tsx +++ b/packages/client/src/schemas/select/index.tsx @@ -34,6 +34,8 @@ import { Resource } from '../../resource'; import { useRequest } from 'ahooks'; import constate from 'constate'; +import './index.less'; + export const Select: any = connect( (props) => { const { options = [], ...others } = props; @@ -542,7 +544,9 @@ Select.OptionTag = observer((props) => { const { data, fieldNames } = useContext(OptionTagContext); return ( - setVisible(true)}>{data[fieldNames.label]} + setVisible(true)}> + {data[fieldNames.label]} + {props.children} );