mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-01 11:47:51 +08:00
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 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 (
|
||||
<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}
|
||||
</VisibleContext.Provider>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user