@kengic/vue 0.25.1-beta.1 → 0.25.2-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,185 @@
1
+ import type { ComponentPublicInstance, ComponentRenderProxy, FunctionalComponent, PropType as VuePropType, VNode, VNodeChild } from 'vue';
2
+
3
+ declare global {
4
+ const __APP_INFO__: {
5
+ pkg: {
6
+ name: string;
7
+ version: string;
8
+ dependencies: Recordable<string>;
9
+ devDependencies: Recordable<string>;
10
+ };
11
+ lastBuildTime: string;
12
+ };
13
+ // declare interface Window {
14
+ // // Global vue app instance
15
+ // __APP__: App<Element>;
16
+ // }
17
+
18
+ // vue
19
+ declare type VueNode = VNodeChild | JSX.Element;
20
+
21
+ export type Writable<T> = {
22
+ -readonly [P in keyof T]: T[P];
23
+ };
24
+
25
+ declare type Nullable<T> = T | null;
26
+ declare type NonNullable<T> = T extends null | undefined ? never : T;
27
+ declare type Recordable<T = any> = Record<string, T>;
28
+ declare type ReadonlyRecordable<T = any> = {
29
+ readonly [key: string]: T;
30
+ };
31
+ declare type Indexable<T = any> = {
32
+ [key: string]: T;
33
+ };
34
+ declare type DeepPartial<T> = {
35
+ [P in keyof T]?: DeepPartial<T[P]>;
36
+ };
37
+ declare type TimeoutHandle = ReturnType<typeof setTimeout>;
38
+ declare type IntervalHandle = ReturnType<typeof setInterval>;
39
+
40
+ declare interface ChangeEvent extends Event {
41
+ target: HTMLInputElement;
42
+ }
43
+
44
+ declare interface WheelEvent {
45
+ path?: EventTarget[];
46
+ }
47
+
48
+ interface ImportMetaEnv extends ViteEnv {
49
+ __: unknown;
50
+ }
51
+
52
+ declare interface ViteEnv {
53
+ VITE_PORT: number;
54
+ VITE_USE_MOCK: boolean;
55
+ VITE_USE_PWA: boolean;
56
+ VITE_PUBLIC_PATH: string;
57
+ VITE_PROXY: [string, string][];
58
+ VITE_GLOB_APP_TITLE: string;
59
+ VITE_GLOB_APP_SHORT_NAME: string;
60
+ VITE_USE_CDN: boolean;
61
+ VITE_DROP_CONSOLE: boolean;
62
+ VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
63
+ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean;
64
+ VITE_LEGACY: boolean;
65
+ VITE_USE_IMAGEMIN: boolean;
66
+ VITE_GENERATE_UI: string;
67
+ }
68
+
69
+ declare function parseInt(s: string | number, radix?: number): number;
70
+
71
+ declare function parseFloat(string: string | number): number;
72
+
73
+ declare interface Fn<T = any, R = T> {
74
+ (...arg: T[]): R;
75
+ }
76
+
77
+ declare interface PromiseFn<T = any, R = T> {
78
+ (...arg: T[]): Promise<R>;
79
+ }
80
+
81
+ declare type RefType<T> = T | null;
82
+
83
+ declare type LabelValueOptions = {
84
+ label: string;
85
+ value: any;
86
+ [key: string]: string | number | boolean;
87
+ }[];
88
+
89
+ declare type EmitType = (event: string, ...args: any[]) => void;
90
+ declare type TargetContext = '_self' | '_blank';
91
+
92
+ declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
93
+ declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
94
+ declare type PropType<T> = VuePropType<T>;
95
+
96
+ declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
97
+ $el: T;
98
+ }
99
+
100
+ namespace JSX {
101
+ // tslint:disable no-empty-interface
102
+ type Element = VNode;
103
+ // tslint:disable no-empty-interface
104
+ type ElementClass = ComponentRenderProxy;
105
+
106
+ interface ElementAttributesProperty {
107
+ $props: any;
108
+ }
109
+
110
+ interface IntrinsicElements {
111
+ [elem: string]: any;
112
+ }
113
+
114
+ interface IntrinsicAttributes {
115
+ [elem: string]: any;
116
+ }
117
+ }
118
+ }
119
+
120
+ declare module 'vue' {
121
+ export type JSXComponent<Props = any> = { new (): ComponentPublicInstance<Props> } | FunctionalComponent<Props>;
122
+ }
123
+
124
+ declare module '*.vue' {
125
+ import { DefineComponent } from 'vue';
126
+ const Component: DefineComponent<{}, {}, any>;
127
+ export default Component;
128
+ }
129
+
130
+ declare module 'ant-design-vue/dist/theme';
131
+
132
+ declare module 'ant-design-vue/es/locale/*' {
133
+ import { Locale } from 'ant-design-vue/types/locale-provider';
134
+ const locale: Locale & ReadonlyRecordable;
135
+ export default locale as Locale & ReadonlyRecordable;
136
+ }
137
+
138
+ declare module 'virtual:*' {
139
+ const result: any;
140
+ export default result;
141
+ }
142
+
143
+ declare module 'vue-router' {
144
+ interface RouteMeta extends Record<string | number | symbol, unknown> {
145
+ orderNo?: number;
146
+ // title
147
+ title: string;
148
+ // dynamic router level.
149
+ dynamicLevel?: number;
150
+ // dynamic router real route path (For performance).
151
+ realPath?: string;
152
+ // Whether to ignore permissions
153
+ ignoreAuth?: boolean;
154
+ // role info
155
+ roles?: RoleEnum[];
156
+ // Whether not to cache
157
+ ignoreKeepAlive?: boolean;
158
+ // Is it fixed on tab
159
+ affix?: boolean;
160
+ // icon on tab
161
+ icon?: string;
162
+ frameSrc?: string;
163
+ // current page transition
164
+ transitionName?: string;
165
+ // Whether the route has been dynamically added
166
+ hideBreadcrumb?: boolean;
167
+ // Hide submenu
168
+ hideChildrenInMenu?: boolean;
169
+ // Carrying parameters
170
+ carryParam?: boolean;
171
+ // Used internally to mark single-level menus
172
+ single?: boolean;
173
+ // Currently active menu
174
+ currentActiveMenu?: string;
175
+ // Never show in tab
176
+ hideTab?: boolean;
177
+ // Never show in menu
178
+ hideMenu?: boolean;
179
+ isLink?: boolean;
180
+ // only build for Menu
181
+ ignoreRoute?: boolean;
182
+ // Hide path for children
183
+ hidePathForChildren?: boolean;
184
+ }
185
+ }
@@ -503,7 +503,7 @@ export declare class VarConfigLookup {
503
503
  var_nam?: string | null;
504
504
  constructor(obj?: VarConfigLookup);
505
505
  }
