mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-07 21:45:39 -04:00
feat: Unit standardization / conversion (#7121)
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
import type { VForm as VuetifyForm } from "vuetify/components/VForm";
|
||||
|
||||
type FormFieldType = "text" | "textarea" | "list" | "select" | "object" | "boolean" | "color" | "password";
|
||||
type FormFieldType
|
||||
= | "text"
|
||||
| "textarea"
|
||||
| "number"
|
||||
| "list"
|
||||
| "select"
|
||||
| "object"
|
||||
| "boolean"
|
||||
| "color"
|
||||
| "password";
|
||||
|
||||
export type FormValidationRule = (value: any) => boolean | string;
|
||||
|
||||
@@ -9,6 +18,13 @@ export interface FormSelectOption {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface FormFieldNumberInputConfig {
|
||||
min?: number;
|
||||
max?: number;
|
||||
precision?: number;
|
||||
controlVariant?: "split" | "default" | "hidden" | "stacked";
|
||||
}
|
||||
|
||||
export interface FormField {
|
||||
section?: string;
|
||||
sectionDetails?: string;
|
||||
@@ -20,6 +36,7 @@ export interface FormField {
|
||||
rules?: FormValidationRule[];
|
||||
disableUpdate?: boolean;
|
||||
disableCreate?: boolean;
|
||||
numberInputConfig?: FormFieldNumberInputConfig;
|
||||
options?: FormSelectOption[];
|
||||
selectReturnValue?: "text" | "value";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user