refactor(frontend): fix enum types in scripts/form (#11138)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
type EnumItem = string | {label: string; value: string;};
|
||||||
export type FormItem = {
|
export type FormItem = {
|
||||||
label?: string;
|
label?: string;
|
||||||
type: 'string';
|
type: 'string';
|
||||||
@@ -20,7 +21,7 @@ export type FormItem = {
|
|||||||
type: 'enum';
|
type: 'enum';
|
||||||
default: string | null;
|
default: string | null;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
enum: string[];
|
enum: EnumItem[];
|
||||||
} | {
|
} | {
|
||||||
label?: string;
|
label?: string;
|
||||||
type: 'radio';
|
type: 'radio';
|
||||||
|
Reference in New Issue
Block a user