mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-27 21:03:41 +08:00
发布v2.12.1版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -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}
|
||||
|
Reference in New Issue
Block a user