feat: support switching the custom widget to the expression

This commit is contained in:
MrWindlike 2023-03-30 16:08:52 +08:00
parent 38835afd81
commit 7298ccd014

View File

@ -39,7 +39,11 @@ export function shouldDisplayLabel(spec: JSONSchema7, label: string): boolean {
return true;
}
export function getCodeMode(spec: JSONSchema7): boolean {
export function getCodeMode(spec: WidgetProps['spec']): boolean {
if (spec.widget) {
return true;
}
switch (spec.type) {
case 'array':
case 'object':