mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:46:00 +00:00
feat: use icon for boolean field
This commit is contained in:
parent
2e35947dae
commit
d74eda3f23
@ -9,6 +9,7 @@ import { fields2columns } from '../SortableTable';
|
||||
import ViewFactory from '..';
|
||||
import './style.less';
|
||||
import { getImageByUrl } from '@/components/form.fields';
|
||||
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
||||
|
||||
const InterfaceTypes = new Map<string, any>();
|
||||
|
||||
@ -65,7 +66,7 @@ export function TextareaField(props: any) {
|
||||
export function BooleanField(props: any) {
|
||||
const { value } = props;
|
||||
return (
|
||||
<>{value ? '是' : '否'}</>
|
||||
<>{value ? <CheckOutlined style={{color: '#52c41a'}}/> : <CloseOutlined style={{color: '#f5222d'}}/>}</>
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user