@kengic/vue 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -217,7 +217,7 @@ export declare class VarGridDetail {
217
217
  export declare class VarGridMaster {
218
218
  /** 定制级别(CustomLevel). */
219
219
  cust_lvl?: number | null;
220
- /** 是否默认显示(DefaultFlag). */
220
+ /** 是否默认视图(DefaultFlag). */
221
221
  def_flg?: number | null;
222
222
  /** 界面标识(FormID). */
223
223
  frm_id?: string | null;
@@ -235,7 +235,7 @@ export declare class VarGridMaster {
235
235
  export declare class VarGridMasterDTO {
236
236
  /** 定制级别(CustomLevel). */
237
237
  cust_lvl?: number | null;
238
- /** 是否默认显示(DefaultFlag). */
238
+ /** 是否默认视图(DefaultFlag). */
239
239
  def_flg?: number | null;
240
240
  /** 界面标识(FormID). */
241
241
  frm_id?: string | null;
@@ -301,6 +301,8 @@ export declare class VarPossibility {
301
301
  locale_id?: string | null;
302
302
  /** 数据列(ValueColumn). */
303
303
  val_clm?: string | null;
304
+ /** 数据的类型. */
305
+ val_data_type?: string | null;
304
306
  /** 变量名称(VariableName). */
305
307
  var_nam?: string | null;
306
308
  constructor(obj?: VarPossibility);
@@ -417,6 +419,8 @@ export declare class VarSubmitConfig {
417
419
  min_width?: number | null;
418
420
  /** 是否支持拖动宽度. */
419
421
  resizable_flg?: number | null;
422
+ /** 是否根据表单宽度自动调整字段宽度. */
423
+ responsive_flg?: number | null;
420
424
  constructor(obj?: VarSubmitConfig);
421
425
  }
422
426
  /** 提交字段. */
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  type: import("vue").PropType<number>;
17
17
  default: number;
18
18
  };
19
- kgSpan: import("vue").PropType<number>;
19
+ kgSpan: import("vue").PropType<number>; /** 列表数据. */
20
20
  kgPlaceholder: import("vue").PropType<string>;
21
21
  kgShowLabel: {
22
22
  type: import("vue").PropType<boolean>;
@@ -28,8 +28,8 @@ declare const _default: import("vue").DefineComponent<{
28
28
  };
29
29
  kgType: import("vue").PropType<import("../../..").KG_CONTROL_TYPE>;
30
30
  kgShowTime: {
31
- type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
32
31
  /** 获取下拉列表数据. */
32
+ type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
33
33
  default: undefined;
34
34
  };
35
35
  onKgBeforeLookupOk: import("vue").PropType<(value: any, record: import("../..").IKgTableRecord<{}> | import("../..").IKgTableRecord<{}>[]) => boolean>;
@@ -55,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
55
55
  type: import("vue").PropType<number>;
56
56
  default: number;
57
57
  };
58
- kgSpan: import("vue").PropType<number>;
58
+ kgSpan: import("vue").PropType<number>; /** 列表数据. */
59
59
  kgPlaceholder: import("vue").PropType<string>;
60
60
  kgShowLabel: {
61
61
  type: import("vue").PropType<boolean>;
@@ -67,8 +67,8 @@ declare const _default: import("vue").DefineComponent<{
67
67
  };
68
68
  kgType: import("vue").PropType<import("../../..").KG_CONTROL_TYPE>;
69
69
  kgShowTime: {
70
- type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
71
70
  /** 获取下拉列表数据. */
71
+ type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
72
72
  default: undefined;
73
73
  };
74
74
  onKgBeforeLookupOk: import("vue").PropType<(value: any, record: import("../..").IKgTableRecord<{}> | import("../..").IKgTableRecord<{}>[]) => boolean>;
@@ -0,0 +1,5 @@
1
+ import { IKgFormItemProps } from '../index.vm';
2
+ export declare type IUseService = {
3
+ transformDatas(datas?: Array<Record<string, any>> | null): Array<Record<string, any>>;
4
+ };
5
+ export declare function _useService(props: IKgFormItemProps): IUseService;
@@ -1,8 +1,35 @@
1
- import { ExtractPropTypes } from 'vue';
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
2
  import './KgSubmit.less';
3
- export declare const getProps: () => any;
3
+ export declare const getProps: () => {
4
+ /**
5
+ * 是否显示头部右侧的设置按钮.
6
+ * @default true
7
+ */
8
+ kgShowConfigButton: {
9
+ type: PropType<boolean>;
10
+ default: boolean;
11
+ };
12
+ };
4
13
  export declare type IKgSubmitProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
5
- declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
6
- [x: string]: any;
14
+ declare const _default: import("vue").DefineComponent<{
15
+ /**
16
+ * 是否显示头部右侧的设置按钮.
17
+ * @default true
18
+ */
19
+ kgShowConfigButton: {
20
+ type: PropType<boolean>;
21
+ default: boolean;
22
+ };
23
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
24
+ /**
25
+ * 是否显示头部右侧的设置按钮.
26
+ * @default true
27
+ */
28
+ kgShowConfigButton: {
29
+ type: PropType<boolean>;
30
+ default: boolean;
31
+ };
32
+ }>>, {
33
+ kgShowConfigButton: boolean;
7
34
  }>;
8
35
  export default _default;
@@ -0,0 +1,3 @@
1
+ export declare const FORM_ID__SUBMIT_CONFIG = "kg-submit-config";
2
+ declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3
+ export default _default;
@@ -0,0 +1,60 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import './KgSubmit.Header.less';
3
+ export declare const getProps: () => {
4
+ /** 是否全屏. */
5
+ isFullscreen: {
6
+ type: PropType<boolean>;
7
+ default: boolean;
8
+ };
9
+ 'onUpdate:isFullscreen': PropType<(value: boolean) => void>;
10
+ /**
11
+ * 是否显示头部右侧的设置按钮.
12
+ * @default true
13
+ */
14
+ kgShowConfigButton: {
15
+ type: PropType<boolean>;
16
+ default: boolean;
17
+ };
18
+ onKgCancel: PropType<() => void>;
19
+ };
20
+ export declare type IKgSubmitHeaderProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
21
+ declare const _default: import("vue").DefineComponent<{
22
+ /** 是否全屏. */
23
+ isFullscreen: {
24
+ type: PropType<boolean>;
25
+ default: boolean;
26
+ };
27
+ 'onUpdate:isFullscreen': PropType<(value: boolean) => void>;
28
+ /**
29
+ * 是否显示头部右侧的设置按钮.
30
+ * @default true
31
+ */
32
+ kgShowConfigButton: {
33
+ type: PropType<boolean>;
34
+ default: boolean;
35
+ };
36
+ onKgCancel: PropType<() => void>;
37
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:isFullscreen" | "kgCancel")[], "update:isFullscreen" | "kgCancel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
38
+ /** 是否全屏. */
39
+ isFullscreen: {
40
+ type: PropType<boolean>;
41
+ default: boolean;
42
+ };
43
+ 'onUpdate:isFullscreen': PropType<(value: boolean) => void>;
44
+ /**
45
+ * 是否显示头部右侧的设置按钮.
46
+ * @default true
47
+ */
48
+ kgShowConfigButton: {
49
+ type: PropType<boolean>;
50
+ default: boolean;
51
+ };
52
+ onKgCancel: PropType<() => void>;
53
+ }>> & {
54
+ "onUpdate:isFullscreen"?: ((...args: any[]) => any) | undefined;
55
+ onKgCancel?: ((...args: any[]) => any) | undefined;
56
+ }, {
57
+ kgShowConfigButton: boolean;
58
+ isFullscreen: boolean;
59
+ }>;
60
+ export default _default;
@@ -6,11 +6,11 @@ export declare type IUseKgSubmit = {
6
6
  store: IKgSubmitStore;
7
7
  /** 监听事件: 打开抽屉. */
8
8
  onOpen(cb: IKgSubmitOpenCb): IRemoveEventListenerHandler;
9
- /** 监听事件: 关闭抽屉. */
9
+ /** 监听事件: 关闭抽屉. 点击取消或者点击确定并且成功之后, 都会触发 */
10
10
  onClose(cb: IKgSubmitCloseCb): IRemoveEventListenerHandler;
11
11
  /** 监听事件: 点击保存按钮之后, 执行默认逻辑之前. */
12
12
  onBeforeOk(cb: IKgSubmitBeforeOkCb): IRemoveEventListenerHandler;
13
- /** 监听事件: 点击保存按钮之后, 执行默认逻辑并且调用接口成功, 即将关闭抽屉. */
13
+ /** 监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 即将关闭抽屉. */
14
14
  onOk(cb: IKgSubmitOkCb): IRemoveEventListenerHandler;
15
15
  };
16
16
  /**
@@ -15,6 +15,7 @@ export declare type IKgSubmitOpenCbParams = {
15
15
  isUpdating: boolean;
16
16
  isCopying: boolean;
17
17
  row: IKgTableRecord | null;
18
+ model: Ref<Record<string, any>>;
18
19
  };
19
20
  export declare type IKgSubmitOpenCb = (args: IKgSubmitOpenCbParams) => void;
20
21
  /** 事件监听函数: close. */
@@ -0,0 +1,17 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import './KgTable.Setting.less';
3
+ export declare const getProps: () => {
4
+ visible: PropType<boolean>;
5
+ 'onUpdate:visible': PropType<(value: boolean) => void>;
6
+ };
7
+ export declare type IKgTableSettingGridMasterModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
8
+ declare const _default: import("vue").DefineComponent<{
9
+ visible: PropType<boolean>;
10
+ 'onUpdate:visible': PropType<(value: boolean) => void>;
11
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
12
+ visible: PropType<boolean>;
13
+ 'onUpdate:visible': PropType<(value: boolean) => void>;
14
+ }>> & {
15
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
16
+ }, {}>;
17
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export declare const FORM_ID__GRID_CONFIG = "kg-table-save-grid-config";
2
+ declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export declare const FORM_ID__SAVE_GRID_MASTER = "kg-table-save-grid-master";
2
+ declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3
+ export default _default;
@@ -31,6 +31,10 @@ export declare type IUseKgVar = {
31
31
  /** 当前的 VarProfileDetail 列表. */
32
32
  currentVarProfileDetails: ComputedRef<Array<VarProfileDetail> | null>;
33
33
  varGridConfig: ComputedRef<ReturnType<IKgVarStore['getVarGridConfig']>>;
34
+ /** 所有的 VarGridMaster 列表. */
35
+ varGridMasters: ComputedRef<ReturnType<IKgVarStore['getVarGridMasters']>>;
36
+ /** 当前的 VarGridMaster. */
37
+ currentVarGridMaster: ComputedRef<ReturnType<IKgVarStore['getCurrentVarGridMaster']>>;
34
38
  /** 系统的 VarGridDetail 列表. */
35
39
  systemVarGridDetails: ComputedRef<ReturnType<IKgVarStore['getSystemVarGridDetails']>>;
36
40
  t: (var_nam?: string | null) => ComputedRef<string>;
@@ -108,15 +108,16 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
108
108
  getCurrentVarProfileMasterID(): (formID?: string | null) => string | null;
109
109
  getVarGridConfig(): (formID?: string | null) => VarGridConfig | null;
110
110
  getVarGridMasters(): (formID?: string | null) => Array<VarGridMasterDTO> | null;
111
- getVarGridMaster(): (formID?: string | null) => VarGridMasterDTO | null;
112
- getVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
113
111
  getVarGridDetail(): (formID?: string | null, var_nam?: string | null) => VarGridDetail | null;
112
+ /** 根据 formID 获取当前的 VarGridMaster. */
113
+ getCurrentVarGridMaster(): (formID?: string | null) => VarGridMasterDTO | null;
114
+ getCurrentVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
114
115
  /**
115
116
  * 根据 formID 获取系统的 VarGridDetail 列表, 即 customLevel 为 0 的 VarGridMaster 下面的所有 VarGridDetail.
116
117
  */
117
118
  getSystemVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
118
- getVisibleVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
119
- getVisibleVarGridDetailsTotalWidth(): (formID?: string | null) => number | null;
119
+ getCurrentVisibleVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
120
+ getCurrentVisibleVarGridDetailsTotalWidth(): (formID?: string | null) => number | null;
120
121
  }, {
121
122
  enter(formID: string): Promise<void>;
122
123
  leave(formID: string): void;
@@ -12,9 +12,15 @@ declare const _default: {
12
12
  profile: string;
13
13
  };
14
14
  KgTable: {
15
+ canNotUpdateSystemVarGridMaster: string;
15
16
  column: string;
17
+ configVarGridConfig: string;
18
+ configVarGridMasters: string;
16
19
  emptyText: string;
20
+ saveVarGridMaster: string;
21
+ saveVarGridMasterAs: string;
17
22
  totalText: string;
23
+ varGridMasters: string;
18
24
  };
19
25
  KgTableInfo: {
20
26
  check: string;
@@ -23,6 +29,15 @@ declare const _default: {
23
29
  locate: string;
24
30
  row: string;
25
31
  };
32
+ KgTableSettingGridConfigModal: {
33
+ title: string;
34
+ };
35
+ KgTableSettingGridMasterModal: {
36
+ title: string;
37
+ };
38
+ KgTableSettingSaveGridMaster: {
39
+ title: string;
40
+ };
26
41
  KgVarConfig: {
27
42
  action: string;
28
43
  allForm: string;
@@ -12,9 +12,15 @@ declare const _default: {
12
12
  profile: string;
13
13
  };
14
14
  KgTable: {
15
+ canNotUpdateSystemVarGridMaster: string;
15
16
  column: string;
17
+ configVarGridConfig: string;
18
+ configVarGridMasters: string;
16
19
  emptyText: string;
20
+ saveVarGridMaster: string;
21
+ saveVarGridMasterAs: string;
17
22
  totalText: string;
23
+ varGridMasters: string;
18
24
  };
19
25
  KgTableInfo: {
20
26
  check: string;
@@ -23,6 +29,15 @@ declare const _default: {
23
29
  locate: string;
24
30
  row: string;
25
31
  };
32
+ KgTableSettingGridConfigModal: {
33
+ title: string;
34
+ };
35
+ KgTableSettingGridMasterModal: {
36
+ title: string;
37
+ };
38
+ KgTableSettingSaveGridMaster: {
39
+ title: string;
40
+ };
26
41
  KgVarConfig: {
27
42
  action: string;
28
43
  allForm: string;
@@ -94,7 +94,7 @@ export declare const enum KG_BTN_COLOR {
94
94
  WARN = "WARN"
95
95
  }
96
96
  /** 按钮显示类型. */
97
- export declare const enum KG_BTN_DISPLAY_TYPE {
97
+ export declare const enum KG_BUTTON_DISPLAY_TYPE {
98
98
  /** 按钮依次排列在一横排. */
99
99
  DEFAULT = "DEFAULT",
100
100
  /** 显示为下拉的菜单列表. */
@@ -107,3 +107,27 @@ export declare const enum KG_CUSTOM_LEVEL {
107
107
  /** 用户. */
108
108
  L10 = 10
109
109
  }
110
+ /** 表单布局方式. */
111
+ export declare const enum KG_SUBMIT_LAYOUT {
112
+ /** 垂直. */
113
+ VERTICAL = "vertical",
114
+ /** 水平. */
115
+ HORIZONTAL = "horizontal"
116
+ }
117
+ /** 下拉列表数据中值的类型. */
118
+ export declare const enum KG_POSSIBILITY_DATA_TYPE {
119
+ STRING = "string",
120
+ NUMBER = "number",
121
+ BOOLEAN = "boolean"
122
+ }
123
+ /** 系统描述表中的键. */
124
+ export declare const enum KG_DESCRIPTION_CODE_NAME {
125
+ /** 是否. */
126
+ YN = "yn",
127
+ /** 表单布局方式. */
128
+ VAR_SUBMIT_LAYOUT = "var_submit_layout",
129
+ /** 网格布局可选的列. */
130
+ VAR_SPAN = "var_span",
131
+ /** 按钮显示样式. */
132
+ VAR_BUTTON_DISPLAY_TYPE = "var_button_display_type"
133
+ }
@@ -8,4 +8,12 @@ export declare class KgVarUtil {
8
8
  * @return 参数对象.
9
9
  */
10
10
  static parseCommandParameter(params?: string | null): Record<string, any>;
11
+ /**
12
+ * 根据控件类型, 将任意的值(可能非法)转换为合法的值.
13
+ * @param formID 界面标识.
14
+ * @param var_name 变量名称.
15
+ * @param value 原始的值.
16
+ * @return 转换后的合法的值.
17
+ */
18
+ static transformValueByControlType(formID: string, var_name: string, value: any): any;
11
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",