option-tag style (#92)
This commit is contained in:
parent
76d3b3f64d
commit
90b7c9fc94
3
packages/client/src/schemas/select/index.less
Normal file
3
packages/client/src/schemas/select/index.less
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.option-tag ~ .option-tag::before {
|
||||||
|
content: " , ";
|
||||||
|
}
|
@ -34,6 +34,8 @@ import { Resource } from '../../resource';
|
|||||||
import { useRequest } from 'ahooks';
|
import { useRequest } from 'ahooks';
|
||||||
import constate from 'constate';
|
import constate from 'constate';
|
||||||
|
|
||||||
|
import './index.less';
|
||||||
|
|
||||||
export const Select: any = connect(
|
export const Select: any = connect(
|
||||||
(props) => {
|
(props) => {
|
||||||
const { options = [], ...others } = props;
|
const { options = [], ...others } = props;
|
||||||
@ -542,7 +544,9 @@ Select.OptionTag = observer((props) => {
|
|||||||
const { data, fieldNames } = useContext(OptionTagContext);
|
const { data, fieldNames } = useContext(OptionTagContext);
|
||||||
return (
|
return (
|
||||||
<VisibleContext.Provider value={[visible, setVisible]}>
|
<VisibleContext.Provider value={[visible, setVisible]}>
|
||||||
<a onClick={() => setVisible(true)}>{data[fieldNames.label]}</a>
|
<a className="option-tag" onClick={() => setVisible(true)}>
|
||||||
|
{data[fieldNames.label]}
|
||||||
|
</a>
|
||||||
{props.children}
|
{props.children}
|
||||||
</VisibleContext.Provider>
|
</VisibleContext.Provider>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user