@kengic/vue 0.16.7-beta.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +21 -0
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +3476 -2938
- package/dist/src/apis/WMS/Controllers/VarContextController/Add.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/Delete.d.ts +18 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/DeleteBatch.d.ts +18 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/Edit.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/ExportXls.d.ts +24 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/ImportExcel.d.ts +15 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/List.d.ts +31 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/QueryById.d.ts +19 -0
- package/dist/src/apis/WMS/Controllers/VarContextController/index.d.ts +8 -0
- package/dist/src/apis/WMS/Controllers/VarController/GetAll.d.ts +19 -0
- package/dist/src/apis/WMS/Controllers/VarController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/VarGridMasterController/QueryByID.d.ts +19 -0
- package/dist/src/apis/WMS/Controllers/VarGridMasterController/Update.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/VarGridMasterController/index.d.ts +2 -0
- package/dist/src/apis/WMS/Controllers/VarProfileMasterController/QueryByID.d.ts +19 -0
- package/dist/src/apis/WMS/Controllers/VarProfileMasterController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/Add.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/Delete.d.ts +18 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/DeleteBatch.d.ts +18 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/Edit.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/ExportXls.d.ts +30 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/ImportExcel.d.ts +15 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/List.d.ts +37 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/QueryById.d.ts +19 -0
- package/dist/src/apis/WMS/Controllers/VarVariableCatalogController/index.d.ts +8 -0
- package/dist/src/apis/WMS/Controllers/WhController/ListVO.d.ts +52 -0
- package/dist/src/apis/WMS/Controllers/WhController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/index.d.ts +6 -0
- package/dist/src/apis/WMS/index.d.ts +2 -0
- package/dist/src/apis/WMS/models.d.ts +728 -0
- package/dist/src/apis/api.d.ts +1 -0
- package/dist/src/apis/def.d.ts +1 -0
- package/dist/src/apis/index.d.ts +2 -0
- package/dist/src/components/KgAppSelect/KgAppSelect.d.ts +47 -0
- package/dist/src/components/KgAppSelect/index.d.ts +3 -0
- package/dist/src/components/KgAppSelect/index.hooks.d.ts +41 -0
- package/dist/src/components/KgAppSelect/index.store.d.ts +73 -0
- package/dist/src/components/KgButton/KgButton.Item.d.ts +41 -0
- package/dist/src/components/KgButton/KgButton.Item.data.d.ts +31 -0
- package/dist/src/components/KgButton/KgButton.d.ts +34 -0
- package/dist/src/components/KgButton/KgButton.hooks.d.ts +61 -0
- package/dist/src/components/KgButton/KgButton.store.d.ts +89 -0
- package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +39 -0
- package/dist/src/components/KgButton/components/KgButton.Create.d.ts +39 -0
- package/dist/src/components/KgButton/components/KgButton.Delete.d.ts +40 -0
- package/dist/src/components/KgButton/components/KgButton.Export.d.ts +39 -0
- package/dist/src/components/KgButton/components/KgButton.Import.d.ts +39 -0
- package/dist/src/components/KgButton/components/KgButton.ImportTemplate.d.ts +39 -0
- package/dist/src/components/KgButton/components/KgButton.Other.d.ts +40 -0
- package/dist/src/components/KgButton/components/KgButton.Search.d.ts +40 -0
- package/dist/src/components/KgButton/components/KgButton.Update.d.ts +39 -0
- package/dist/src/components/KgButton/index.d.ts +62 -0
- package/dist/src/components/KgForm/KgForm.d.ts +414 -0
- package/dist/src/components/KgForm/index.d.ts +604 -0
- package/dist/src/components/KgForm/index.hooks.d.ts +42 -0
- package/dist/src/components/KgForm/index.store.d.ts +107 -0
- package/dist/src/components/KgForm/index.vm.d.ts +9 -0
- package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +100 -0
- package/dist/src/components/KgForm.Item/KgForm.Item.hooks.d.ts +17 -0
- package/dist/src/components/KgForm.Item/addon/KgForm.Item.Addon.Lookup.Modal.d.ts +17 -0
- package/dist/src/components/KgForm.Item/addon/KgForm.Item.Addon.Lookup.d.ts +32 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +103 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +102 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +100 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +100 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +99 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +99 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +99 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +104 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.hooks.d.ts +27 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +99 -0
- package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +99 -0
- package/dist/src/components/KgForm.Item/index.d.ts +2 -0
- package/dist/src/components/KgForm.Item/index.vm.d.ts +104 -0
- package/dist/src/components/KgModal/KgModal.d.ts +395 -0
- package/dist/src/components/KgModal/components/KgModal.Close.d.ts +41 -0
- package/dist/src/components/KgModal/index.d.ts +2 -0
- package/dist/src/components/KgModal/index.vm.d.ts +194 -0
- package/dist/src/components/KgProgressA/KgProgressA.d.ts +85 -0
- package/dist/src/components/KgProgressA/index.d.ts +1 -0
- package/dist/src/components/KgResizable/KgResizable.d.ts +143 -0
- package/dist/src/components/KgResizable/index.d.ts +1 -0
- package/dist/src/components/KgSearch/KgSearch.d.ts +42 -0
- package/dist/src/components/KgSearch/KgSearch.hooks.d.ts +39 -0
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.Body.d.ts +22 -0
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.VarProfileConfig.d.ts +8 -0
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.VarProfileMaster.d.ts +24 -0
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.VarProfileMaster.hooks.d.ts +7 -0
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.d.ts +32 -0
- package/dist/src/components/KgSearch/index.d.ts +3 -0
- package/dist/src/components/KgSearch/index.hooks.d.ts +41 -0
- package/dist/src/components/KgSearch/index.store.d.ts +86 -0
- package/dist/src/components/KgSearch/index.vm.d.ts +1 -0
- package/dist/src/components/KgSubmit/KgSubmit.d.ts +41 -0
- package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +20 -0
- package/dist/src/components/KgSubmit/components/KgSubmit.Header.VarSubmitConfig.d.ts +28 -0
- package/dist/src/components/KgSubmit/components/KgSubmit.Header.d.ts +82 -0
- package/dist/src/components/KgSubmit/index.d.ts +4 -0
- package/dist/src/components/KgSubmit/index.hooks.d.ts +74 -0
- package/dist/src/components/KgSubmit/index.store.d.ts +130 -0
- package/dist/src/components/KgSubmit/index.vm.d.ts +10 -0
- package/dist/src/components/KgTable/KgTable.d.ts +39 -0
- package/dist/src/components/KgTable/KgTable.hooks.d.ts +43 -0
- package/dist/src/components/KgTable/components/KgTable.Cell.d.ts +61 -0
- package/dist/src/components/KgTable/components/KgTable.Info.d.ts +58 -0
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.VarGridMaster.SaveAs.d.ts +5 -0
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +22 -0
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.hooks.d.ts +14 -0
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.Body.d.ts +22 -0
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.VarGridConfig.d.ts +21 -0
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.VarGridMaster.d.ts +24 -0
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.VarGridMaster.hooks.d.ts +23 -0
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +33 -0
- package/dist/src/components/KgTable/index.d.ts +4 -0
- package/dist/src/components/KgTable/index.hooks.d.ts +84 -0
- package/dist/src/components/KgTable/index.store.d.ts +157 -0
- package/dist/src/components/KgTable/index.vm.d.ts +66 -0
- package/dist/src/components/KgVar/KgVar.d.ts +28 -0
- package/dist/src/components/KgVar/index.d.ts +4 -0
- package/dist/src/components/KgVar/index.hooks.d.ts +242 -0
- package/dist/src/components/KgVar/index.store.d.ts +315 -0
- package/dist/src/components/KgVar/index.store.service.d.ts +21 -0
- package/dist/src/components/KgVar/index.vm.d.ts +47 -0
- package/dist/src/components/KgVarConfig/KgVarConfig.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/KgVarConfig.FormIDsModal.d.ts +24 -0
- package/dist/src/components/KgVarConfig/components/KgVarConfig.Modal.d.ts +17 -0
- package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +25 -0
- package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +29 -0
- package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.d.ts +22 -0
- package/dist/src/components/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.VarSubmitField.d.ts +25 -0
- package/dist/src/components/KgVarConfig/components/submit/KgVarConfig.Modal.Submit.d.ts +22 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.CreateModal.d.ts +33 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariableCatalog.d.ts +3 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariableCatalog.data.d.ts +3 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.Vars.d.ts +3 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.Vars.data.d.ts +3 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.d.ts +3 -0
- package/dist/src/components/KgVarConfig/index.d.ts +2 -0
- package/dist/src/components/KgVarConfig/index.store.d.ts +20 -0
- package/dist/src/components/KgVarConfig/index.vm.d.ts +3 -0
- package/dist/src/components/KgWarehouse/KgWarehouse.d.ts +38 -0
- package/dist/src/components/KgWarehouse/index.d.ts +4 -0
- package/dist/src/components/KgWarehouse/index.guard.d.ts +8 -0
- package/dist/src/components/KgWarehouse/index.hooks.d.ts +27 -0
- package/dist/src/components/KgWarehouse/index.store.d.ts +63 -0
- package/dist/src/components/KgYesOrNo/KgYesOrNo.d.ts +60 -0
- package/dist/src/components/KgYesOrNo/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +16 -0
- package/dist/src/components/util.d.ts +14 -0
- package/dist/src/config/index.d.ts +3 -0
- package/dist/src/config/index.hooks.d.ts +43 -0
- package/dist/src/config/index.store.d.ts +192 -0
- package/dist/src/config/setup.d.ts +45 -0
- package/dist/src/consts/i18n/en.d.ts +228 -0
- package/dist/src/consts/i18n/index.d.ts +2 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +227 -0
- package/dist/src/consts/index.d.ts +253 -0
- package/dist/src/consts/index.vm.d.ts +170 -0
- package/dist/src/consts/injection-keys.const.d.ts +9 -0
- package/dist/src/helpers/ant-design-vue.d.ts +316 -0
- package/dist/src/helpers/tsx.helper.d.ts +13 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/pages/KgPageDda/KgPageDda.d.ts +8 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Basic.SqlModal.d.ts +32 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Basic.d.ts +7 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Button.d.ts +8 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Child.d.ts +7 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Menu.d.ts +7 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Search.d.ts +7 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Submit.d.ts +7 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Table.d.ts +7 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.d.ts +29 -0
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +26 -0
- package/dist/src/pages/KgPageDda/index.const.d.ts +11 -0
- package/dist/src/pages/KgPageDda/index.d.ts +5 -0
- package/dist/src/pages/index.d.ts +2 -0
- package/dist/src/services/http-client.d.ts +46 -0
- package/dist/src/services/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts +6 -0
- package/dist/src/utils/kg-auth.util.d.ts +26 -0
- package/dist/src/utils/kg-dom.util.d.ts +12 -0
- package/dist/src/utils/kg-logger.util.d.ts +65 -0
- package/dist/src/utils/kg-route.util.d.ts +54 -0
- package/dist/src/utils/kg-var.util.d.ts +36 -0
- package/dist/src/utils/kg.util.d.ts +114 -0
- package/package.json +6 -5
@@ -0,0 +1,86 @@
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
2
|
+
import { IKgEventCb } from '../../consts';
|
3
|
+
import { IKgTableSearchParams } from '../KgTable';
|
4
|
+
/**
|
5
|
+
* 事件类型.
|
6
|
+
* 'ready': 就绪, 查询字段初始完成, 组件渲染完成
|
7
|
+
* 'search': 点击查询按钮, 并且表单验证通过
|
8
|
+
* 'reset': 点击重置按钮
|
9
|
+
*/
|
10
|
+
export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
|
11
|
+
/** 事件监听函数: ready. */
|
12
|
+
export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
13
|
+
export declare type IKgSearchSearchCb = ((param: IKgTableSearchParams) => Promise<boolean>) & IKgEventCb;
|
14
|
+
/** 事件监听函数: reset. */
|
15
|
+
export declare type IKgSearchResetCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
16
|
+
export declare type IKgSearchCbParam = IKgTableSearchParams;
|
17
|
+
export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSearchResetCb;
|
18
|
+
/** 查询方法. */
|
19
|
+
export declare type IKgSearchSearchFn = (param?: IKgTableSearchParams) => void;
|
20
|
+
/** 重置方法. */
|
21
|
+
export declare type IKgSearchResetFn = () => void;
|
22
|
+
export interface IKgSearchState {
|
23
|
+
/** 是否就绪: 查询字段初始完成, 组件渲染完成. */
|
24
|
+
isReadyMap: Map<string, boolean>;
|
25
|
+
/** 表单数据对象. */
|
26
|
+
modelMap: Map<string, Record<string, any>>;
|
27
|
+
/** 高级查询的操作符表单数据对象. */
|
28
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
29
|
+
/** 事件监听函数列表: ready. */
|
30
|
+
onReadyListenersMap: Map<string, Array<IKgSearchReadyCb>>;
|
31
|
+
/** 事件监听函数列表: search. */
|
32
|
+
onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
|
33
|
+
/** 事件监听函数列表: reset. */
|
34
|
+
onResetListenersMap: Map<string, Array<IKgSearchResetCb>>;
|
35
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
36
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
37
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
38
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
39
|
+
}
|
40
|
+
export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSearchState, {
|
41
|
+
/** 是否就绪. */
|
42
|
+
getIsReady(): (formID: string | null | undefined) => boolean;
|
43
|
+
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
44
|
+
getOperatorModel(): (formID: string | null | undefined) => Record<string, string> | null;
|
45
|
+
getSearchFn(): (formID: string | null | undefined) => IKgSearchSearchFn | null;
|
46
|
+
getResetFn(): (formID: string | null | undefined) => IKgSearchResetFn | null;
|
47
|
+
}, {
|
48
|
+
/**
|
49
|
+
* 清理数据.
|
50
|
+
* @param formID 页面标识.
|
51
|
+
*/
|
52
|
+
dispose(formID: string | null | undefined): void;
|
53
|
+
addEventListener(formID: string, event: IKgSearchEvent, cb: IKgSearchCb): void;
|
54
|
+
removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchCb): void;
|
55
|
+
/**
|
56
|
+
* 触发事件.
|
57
|
+
* @param formID 界面标识.
|
58
|
+
* @param event 事件名称.
|
59
|
+
* @param param 事件参数.
|
60
|
+
*/
|
61
|
+
emit(formID: string, event: IKgSearchEvent, param: IKgSearchCbParam): Promise<boolean>;
|
62
|
+
/**
|
63
|
+
* 设置是否就绪.
|
64
|
+
* @param formID 界面标识.
|
65
|
+
* @param ready 是否就绪.
|
66
|
+
*/
|
67
|
+
setIsReady(formID: string | null | undefined, ready?: boolean): void;
|
68
|
+
setModel(formID: string, model: Record<string, any>): void;
|
69
|
+
setOperatorModel(formID: string, model: Record<string, string>): void;
|
70
|
+
/**
|
71
|
+
* 修改部分查询字段的值.
|
72
|
+
* @param formID 界面标识.
|
73
|
+
* @param model 要修改的查询字段.
|
74
|
+
*/
|
75
|
+
patchModel(formID: string, model: Record<string, any>): Promise<void>;
|
76
|
+
/**
|
77
|
+
* 修改部分查询字段的高级查询操作符.
|
78
|
+
* @param formID 界面标识.
|
79
|
+
* @param model 要修改的查询字段.
|
80
|
+
*/
|
81
|
+
patchOperatorModel(formID: string, model: Record<string, string>): Promise<void>;
|
82
|
+
setSearchFn(formID: string | null | undefined, fn?: IKgSearchSearchFn | null): void;
|
83
|
+
setResetFn(formID: string | null | undefined, fn?: IKgSearchResetFn | null): void;
|
84
|
+
}>;
|
85
|
+
export declare type IKgSearchStore = ReturnType<IKgSearchStoreDefinition>;
|
86
|
+
export declare const useKgSearchStore: () => IKgSearchStoreDefinition;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const FORM_ID__KG_SEARCH__VAR_PROFILE_MASTER = "kg-search.VarProfileMaster";
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
2
|
+
import './KgSubmit.less';
|
3
|
+
export declare const getProps: () => {
|
4
|
+
/** 自定义的样式类名. */
|
5
|
+
kgClass: PropType<string>;
|
6
|
+
/**
|
7
|
+
* 是否显示头部右侧的设置按钮.
|
8
|
+
* @default true
|
9
|
+
*/
|
10
|
+
kgShowConfigButton: {
|
11
|
+
type: PropType<boolean>;
|
12
|
+
default: boolean;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
export declare type IKgSubmitProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
16
|
+
declare const _default: import("vue").DefineComponent<{
|
17
|
+
/** 自定义的样式类名. */
|
18
|
+
kgClass: PropType<string>;
|
19
|
+
/**
|
20
|
+
* 是否显示头部右侧的设置按钮.
|
21
|
+
* @default true
|
22
|
+
*/
|
23
|
+
kgShowConfigButton: {
|
24
|
+
type: PropType<boolean>;
|
25
|
+
default: boolean;
|
26
|
+
};
|
27
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
28
|
+
/** 自定义的样式类名. */
|
29
|
+
kgClass: PropType<string>;
|
30
|
+
/**
|
31
|
+
* 是否显示头部右侧的设置按钮.
|
32
|
+
* @default true
|
33
|
+
*/
|
34
|
+
kgShowConfigButton: {
|
35
|
+
type: PropType<boolean>;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
}>>, {
|
39
|
+
kgShowConfigButton: boolean;
|
40
|
+
}>;
|
41
|
+
export default _default;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Ref, UnwrapRef } from 'vue';
|
2
|
+
import { IKgSubmitHeaderProps } from './components/KgSubmit.Header';
|
3
|
+
import { IKgSubmitProps } from './KgSubmit';
|
4
|
+
export declare function _useFormModel(): {
|
5
|
+
model: Ref<Record<string, any>>;
|
6
|
+
};
|
7
|
+
export declare type IUseResizeObserver = {};
|
8
|
+
export declare function _useResizeObserver(kgFormRef: Ref<UnwrapRef<HTMLDivElement | null>>): IUseResizeObserver;
|
9
|
+
export declare function _useTitle(): {
|
10
|
+
title: Ref<string>;
|
11
|
+
};
|
12
|
+
export declare function _useClass(props: IKgSubmitProps, kgSubmitHeaderProps: IKgSubmitHeaderProps): {
|
13
|
+
getClass: Ref<string>;
|
14
|
+
};
|
15
|
+
export declare function _useLayout(): {
|
16
|
+
getLayout: Ref<'horizontal' | 'vertical'>;
|
17
|
+
};
|
18
|
+
export declare function _useDefaultWidth(): {
|
19
|
+
getDefaultWidth: Ref<number>;
|
20
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
export declare const FORM_ID__VAR_SUBMIT_CONFIG = "kg-submit.VarSubmitConfig";
|
3
|
+
export declare const getProps: () => {
|
4
|
+
/** 主页面的页面标识. */
|
5
|
+
hostFormID: {
|
6
|
+
type: PropType<string>;
|
7
|
+
required: boolean;
|
8
|
+
};
|
9
|
+
onKgClose: PropType<() => void>;
|
10
|
+
};
|
11
|
+
declare const _default: import("vue").DefineComponent<{
|
12
|
+
/** 主页面的页面标识. */
|
13
|
+
hostFormID: {
|
14
|
+
type: PropType<string>;
|
15
|
+
required: boolean;
|
16
|
+
};
|
17
|
+
onKgClose: PropType<() => void>;
|
18
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgClose"[], "kgClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
|
+
/** 主页面的页面标识. */
|
20
|
+
hostFormID: {
|
21
|
+
type: PropType<string>;
|
22
|
+
required: boolean;
|
23
|
+
};
|
24
|
+
onKgClose: PropType<() => void>;
|
25
|
+
}>> & {
|
26
|
+
onKgClose?: ((...args: any[]) => any) | undefined;
|
27
|
+
}, {}>;
|
28
|
+
export default _default;
|
@@ -0,0 +1,82 @@
|
|
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 undefined
|
13
|
+
*/
|
14
|
+
kgShowFullscreenButton: {
|
15
|
+
type: PropType<boolean>;
|
16
|
+
default: undefined;
|
17
|
+
};
|
18
|
+
/**
|
19
|
+
* 是否显示头部右侧的设置按钮.
|
20
|
+
* @default true
|
21
|
+
*/ kgShowConfigButton: {
|
22
|
+
type: PropType<boolean>;
|
23
|
+
default: boolean;
|
24
|
+
};
|
25
|
+
onKgCancel: PropType<() => void>;
|
26
|
+
};
|
27
|
+
export declare type IKgSubmitHeaderProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
28
|
+
declare const _default: import("vue").DefineComponent<{
|
29
|
+
/** 是否全屏. */
|
30
|
+
isFullscreen: {
|
31
|
+
type: PropType<boolean>;
|
32
|
+
default: boolean;
|
33
|
+
};
|
34
|
+
'onUpdate:isFullscreen': PropType<(value: boolean) => void>;
|
35
|
+
/**
|
36
|
+
* 是否显示头部右侧的全屏按钮.
|
37
|
+
* @default undefined
|
38
|
+
*/
|
39
|
+
kgShowFullscreenButton: {
|
40
|
+
type: PropType<boolean>;
|
41
|
+
default: undefined;
|
42
|
+
};
|
43
|
+
/**
|
44
|
+
* 是否显示头部右侧的设置按钮.
|
45
|
+
* @default true
|
46
|
+
*/ kgShowConfigButton: {
|
47
|
+
type: PropType<boolean>;
|
48
|
+
default: boolean;
|
49
|
+
};
|
50
|
+
onKgCancel: PropType<() => void>;
|
51
|
+
}, () => 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<{
|
52
|
+
/** 是否全屏. */
|
53
|
+
isFullscreen: {
|
54
|
+
type: PropType<boolean>;
|
55
|
+
default: boolean;
|
56
|
+
};
|
57
|
+
'onUpdate:isFullscreen': PropType<(value: boolean) => void>;
|
58
|
+
/**
|
59
|
+
* 是否显示头部右侧的全屏按钮.
|
60
|
+
* @default undefined
|
61
|
+
*/
|
62
|
+
kgShowFullscreenButton: {
|
63
|
+
type: PropType<boolean>;
|
64
|
+
default: undefined;
|
65
|
+
};
|
66
|
+
/**
|
67
|
+
* 是否显示头部右侧的设置按钮.
|
68
|
+
* @default true
|
69
|
+
*/ kgShowConfigButton: {
|
70
|
+
type: PropType<boolean>;
|
71
|
+
default: boolean;
|
72
|
+
};
|
73
|
+
onKgCancel: PropType<() => void>;
|
74
|
+
}>> & {
|
75
|
+
"onUpdate:isFullscreen"?: ((...args: any[]) => any) | undefined;
|
76
|
+
onKgCancel?: ((...args: any[]) => any) | undefined;
|
77
|
+
}, {
|
78
|
+
kgShowFullscreenButton: boolean;
|
79
|
+
kgShowConfigButton: boolean;
|
80
|
+
isFullscreen: boolean;
|
81
|
+
}>;
|
82
|
+
export default _default;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { RuleObject } from 'ant-design-vue/es/form';
|
2
|
+
import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
3
|
+
import { Ref } from 'vue';
|
4
|
+
import { IRemoveEventListenerHandler, KG_VAR_SUBMIT__DISPLAY_TYPE } from '../../consts';
|
5
|
+
import { IKgSubmitAfterValidateCb, IKgSubmitBeforeOkCb, IKgSubmitBeforeOpenCb, IKgSubmitBeforeRequestCb, IKgSubmitCloseCb, IKgSubmitErrorCb, IKgSubmitOkCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
|
6
|
+
export declare type IUseKgSubmit = {
|
7
|
+
formID: string;
|
8
|
+
/** 状态数据. */
|
9
|
+
store: IKgSubmitStore;
|
10
|
+
/** 表单数据对象. */
|
11
|
+
model: Ref<ReturnType<IKgSubmitStore['getModel']>>;
|
12
|
+
formRef: Ref<FormInstance | null>;
|
13
|
+
rules: Ref<Record<string, Array<RuleObject>>>;
|
14
|
+
/** 显示方式. */
|
15
|
+
displayType: Ref<KG_VAR_SUBMIT__DISPLAY_TYPE>;
|
16
|
+
/**
|
17
|
+
* 事件: 打开提交弹窗之前.
|
18
|
+
* @param cb 回调函数.
|
19
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
20
|
+
* @return {} 移除事件监听函数.
|
21
|
+
*/
|
22
|
+
onBeforeOpen(cb: IKgSubmitBeforeOpenCb, once?: boolean): IRemoveEventListenerHandler;
|
23
|
+
/**
|
24
|
+
* 事件: 打开提交弹窗.
|
25
|
+
* @param cb 回调函数.
|
26
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
27
|
+
* @return {} 移除事件监听函数.
|
28
|
+
*/
|
29
|
+
onOpen(cb: IKgSubmitOpenCb, once?: boolean): IRemoveEventListenerHandler;
|
30
|
+
/**
|
31
|
+
* 事件: 点击保存按钮之后, 执行默认逻辑之前. 可以在此时修改表单的值; 可以在此时对表单的值进行验证.
|
32
|
+
* <p>回调函数如果返回 true, 不会再执行后面的代码.</p>
|
33
|
+
* @param cb 回调函数.
|
34
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
35
|
+
* @return {} 移除事件监听函数.
|
36
|
+
*/
|
37
|
+
onBeforeOk(cb: IKgSubmitBeforeOkCb, once?: boolean): IRemoveEventListenerHandler;
|
38
|
+
/** 事件: 点击保存按钮之后, 表单验证完成.
|
39
|
+
* <p>回调函数如果返回 true, 不会再执行后面的代码.</p>
|
40
|
+
* @param cb 回调函数.
|
41
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
42
|
+
* @return {} 移除事件监听函数.
|
43
|
+
*/
|
44
|
+
onAfterValidate(cb: IKgSubmitAfterValidateCb, once?: boolean): IRemoveEventListenerHandler;
|
45
|
+
/** 事件: 发起请求之前. 表单验证完成, 参数解析完成.
|
46
|
+
* <p>回调函数如果返回 true, 不会再执行后面的代码.</p>
|
47
|
+
* @param cb 回调函数.
|
48
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
49
|
+
* @return {} 移除事件监听函数.
|
50
|
+
*/
|
51
|
+
onBeforeRequest(cb: IKgSubmitBeforeRequestCb, once?: boolean): IRemoveEventListenerHandler;
|
52
|
+
/** 事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 即将关闭提交弹窗.
|
53
|
+
* @param cb 回调函数.
|
54
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
55
|
+
* @return {} 移除事件监听函数.
|
56
|
+
*/
|
57
|
+
onOk(cb: IKgSubmitOkCb, once?: boolean): IRemoveEventListenerHandler;
|
58
|
+
/** 事件: 请求失败. 请求失败了, 或者请求返回了错误消息.
|
59
|
+
* @param cb 回调函数.
|
60
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
61
|
+
* @return {} 移除事件监听函数.
|
62
|
+
*/
|
63
|
+
onError(cb: IKgSubmitErrorCb, once?: boolean): IRemoveEventListenerHandler;
|
64
|
+
/** 事件: 关闭提交弹窗. 点击取消或者点击确定并且成功之后, 都会触发.
|
65
|
+
* @param cb 回调函数.
|
66
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
67
|
+
* @return {} 移除事件监听函数.
|
68
|
+
*/
|
69
|
+
onClose(cb: IKgSubmitCloseCb, once?: boolean): IRemoveEventListenerHandler;
|
70
|
+
};
|
71
|
+
/**
|
72
|
+
* @param formID 界面标识.
|
73
|
+
*/
|
74
|
+
export declare function useKgSubmit(formID?: string | null): IUseKgSubmit;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import { RuleObject } from 'ant-design-vue/es/form';
|
2
|
+
import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
3
|
+
import { StoreDefinition } from 'pinia';
|
4
|
+
import { Ref } from 'vue';
|
5
|
+
import { IKgEventCb } from '../../consts';
|
6
|
+
import { IKgTableRow } from '../KgTable';
|
7
|
+
/**
|
8
|
+
* 事件类型.
|
9
|
+
* 'beforeOpen': 打开提交弹窗之前
|
10
|
+
* 'open': 打开提交弹窗
|
11
|
+
* 'beforeOk': 点击保存按钮之后, 执行默认逻辑之前
|
12
|
+
* 'afterValidate': 表单验证完成
|
13
|
+
* 'beforeRequest': 发起请求之前. 表单验证完成, 参数解析完成,
|
14
|
+
* 'ok': 请求成功, 即将关闭提交弹窗
|
15
|
+
* 'error': 请求失败. 请求失败了, 或者请求返回了错误消息
|
16
|
+
* 'close': 关闭提交弹窗
|
17
|
+
*/
|
18
|
+
export declare type IKgSubmitEvent = 'beforeOpen' | 'open' | 'beforeOk' | 'afterValidate' | 'beforeRequest' | 'ok' | 'error' | 'close';
|
19
|
+
/** 事件监听函数: beforeOpen. */
|
20
|
+
export declare type IKgSubmitBeforeOpenCbParam = {
|
21
|
+
isCreating: boolean | null;
|
22
|
+
isUpdating: boolean | null;
|
23
|
+
isCopying: boolean | null;
|
24
|
+
isDeleting: boolean | null;
|
25
|
+
row: IKgTableRow | null;
|
26
|
+
};
|
27
|
+
export declare type IKgSubmitBeforeOpenCb = ((param: IKgSubmitBeforeOpenCbParam) => Promise<boolean>) & IKgEventCb;
|
28
|
+
/** 事件监听函数: open. */
|
29
|
+
export declare type IKgSubmitOpenCbParam = {
|
30
|
+
isCreating: boolean | null;
|
31
|
+
isUpdating: boolean | null;
|
32
|
+
isCopying: boolean | null;
|
33
|
+
isDeleting: boolean | null;
|
34
|
+
/** 勾选的表格行. */
|
35
|
+
row: IKgTableRow | null;
|
36
|
+
model: Ref<Record<string, any>>;
|
37
|
+
};
|
38
|
+
export declare type IKgSubmitOpenCb = ((param: IKgSubmitOpenCbParam) => Promise<boolean>) & IKgEventCb;
|
39
|
+
/** 事件监听函数: beforeOk. */
|
40
|
+
export declare type IKgSubmitBeforeOkCbParam = {
|
41
|
+
isCreating: boolean | null;
|
42
|
+
isUpdating: boolean | null;
|
43
|
+
isCopying: boolean | null;
|
44
|
+
isDeleting: boolean | null;
|
45
|
+
row: IKgTableRow | null;
|
46
|
+
rules: Ref<Record<string, RuleObject[]>>;
|
47
|
+
model: Ref<Record<string, any>>;
|
48
|
+
};
|
49
|
+
export declare type IKgSubmitBeforeOkCb = ((param: IKgSubmitBeforeOkCbParam) => Promise<boolean>) & IKgEventCb;
|
50
|
+
/** 事件监听函数: afterValidate. */
|
51
|
+
export declare type IKgSubmitAfterValidateCbParam = {
|
52
|
+
isCreating: boolean | null;
|
53
|
+
isUpdating: boolean | null;
|
54
|
+
isCopying: boolean | null;
|
55
|
+
isDeleting: boolean | null;
|
56
|
+
row: IKgTableRow | null;
|
57
|
+
rows: Array<IKgTableRow> | null;
|
58
|
+
model: Ref<Record<string, any>>;
|
59
|
+
};
|
60
|
+
export declare type IKgSubmitAfterValidateCb = ((param: IKgSubmitAfterValidateCbParam) => Promise<boolean>) & IKgEventCb;
|
61
|
+
/** 事件监听函数: beforeRequest. */
|
62
|
+
export declare type IKgSubmitBeforeRequestCbParam = {
|
63
|
+
isCreating: boolean | null;
|
64
|
+
isUpdating: boolean | null;
|
65
|
+
isCopying: boolean | null;
|
66
|
+
isDeleting: boolean | null;
|
67
|
+
row: IKgTableRow | null;
|
68
|
+
rows: Array<IKgTableRow> | null;
|
69
|
+
model: Ref<Record<string, any>>;
|
70
|
+
params: Ref<Record<string, any>>;
|
71
|
+
data: Ref<Record<string, any>>;
|
72
|
+
};
|
73
|
+
export declare type IKgSubmitBeforeRequestCb = ((param: IKgSubmitBeforeRequestCbParam) => Promise<boolean>) & IKgEventCb;
|
74
|
+
/** 事件监听函数: ok. */
|
75
|
+
export declare type IKgSubmitOkCbParam = {
|
76
|
+
isCreating: boolean | null;
|
77
|
+
isUpdating: boolean | null;
|
78
|
+
isCopying: boolean | null;
|
79
|
+
isDeleting: boolean | null;
|
80
|
+
row: IKgTableRow | null;
|
81
|
+
model: Ref<Record<string, any>>;
|
82
|
+
/** 接口返回结果. */
|
83
|
+
result: any | null;
|
84
|
+
};
|
85
|
+
export declare type IKgSubmitOkCb = ((param: IKgSubmitOkCbParam) => Promise<boolean>) & IKgEventCb;
|
86
|
+
/** 事件监听函数: error. */
|
87
|
+
export declare type IKgSubmitErrorCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
88
|
+
/** 事件监听函数: close. */
|
89
|
+
export declare type IKgSubmitCloseCb = ((param?: any | null) => Promise<boolean>) & IKgEventCb;
|
90
|
+
export declare type IKgSubmitCbParam = IKgSubmitBeforeOpenCbParam | IKgSubmitOpenCbParam | IKgSubmitBeforeOkCbParam | IKgSubmitAfterValidateCbParam | IKgSubmitBeforeRequestCbParam | IKgSubmitOkCbParam | null;
|
91
|
+
export declare type IKgSubmitCb = IKgSubmitBeforeOpenCb | IKgSubmitOpenCb | IKgSubmitBeforeOkCb | IKgSubmitAfterValidateCb | IKgSubmitBeforeRequestCb | IKgSubmitOkCb | IKgSubmitErrorCb | IKgSubmitCloseCb;
|
92
|
+
export interface IKgSubmitState {
|
93
|
+
beforeOpenListenersMap: Map<string, Array<IKgSubmitBeforeOpenCb>>;
|
94
|
+
openListenersMap: Map<string, Array<IKgSubmitOpenCb>>;
|
95
|
+
beforeOkListenersMap: Map<string, Array<IKgSubmitBeforeOkCb>>;
|
96
|
+
afterValidateListenersMap: Map<string, Array<IKgSubmitAfterValidateCb>>;
|
97
|
+
beforeRequestListenersMap: Map<string, Array<IKgSubmitBeforeRequestCb>>;
|
98
|
+
okListenersMap: Map<string, Array<IKgSubmitOkCb>>;
|
99
|
+
errorListenersMap: Map<string, Array<IKgSubmitErrorCb>>;
|
100
|
+
closeListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
|
101
|
+
isLoadingMap: Map<string, boolean>;
|
102
|
+
/** 表单数据对象. */
|
103
|
+
modelMap: Map<string, Record<string, any>>;
|
104
|
+
/** 表单对象. */
|
105
|
+
formRefMap: Map<string, Ref<FormInstance | null>>;
|
106
|
+
/** 表单验证规则. 在 beforeOk 事件中会将该对象传给调用者, 调用者可以修改该对象, 从而添加自定义的验证规则. */
|
107
|
+
rulesMap: Map<string, Ref<Record<string, Array<RuleObject>>>>;
|
108
|
+
}
|
109
|
+
export declare type IKgSubmitStoreDefinition = StoreDefinition<'KgSubmit', IKgSubmitState, {
|
110
|
+
/** 是否处于加载状态. */
|
111
|
+
isLoading(): (formID?: string | null) => boolean;
|
112
|
+
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
113
|
+
getFormRef(): (formID?: string | null) => Ref<FormInstance | null>;
|
114
|
+
getRules(): (formID?: string | null) => Ref<Record<string, Array<RuleObject>>>;
|
115
|
+
}, {
|
116
|
+
dispose(formID?: string | null): void;
|
117
|
+
addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitCb): void;
|
118
|
+
removeEventListener(formID: string, event: IKgSubmitEvent, cb?: IKgSubmitCb): void;
|
119
|
+
/**
|
120
|
+
* 触发事件.
|
121
|
+
* @param formID 界面标识.
|
122
|
+
* @param event 事件名称.
|
123
|
+
* @param param 事件参数.
|
124
|
+
*/
|
125
|
+
emit(formID: string, event: IKgSubmitEvent, param: IKgSubmitCbParam): Promise<boolean>;
|
126
|
+
setIsLoading(formID: string, value: boolean): void;
|
127
|
+
setModel(formID: string, model: Record<string, any>): void;
|
128
|
+
}>;
|
129
|
+
export declare type IKgSubmitStore = ReturnType<IKgSubmitStoreDefinition>;
|
130
|
+
export declare const useKgSubmitStore: () => IKgSubmitStoreDefinition;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export declare const DEFAULT_MIN_WIDTH = 300;
|
2
|
+
export declare const DEFAULT_MAX_WIDTH = 1182;
|
3
|
+
/** 默认宽度. */
|
4
|
+
export declare const DEFAULT_WIDTH = 594;
|
5
|
+
/** 默认布局方式. */
|
6
|
+
export declare const DEFAULT_LAYOUT = "vertical";
|
7
|
+
/** 单位为 SPAN 时的默认宽度. */
|
8
|
+
export declare const DEFAULT_LABEL_COL_FOR_SPAN = 4;
|
9
|
+
/** 单位为 PX 时的默认宽度. */
|
10
|
+
export declare const DEFAULT_LABEL_COL_FOR_PX = 100;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { RowClassName } from 'ant-design-vue/es/vc-table/interface';
|
2
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
3
|
+
import './KgTable.less';
|
4
|
+
export declare const getProps: () => {
|
5
|
+
/** 是否禁用表格. */
|
6
|
+
kgDisabled: {
|
7
|
+
type: PropType<boolean>;
|
8
|
+
default: undefined;
|
9
|
+
};
|
10
|
+
/** 是否禁用某行的勾选框. */
|
11
|
+
kgCheckboxDisabled: PropType<(row: any) => boolean>;
|
12
|
+
/** 设置行的样式类名. */
|
13
|
+
kgRowClassName: PropType<RowClassName<any>>;
|
14
|
+
};
|
15
|
+
export declare type IKgTableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
16
|
+
declare const _default: import("vue").DefineComponent<{
|
17
|
+
/** 是否禁用表格. */
|
18
|
+
kgDisabled: {
|
19
|
+
type: PropType<boolean>;
|
20
|
+
default: undefined;
|
21
|
+
};
|
22
|
+
/** 是否禁用某行的勾选框. */
|
23
|
+
kgCheckboxDisabled: PropType<(row: any) => boolean>;
|
24
|
+
/** 设置行的样式类名. */
|
25
|
+
kgRowClassName: PropType<RowClassName<any>>;
|
26
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
27
|
+
/** 是否禁用表格. */
|
28
|
+
kgDisabled: {
|
29
|
+
type: PropType<boolean>;
|
30
|
+
default: undefined;
|
31
|
+
};
|
32
|
+
/** 是否禁用某行的勾选框. */
|
33
|
+
kgCheckboxDisabled: PropType<(row: any) => boolean>;
|
34
|
+
/** 设置行的样式类名. */
|
35
|
+
kgRowClassName: PropType<RowClassName<any>>;
|
36
|
+
}>>, {
|
37
|
+
kgDisabled: boolean;
|
38
|
+
}>;
|
39
|
+
export default _default;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { ColumnsType } from 'ant-design-vue/es/table';
|
2
|
+
import { SorterResult } from 'ant-design-vue/es/table/interface';
|
3
|
+
import { ComputedRef, Ref, UnwrapRef, VNode } from 'vue';
|
4
|
+
import { IKgTableRow, KG_TABLE_CELL_CONTEXT } from './index.vm';
|
5
|
+
import { IKgTableProps } from './KgTable';
|
6
|
+
export declare type IUseRenderBodyCell = {
|
7
|
+
/** 表格的列. */
|
8
|
+
renderBodyCell: (args: any, context?: KG_TABLE_CELL_CONTEXT) => VNode;
|
9
|
+
};
|
10
|
+
export declare function _useRenderBodyCell(): IUseRenderBodyCell;
|
11
|
+
export declare type IUseColumns = {
|
12
|
+
/** 表格的列. */
|
13
|
+
columns: ComputedRef<ColumnsType<IKgTableRow>>;
|
14
|
+
/** 当前过滤状态(哪些列有过滤, 哪些列没过滤). */
|
15
|
+
filterInfo: Ref<Record<string, any>>;
|
16
|
+
/** 当前排序状态. */
|
17
|
+
sorterInfo: Ref<SorterResult<any>>;
|
18
|
+
/** 横向滚动宽度. */
|
19
|
+
scrollX: ComputedRef<string>;
|
20
|
+
};
|
21
|
+
export declare function _useColumns(props: IKgTableProps): IUseColumns;
|
22
|
+
export declare type IUseLoading = {
|
23
|
+
/** 是否显示加载状态. */
|
24
|
+
isLoading: ComputedRef<boolean>;
|
25
|
+
};
|
26
|
+
export declare function _useLoading(): IUseLoading;
|
27
|
+
export declare type IUseResizeObserver = {};
|
28
|
+
export declare function _useResizeObserver(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>): IUseResizeObserver;
|
29
|
+
export declare type IUseDragColumn = {};
|
30
|
+
export declare function _useDragColumn(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>, columns: ComputedRef<ColumnsType<IKgTableRow>>): IUseDragColumn;
|
31
|
+
export interface IUseDatas {
|
32
|
+
/** 表格数据. */
|
33
|
+
datas: ComputedRef<Array<IKgTableRow>>;
|
34
|
+
/**
|
35
|
+
* 处理表格数据.
|
36
|
+
* @param response 查询接口返回数据.
|
37
|
+
*/
|
38
|
+
transformDatas(response: Ref<any>): {
|
39
|
+
datas: Ref<Array<IKgTableRow>>;
|
40
|
+
total: Ref<number>;
|
41
|
+
};
|
42
|
+
}
|
43
|
+
export declare function _useDatas(): IUseDatas;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { IKgTableRow, KG_TABLE_CELL_CONTEXT } from '../index.vm';
|
3
|
+
import './KgTable.Cell.less';
|
4
|
+
export declare const getProps: () => {
|
5
|
+
/** 行. */
|
6
|
+
kgRow: PropType<IKgTableRow>;
|
7
|
+
/** 列值. */
|
8
|
+
kgValue: PropType<any>;
|
9
|
+
/** 变量名称. */
|
10
|
+
kgVarName: PropType<string | null>;
|
11
|
+
/**
|
12
|
+
* 所处环境.
|
13
|
+
* @default {@link KG_TABLE_CELL_CONTEXT.TABLE_CELL}
|
14
|
+
*/
|
15
|
+
kgContext: {
|
16
|
+
type: PropType<string>;
|
17
|
+
default: KG_TABLE_CELL_CONTEXT;
|
18
|
+
};
|
19
|
+
/** 点击链接, 打开更新弹窗. */
|
20
|
+
onKgUpdateLinkClick: PropType<() => void>;
|
21
|
+
};
|
22
|
+
declare const _default: import("vue").DefineComponent<{
|
23
|
+
/** 行. */
|
24
|
+
kgRow: PropType<IKgTableRow>;
|
25
|
+
/** 列值. */
|
26
|
+
kgValue: PropType<any>;
|
27
|
+
/** 变量名称. */
|
28
|
+
kgVarName: PropType<string | null>;
|
29
|
+
/**
|
30
|
+
* 所处环境.
|
31
|
+
* @default {@link KG_TABLE_CELL_CONTEXT.TABLE_CELL}
|
32
|
+
*/
|
33
|
+
kgContext: {
|
34
|
+
type: PropType<string>;
|
35
|
+
default: KG_TABLE_CELL_CONTEXT;
|
36
|
+
};
|
37
|
+
/** 点击链接, 打开更新弹窗. */
|
38
|
+
onKgUpdateLinkClick: PropType<() => void>;
|
39
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgUpdateLinkClick"[], "kgUpdateLinkClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
40
|
+
/** 行. */
|
41
|
+
kgRow: PropType<IKgTableRow>;
|
42
|
+
/** 列值. */
|
43
|
+
kgValue: PropType<any>;
|
44
|
+
/** 变量名称. */
|
45
|
+
kgVarName: PropType<string | null>;
|
46
|
+
/**
|
47
|
+
* 所处环境.
|
48
|
+
* @default {@link KG_TABLE_CELL_CONTEXT.TABLE_CELL}
|
49
|
+
*/
|
50
|
+
kgContext: {
|
51
|
+
type: PropType<string>;
|
52
|
+
default: KG_TABLE_CELL_CONTEXT;
|
53
|
+
};
|
54
|
+
/** 点击链接, 打开更新弹窗. */
|
55
|
+
onKgUpdateLinkClick: PropType<() => void>;
|
56
|
+
}>> & {
|
57
|
+
onKgUpdateLinkClick?: ((...args: any[]) => any) | undefined;
|
58
|
+
}, {
|
59
|
+
kgContext: string;
|
60
|
+
}>;
|
61
|
+
export default _default;
|