506
- /** 变量配置:下拉列表. */
506
+ /** 变量配置:列表数据. */
507
507
  export declare class VarConfigPossibility {
508
508
  /** 接口地址(Command). */
509
509
  cmd?: string | null;
@@ -777,7 +777,7 @@ export declare class VarProfileDetail {
777
777
  export declare class VarProfileMaster {
778
778
  /** 定制级别(CustomLevel). */
779
779
  cust_lvl?: number | null;
780
- /** 是否默认(DefaultFlag). */
780
+ /** 是否是默认的视图(DefaultFlag). */
781
781
  def_flg?: number | null;
782
782
  /** 是否启用高级查询(DynamicQueryFlag). */
783
783
  dyn_flg?: number | null;
@@ -60,9 +60,13 @@ export declare type IKgFormSelectBeforeSetDatasEventListenerParameter<T = any> =
60
60
  context: KG_FORM_CONTEXT;
61
61
  /** 列表数据. */
62
62
  datas: Ref<Array<T>>;
63
+ /** @deprecated */
63
64
  isCopying: boolean | null;
65
+ /** @deprecated */
64
66
  isCreating: boolean | null;
67
+ /** @deprecated */
65
68
  isDeleting: boolean | null;
69
+ /** @deprecated */
66
70
  isUpdating: boolean | null;
67
71
  /** 变量名称. */
68
72
  varName: string;
@@ -73,15 +77,22 @@ export declare type IKgFormSelectChangeEventListenerParameter = {
73
77
  * 表单控件所处环境.
74
78
  */
75
79
  context: KG_FORM_CONTEXT;
80
+ /** @deprecated */
76
81
  isCopying: boolean | null;
82
+ /** @deprecated */
77
83
  isCreating: boolean | null;
84
+ /** @deprecated */
78
85
  isDeleting: boolean | null;
79
86
  /** 是否多选, 否则单选. */
80
87
  isMultiple: boolean;
88
+ /** @deprecated */
81
89
  isUpdating: boolean | null;
82
- /** @deprecated 已弃用, 请使用 {@link formModel}. */
90
+ /** @deprecated */
83
91
  model: Ref<Record<string, any> | null> | null;
84
- /** 表单数据对象. */
92
+ /**
93
+ * 表单数据对象.
94
+ * @deprecated
95
+ */
85
96
  formModel: Ref<Record<string, any> | null> | null;
86
97
  /** 选中的数据对象组成的数组, 如果是单选则数组中只有一个数据对象. */
87
98
  rows: Array<any> | null;
@@ -1,4 +1,4 @@
1
- import { ExtractPropTypes } from 'vue';
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
2
  export declare const getProps: () => {
3
3
  /**
4
4
  * 表单控件类型.
@@ -55,24 +55,31 @@ export interface IUseKgTable {
55
55
  * @param listener 事件监听函数.
56
56
  * @param isOnce 是否只会触发一次. 默认为 undefined.
57
57
  */
58
+ onAfterRequest(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
59
+ /**
60
+ * @deprecated 已废弃, 请使用 onAfterRequest() 方法.
61
+ */
58
62
  onAfterSearch(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
59
63
  /**
60
- * 监听事件: 即将解析请求参数.
64
+ * <p>监听事件: 即将解析请求参数.</p>
65
+ * <p>在该事件中, 可以修改解析前的参数.</p>
66
+ *
61
67
  * @param listener 事件监听函数.
62
68
  * @param isOnce 是否只会触发一次. 默认为 undefined.
63
69
  */
64
- onBeforeParseParameter(listener: IKgTableBeforeParseParameterEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
70
+ onBeforeParseRequestParameter(listener: IKgTableBeforeParseParameterEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
65
71
  /**
66
72
  * 监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
67
73
  * @param listener 事件监听函数.
68
74
  * @param isOnce 是否只会触发一次. 默认为 undefined.
69
- * @deprecated 已废弃, 请使用 onBeforeSearch() 方法.
75
+ */
76
+ onBeforeRequest(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
77
+ /**
78
+ * @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
70
79
  */
71
80
  onBeforeRetrieve(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
72
81
  /**
73
- * 监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
74
- * @param listener 事件监听函数.
75
- * @param isOnce 是否只会触发一次. 默认为 undefined.
82
+ * @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
76
83
  */
77
84
  onBeforeSearch(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
78
85
  /**
@@ -88,9 +95,6 @@ export interface IUseKgTable {
88
95
  */
89
96
  onReady(listener: IKgTableReadyEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
90
97
  /**
91
- * 监听事件: 查询请求成功, 表格数据已经赋值, 表格状态已经更新.
92
- * @param listener 事件监听函数.
93
- * @param isOnce 是否只会触发一次. 默认为 undefined.
94
98
  * @deprecated 已废弃, 请使用 onAfterSearch() 方法.
95
99
  */
96
100
  onRetrieve(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
@@ -8,12 +8,12 @@ import { IKgTableRow, IKgTableRowHeight } from './index.vm';
8
8
  * 事件类型.
9
9
  * 'ready': 就绪, 配置初始完成, 组件渲染完成
10
10
  * 'rowDoubleClick': 双击某行
11
- * 'beforeParseParameter': 即将解析请求参数,
12
- * 'beforeSearch': 即将发起查询请求, 如果返回 true 表示不会发起请求
11
+ * 'beforeParseRequestParameter': 即将解析请求参数,
12
+ * 'beforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
13
13
  * 'beforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
14
- * 'afterSearch': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
14
+ * 'afterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
15
15
  */
16
- export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | 'beforeParseParameter' | 'beforeSearch' | 'beforeSetDatas' | 'afterSearch';
16
+ export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | 'beforeParseRequestParameter' | 'beforeRequest' | 'beforeSetDatas' | 'afterRequest';
17
17
  export declare type IKgTableReadyEventListenerParameter = {};
18
18
  export declare type IKgTableReadyEventListener = ((param: IKgTableReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
19
19
  export declare type IKgTableRowDoubleClickEventListenerParameter = {
@@ -21,13 +21,13 @@ export declare type IKgTableRowDoubleClickEventListenerParameter = {
21
21
  row: IKgTableRow;
22
22
  };
23
23
  export declare type IKgTableRowDoubleClickEventListener = ((param: IKgTableRowDoubleClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
24
- export declare type IKgTableBeforeParseParameterEventListenerParameter = {
24
+ export declare type IKgTableBeforeParseRequestParameterEventListenerParameter = {
25
25
  /**
26
26
  * 查询接口请求参数, 尚未解析.
27
27
  */
28
28
  params: Record<string, any>;
29
29
  };
30
- export declare type IKgTableBeforeParseParameterEventListener = ((param: IKgTableBeforeParseParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
30
+ export declare type IKgTableBeforeParseParameterEventListener = ((param: IKgTableBeforeParseRequestParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
31
31
  export declare type IKgTableBeforeRequestEventListenerParameter = {
32
32
  /** 查询接口请求参数. */
33
33
  params: Record<string, any>;
@@ -55,7 +55,7 @@ export declare type IKgTableAfterRequestEventListenerParameter = {
55
55
  datas: Ref<Array<IKgTableRow>>;
56
56
  };
57
57
  export declare type IKgTableAfterRequestEventListener = ((param: IKgTableAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
58
- export declare type IKgTableEventListenerParameter = IKgTableReadyEventListenerParameter | IKgTableRowDoubleClickEventListenerParameter | IKgTableBeforeParseParameterEventListenerParameter | IKgTableBeforeRequestEventListenerParameter | IKgTableBeforeSetDatasEventListenerParameter | IKgTableAfterRequestEventListenerParameter;
58
+ export declare type IKgTableEventListenerParameter = IKgTableReadyEventListenerParameter | IKgTableRowDoubleClickEventListenerParameter | IKgTableBeforeParseRequestParameterEventListenerParameter | IKgTableBeforeRequestEventListenerParameter | IKgTableBeforeSetDatasEventListenerParameter | IKgTableAfterRequestEventListenerParameter;
59
59
  export declare type IKgTableEventListener = IKgTableReadyEventListener | IKgTableRowDoubleClickEventListener | IKgTableBeforeParseParameterEventListener | IKgTableBeforeRequestEventListener | IKgTableBeforeSetDatasEventListener | IKgTableAfterRequestEventListener;
60
60
  export interface IUseKgTableStoreState {
61
61
  afterRequestEventListenersMap: Map<string, Array<IKgTableAfterRequestEventListener>>;
@@ -1,13 +1,17 @@
1
- import { VarButton, VarButtonConfig, VarChildDetail, VarConfigPossibility, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
1
+ import { VarButton, VarButtonConfig, VarChildDetail, VarConfigControl, VarConfigInput, VarConfigLookup, VarConfigPossibility, VarConfigTip, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
2
2
  export declare function transformVarProfileConfig(varProfileConfig: VarProfileConfig | null | undefined): VarProfileConfig | null;
3
3
  export declare function transformVarGridConfig(varGridConfig: VarGridConfig | null | undefined): VarGridConfig | null;
4
- export declare function transformVarGridMasterDTOs(varGridMasterDTOs?: Array<VarGridMasterDTO> | null): Array<VarGridMasterDTO>;
4
+ export declare function transformVarGridMasters(varGridMasters?: Array<VarGridMasterDTO> | null): Array<VarGridMasterDTO>;
5
5
  export declare function transformVarChildDetails(varChildDetails: Array<VarChildDetail> | null | undefined): Array<VarChildDetail>;
6
- export declare function transformVarProfileMasterDTOs(varProfileMasterDTOs?: Array<VarProfileMasterDTO> | null): Array<VarProfileMasterDTO>;
6
+ export declare function transformVarProfileMasters(varProfileMasters?: Array<VarProfileMasterDTO> | null): Array<VarProfileMasterDTO>;
7
7
  export declare function transformVarSubmitConfigs(varSubmitConfigs?: Array<VarSubmitConfig> | null): Array<VarSubmitConfig>;
8
8
  export declare function transformVarSubmitDetails(varSubmitDetails?: Array<VarSubmitDetail> | null): Array<VarSubmitDetail>;
9
9
  export declare function transformVarButtons(varButtons?: Array<VarButton> | null): Array<VarButton>;
10
10
  export declare function transformVarConfigPossibilities(varConfigPossibilities: Array<VarConfigPossibility> | null | undefined): Array<VarConfigPossibility>;
11
+ export declare function transformVarConfigControls(varConfigControls: Array<VarConfigControl> | null | undefined): Array<VarConfigControl>;
12
+ export declare function transformVarConfigLookups(varConfigLookups: Array<VarConfigLookup> | null | undefined): Array<VarConfigLookup>;
13
+ export declare function transformVarConfigTips(varConfigTips: Array<VarConfigTip> | null | undefined): Array<VarConfigTip>;
14
+ export declare function transformVarConfigInputs(varConfigInputs: Array<VarConfigInput> | null | undefined): Array<VarConfigInput>;
11
15
  export declare function transformVarButtonConfig(varButtonConfig: VarButtonConfig | null | undefined): VarButtonConfig | null;
12
16
  /**
13
17
  * 处理 VarGridDetail 数据.
@@ -15,9 +19,4 @@ export declare function transformVarButtonConfig(varButtonConfig: VarButtonConfi
15
19
  * @param varGridDetails 原始数据.
16
20
  */
17
21
  export declare function transformVarGridDetails(varGridDetails?: Array<VarGridDetail> | null): Array<VarGridDetail>;
18
- /**
19
- * 处理 VarProfileDetail 数据.
20
- *
21
- * @param varProfileDetails 原始数据.
22
- */
23
22
  export declare function transformVarProfileDetails(varProfileDetails?: Array<VarProfileDetail> | null): Array<VarProfileDetail>;
@@ -233,7 +233,7 @@ declare const _default: {
233
233
  edit: string;
234
234
  empty: string;
235
235
  emptyText: string;
236
- 'execute-success': string;
236
+ executeSuccess: string;
237
237
  export: string;
238
238
  exportSuccess: string;
239
239
  formId: string;
@@ -233,7 +233,7 @@ declare const _default: {
233
233
  edit: string;
234
234
  empty: string;
235
235
  emptyText: string;
236
- 'execute-success': string;
236
+ executeSuccess: string;
237
237
  export: string;
238
238
  exportSuccess: string;
239
239
  formId: string;
@@ -1 +1,2 @@
1
1
  export * from './src';
2
+ export * from './types';
@@ -0,0 +1,35 @@
1
+ export declare type ErrorMessageMode = 'none' | 'modal' | 'message' | undefined;
2
+ export declare type SuccessMessageMode = 'none' | 'success' | 'error' | undefined;
3
+ export interface RequestOptions {
4
+ joinParamsToUrl?: boolean;
5
+ formatDate?: boolean;
6
+ isTransformResponse?: boolean;
7
+ isReturnNativeResponse?: boolean;
8
+ joinPrefix?: boolean;
9
+ apiUrl?: string;
10
+ urlPrefix?: string;
11
+ errorMessageMode?: ErrorMessageMode;
12
+ successMessageMode?: SuccessMessageMode;
13
+ joinTime?: boolean;
14
+ ignoreCancelToken?: boolean;
15
+ withToken?: boolean;
16
+ }
17
+ export interface Result<T = any> {
18
+ code: number;
19
+ type: 'success' | 'error' | 'warning';
20
+ message: string;
21
+ success?: boolean | null;
22
+ timestamp?: number | null;
23
+ result: T;
24
+ }
25
+ export interface UploadFileParams {
26
+ data?: Recordable;
27
+ name?: string;
28
+ file: File | Blob;
29
+ filename?: string;
30
+ [key: string]: any;
31
+ }
32
+ export interface UploadFileCallBack {
33
+ success?: any;
34
+ isReturnResponse?: boolean;
35
+ }
@@ -0,0 +1,109 @@
1
+ import { ContentEnum, PermissionModeEnum, RouterTransitionEnum, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, ThemeEnum } from '../src/enums/appEnum';
2
+ import { CacheTypeEnum } from '../src/enums/cacheEnum';
3
+ import { MenuModeEnum, MenuTypeEnum, MixSidebarTriggerEnum, TriggerEnum } from '../src/enums/menuEnum';
4
+ export declare type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
5
+ export interface MenuSetting {
6
+ bgColor: string;
7
+ fixed: boolean;
8
+ collapsed: boolean;
9
+ canDrag: boolean;
10
+ show: boolean;
11
+ hidden: boolean;
12
+ split: boolean;
13
+ menuWidth: number;
14
+ mode: MenuModeEnum;
15
+ type: MenuTypeEnum;
16
+ theme: ThemeEnum;
17
+ topMenuAlign: 'start' | 'center' | 'end';
18
+ trigger: TriggerEnum;
19
+ accordion: boolean;
20
+ closeMixSidebarOnChange: boolean;
21
+ collapsedShowTitle: boolean;
22
+ mixSideTrigger: MixSidebarTriggerEnum;
23
+ mixSideFixed: boolean;
24
+ }
25
+ export interface MultiTabsSetting {
26
+ cache: boolean;
27
+ show: boolean;
28
+ showQuick: boolean;
29
+ canDrag: boolean;
30
+ showRedo: boolean;
31
+ showFold: boolean;
32
+ theme: string;
33
+ }
34
+ export interface HeaderSetting {
35
+ bgColor: string;
36
+ fixed: boolean;
37
+ show: boolean;
38
+ theme: ThemeEnum;
39
+ showFullScreen: boolean;
40
+ useLockPage: boolean;
41
+ showDoc: boolean;
42
+ showNotice: boolean;
43
+ showSearch: boolean;
44
+ }
45
+ export interface LocaleSetting {
46
+ showPicker: boolean;
47
+ locale: LocaleType;
48
+ fallback: LocaleType;
49
+ availableLocales: LocaleType[];
50
+ }
51
+ export interface TransitionSetting {
52
+ enable: boolean;
53
+ basicTransition: RouterTransitionEnum;
54
+ openPageLoading: boolean;
55
+ openNProgress: boolean;
56
+ }
57
+ export interface ProjectConfig {
58
+ permissionCacheType: CacheTypeEnum;
59
+ showSettingButton: boolean;
60
+ showDarkModeToggle: boolean;
61
+ settingButtonPosition: SettingButtonPositionEnum;
62
+ permissionMode: PermissionModeEnum;
63
+ sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
64
+ grayMode: boolean;
65
+ colorWeak: boolean;
66
+ themeColor: string;
67
+ fullContent: boolean;
68
+ contentMode: ContentEnum;
69
+ showLogo: boolean;
70
+ showFooter: boolean;
71
+ headerSetting: HeaderSetting;
72
+ menuSetting: MenuSetting;
73
+ multiTabsSetting: MultiTabsSetting;
74
+ transitionSetting: TransitionSetting;
75
+ openKeepAlive: boolean;
76
+ lockTime: number;
77
+ showBreadCrumb: boolean;
78
+ showBreadCrumbIcon: boolean;
79
+ useErrorHandle: boolean;
80
+ useOpenBackTop: boolean;
81
+ canEmbedIFramePage: boolean;
82
+ closeMessageOnSwitch: boolean;
83
+ removeAllHttpPending: boolean;
84
+ }
85
+ export interface GlobConfig {
86
+ title: string;
87
+ apiUrl: string;
88
+ domainUrl: string;
89
+ uploadUrl?: string;
90
+ openSso?: string;
91
+ openQianKun?: string;
92
+ casBaseUrl?: string;
93
+ viewUrl?: string;
94
+ urlPrefix?: string;
95
+ shortName: string;
96
+ }
97
+ export interface GlobEnvConfig {
98
+ VITE_GLOB_APP_TITLE: string;
99
+ VITE_GLOB_API_URL: string;
100
+ VITE_USE_MOCK: string;
101
+ VITE_GLOB_API_URL_PREFIX?: string;
102
+ VITE_GLOB_APP_SHORT_NAME: string;
103
+ VITE_GLOB_APP_OPEN_SSO: string;
104
+ VITE_GLOB_APP_OPEN_QIANKUN: string;
105
+ VITE_GLOB_APP_CAS_BASE_URL: string;
106
+ VITE_GLOB_DOMAIN_URL: string;
107
+ VITE_GLOB_UPLOAD_URL?: string;
108
+ VITE_GLOB_ONLINE_VIEW_URL?: string;
109
+ }
@@ -0,0 +1,4 @@
1
+ export * from './axios';
2
+ export * from './config';
3
+ export * from './store';
4
+ export * from './utils';
@@ -0,0 +1,42 @@
1
+ import { RoleInfo } from '../src/api/sys/model/userModel';
2
+ import { ErrorTypeEnum } from '../src/enums/exceptionEnum';
3
+ import { MenuModeEnum, MenuTypeEnum } from '../src/enums/menuEnum';
4
+ export interface LockInfo {
5
+ pwd?: string | undefined;
6
+ isLock?: boolean;
7
+ }
8
+ export interface ErrorLogInfo {
9
+ type: ErrorTypeEnum;
10
+ file: string;
11
+ name?: string;
12
+ message: string;
13
+ stack?: string;
14
+ detail: string;
15
+ url: string;
16
+ time?: string;
17
+ }
18
+ export interface UserInfo {
19
+ id: string | number;
20
+ userId: string | number;
21
+ username: string;
22
+ realname: string;
23
+ avatar: string;
24
+ desc?: string;
25
+ homePath?: string;
26
+ tenantid?: string | number;
27
+ roles: RoleInfo[];
28
+ orgCode?: string;
29
+ }
30
+ export interface LoginInfo {
31
+ multi_depart?: string | number;
32
+ userInfo?: object;
33
+ departs?: [];
34
+ tenantList?: [];
35
+ isLogin?: boolean;
36
+ }
37
+ export interface BeforeMiniState {
38
+ menuCollapsed?: boolean;
39
+ menuSplit?: boolean;
40
+ menuMode?: MenuModeEnum;
41
+ menuType?: MenuTypeEnum;
42
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ export declare type DynamicProps<T> = {
3
+ [P in keyof T]: Ref<T[P]> | T[P] | ComputedRef<T[P]>;
4
+ };
@@ -12,16 +12,30 @@ export declare class KgVarUtil {
12
12
  */
13
13
  static parseRequestParamsToJSON(params: string | null | undefined): Record<string, any>;
14
14
  /**
15
- * 根据控件类型, 将任意的值(可能非法)转换为合法的值.
15
+ * <p>根据控件类型, 将表单控件的默认值转换为合法的值.</p>
16
+ * <ul>
17
+ * <li>
18
+ * {NOW}
19
+ * <p>当前时间(YYYY-MM-DD HH:mm:ss)</p>
20
+ * </li>
21
+ * <li>
22
+ * {USER}
23
+ * <p>当前登录的用户名.</p>
24
+ * </li>
25
+ * <li>
26
+ * {ROW}
27
+ * <p>当前勾选后对应的属性.</p>
28
+ * </li>
29
+ * </ul>
16
30
  *
17
31
  * @param param.$dayjs dayjs.
18
32
  * @param param.buttonVarName 「变量配置:表单控件」所属的按钮的变量名称.
19
33
  * @param param.formID 界面标识.
20
34
  * @param param.value 原始的值.
21
35
  * @param param.varName 变量名称.
22
- * @return {} 转换后的合法的值.
36
+ * @return {} 转换之后的值.
23
37
  */
24
- static transformFormItemValue(param: {
38
+ static transformFormItemDefaultValue(param: {
25
39
  $dayjs: typeof dayjs;
26
40
  buttonVarName: string | null | undefined;
27
41
  formID: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.25.1-beta.1",
3
+ "version": "0.25.2-beta.0",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",