mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 03:46:08 +00:00
feat(client): support json input in variable input (#5453)
This commit is contained in:
parent
012f648bb2
commit
cdc2d62842
@ -21,6 +21,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { useCompile } from '../../hooks';
|
import { useCompile } from '../../hooks';
|
||||||
import { XButton } from './XButton';
|
import { XButton } from './XButton';
|
||||||
import { useStyles } from './style';
|
import { useStyles } from './style';
|
||||||
|
import { Json } from '../input';
|
||||||
|
|
||||||
const JT_VALUE_RE = /^\s*{{\s*([^{}]+)\s*}}\s*$/;
|
const JT_VALUE_RE = /^\s*{{\s*([^{}]+)\s*}}\s*$/;
|
||||||
|
|
||||||
@ -124,6 +125,14 @@ const ConstantTypes = {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
object: {
|
||||||
|
label: '{{t("JSON")}}',
|
||||||
|
value: 'object',
|
||||||
|
component: Json,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
type UseTypeConstantType = true | (string | [string, Record<string, any>])[];
|
type UseTypeConstantType = true | (string | [string, Record<string, any>])[];
|
||||||
|
Loading…
Reference in New Issue
Block a user