This commit is contained in:
孟帅
2023-12-29 20:08:00 +08:00
parent c68004b6da
commit b54055810b
52 changed files with 1468 additions and 1325 deletions

View File

@@ -8,24 +8,25 @@ import { isArray, isNullObject } from '@/utils/is';
import { getFileExt } from '@/utils/urlUtils';
import { defRangeShortcuts, defShortcuts, formatToDate } from '@/utils/dateUtil';
import { validate } from '@/utils/validateUtil';
import { getOptionLabel, getOptionTag, Options, errorImg } from '@/utils/hotgo';
import { getOptionLabel, getOptionTag, Option, Options, errorImg } from '@/utils/hotgo';
@{ if eq .options.Step.HasSwitch true }
import { usePermission } from '@/hooks/web/usePermission';
const { hasPermission } = usePermission();
const $message = window['$message'];
@{end}
@{.state}
@{.defaultState}
export function newState(state: State | null): State {
export function newState(state: State | Record<string, any> | null): State {
if (state !== null) {
return cloneDeep(state);
if (state instanceof State) {
return cloneDeep(state);
}
return new State(state);
}
return cloneDeep(defaultState);
return new State();
}
@{.dictOptions.interface}
@{.dictOptions.const}
@{.rules}
@{.formSchema}