@kengic/vue 0.14.2 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,12 +2,33 @@ import { ExtractPropTypes, PropType } from 'vue';
2
2
  import { VarButton } from '../../apis/WMS/models';
3
3
  import './KgButton.less';
4
4
  export declare const getProps: () => {
5
+ /**
6
+ * 按钮是否禁用. 返回 true 表示禁用.
7
+ */
5
8
  kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
9
+ /**
10
+ * 按钮是否处于加载状态. 返回 true 表示处于加载状态.
11
+ */
12
+ KgLoading: PropType<(button: VarButton) => boolean | undefined>;
6
13
  };
7
14
  export declare type IKgButtonProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
8
15
  declare const _default: import("vue").DefineComponent<{
16
+ /**
17
+ * 按钮是否禁用. 返回 true 表示禁用.
18
+ */
9
19
  kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
20
+ /**
21
+ * 按钮是否处于加载状态. 返回 true 表示处于加载状态.
22
+ */
23
+ KgLoading: PropType<(button: VarButton) => boolean | undefined>;
10
24
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
25
+ /**
26
+ * 按钮是否禁用. 返回 true 表示禁用.
27
+ */
11
28
  kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
29
+ /**
30
+ * 按钮是否处于加载状态. 返回 true 表示处于加载状态.
31
+ */
32
+ KgLoading: PropType<(button: VarButton) => boolean | undefined>;
12
33
  }>>, {}>;
13
34
  export default _default;
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  $data: {};
6
6
  $props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
7
7
  kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
8
+ KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
8
9
  }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
9
10
  $attrs: {
10
11
  [x: string]: unknown;
@@ -21,6 +22,7 @@ declare const _default: {
21
22
  $el: any;
22
23
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
23
24
  kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
25
+ KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
24
26
  }>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
25
27
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
26
28
  created?: ((() => void) | (() => void)[]) | undefined;
@@ -43,12 +45,14 @@ declare const _default: {
43
45
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
44
46
  } & Readonly<import("vue").ExtractPropTypes<{
45
47
  kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
48
+ KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
46
49
  }>> & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
47
50
  __isFragment?: undefined;
48
51
  __isTeleport?: undefined;
49
52
  __isSuspense?: undefined;
50
53
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
51
54
  kgDisabled: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
55
+ KgLoading: import("vue").PropType<(button: import("../..").VarButton) => boolean | undefined>;
52
56
  }>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
53
57
  Item: typeof KgButtonItem;
54
58
  };
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange" | "kgCheckboxGroupChange" | "kgCheckboxGroupDatasChange")[], "update:value" | "kgSubmit" | "kgChange" | "kgCheckboxGroupChange" | "kgCheckboxGroupDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value" | "kgCheckboxGroupChange" | "kgCheckboxGroupDatasChange")[], "kgSubmit" | "kgChange" | "update:value" | "kgCheckboxGroupChange" | "kgCheckboxGroupDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
40
40
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
41
41
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
42
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
44
  kgVarName: {
45
45
  type: import("vue").PropType<string>;
46
46
  required: boolean;
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
40
40
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
41
41
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
42
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
44
  kgVarName: {
45
45
  type: import("vue").PropType<string>;
46
46
  required: boolean;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange" | "kgRadioGroupDatasChange")[], "update:value" | "kgSubmit" | "kgChange" | "kgRadioGroupDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value" | "kgRadioGroupDatasChange")[], "kgSubmit" | "kgChange" | "update:value" | "kgRadioGroupDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
40
40
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
41
41
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
42
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange" | "kgSelectChange" | "kgSelectDatasChange")[], "update:value" | "kgSubmit" | "kgChange" | "kgSelectChange" | "kgSelectDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "kgSelectChange" | "update:value" | "kgSelectDatasChange")[], "kgSubmit" | "kgChange" | "kgSelectChange" | "update:value" | "kgSelectDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
44
  kgVarName: {
45
45
  type: import("vue").PropType<string>;
46
46
  required: boolean;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
40
40
  onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
41
41
  onKgCheckboxGroupDatasChange: import("vue").PropType<(datas: any[]) => void>;
42
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "kgSubmit" | "kgChange")[], "update:value" | "kgSubmit" | "kgChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgChange" | "update:value")[], "kgSubmit" | "kgChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
43
  kgVarName: {
44
44
  type: import("vue").PropType<string>;
45
45
  required: boolean;
@@ -25,7 +25,7 @@ export declare type IKgTableRowDoubleClickCb = ((param: IKgTableRowDoubleClickPa
25
25
  /** 事件监听函数: beforeRetrieve. */
26
26
  export declare type IKgTableBeforeRetrieveCbParam = {
27
27
  /** 查询接口请求参数. */
28
- params: IPage<IKgTableRow> | undefined | null;
28
+ params: Record<string, any>;
29
29
  /** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供表格数据. */
30
30
  response: Ref;
31
31
  };
@@ -42,8 +42,10 @@ export declare type IKgTableBeforeSetDatasCbParam = {
42
42
  export declare type IKgTableBeforeSetDatasCb = ((param: IKgTableBeforeSetDatasCbParam) => Promise<boolean>) & IKgEventCb;
43
43
  /** 事件监听函数: retrieve. */
44
44
  export declare type IKgTableRetrieveCbParam = {
45
+ /** 查询接口请求参数. */
46
+ params: Record<string, any>;
45
47
  /** 接口返回的分页数据. */
46
- page: IPage<IKgTableRow> | undefined | null;
48
+ response: IPage<IKgTableRow> | null | undefined;
47
49
  /** 列表数据. */
48
50
  datas: Ref<Array<IKgTableRow>>;
49
51
  /** 设置列表数据. */
@@ -68,12 +68,12 @@ export declare type IKgStateOption = {
68
68
  };
69
69
  /** 翻译的方法. */
70
70
  export declare type T = {
71
- (key: string | undefined | null): string;
72
- (key: string | undefined | null, locale: string): string;
73
- (key: string | undefined | null, locale: string, list: unknown[]): string;
74
- (key: string | undefined | null, locale: string, named: Record<string, unknown>): string;
75
- (key: string | undefined | null, list: unknown[]): string;
76
- (key: string | undefined | null, named: Record<string, unknown>): string;
71
+ (key: string | null | undefined): string;
72
+ (key: string | null | undefined, locale: string): string;
73
+ (key: string | null | undefined, locale: string, list: unknown[]): string;
74
+ (key: string | null | undefined, locale: string, named: Record<string, unknown>): string;
75
+ (key: string | null | undefined, list: unknown[]): string;
76
+ (key: string | null | undefined, named: Record<string, unknown>): string;
77
77
  };
78
78
  /** 检查权限的方法. */
79
79
  export declare type P = {
@@ -23,7 +23,7 @@ export declare class KgRouteUtil {
23
23
  * @param path 路径.
24
24
  * @param app 模块.
25
25
  */
26
- static isPathInApp(path: string | undefined | null, app: KG_APP | null): boolean;
26
+ static isPathInApp(path: string | null | undefined, app: KG_APP | null): boolean;
27
27
  /**
28
28
  * 根据地址获取模块.
29
29
  * @param path 地址.
@@ -37,7 +37,7 @@ export declare class KgUtil {
37
37
  * @param formID 界面标识.
38
38
  * @param $dayjs dayjs.
39
39
  */
40
- static parseParams(params?: Record<string, any> | null, formID?: string | null, $dayjs?: typeof dayjs): any;
40
+ static parseParams(params: Record<string, any> | null | undefined, formID?: string | null, $dayjs?: typeof dayjs): Record<string, any>;
41
41
  /**
42
42
  * <p>处理查询参数, 最终拼接为一个 SQL 格式如下: `WHERE ... ORDER BY ...`.</p>
43
43
  * <p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",