@dt-frames/ui 1.0.9 → 1.0.12
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.
- package/es/components/curd/src/components/dialog.d.ts +8 -3
- package/es/components/forms/src/components/formIcon.d.ts +1 -1
- package/es/components/forms/src/components/formInputUseDialog.d.ts +903 -0
- package/es/components/forms/src/types/form.type.d.ts +6 -4
- package/es/components/index.d.ts +3 -2
- package/es/components/modal/src/types/modal.type.d.ts +5 -2
- package/es/components/source/src/hooks/useFetch.d.ts +2 -2
- package/es/components/source/src/hooks/useSource.d.ts +8 -8
- package/es/components/source/src/types/table.type.d.ts +1 -1
- package/es/components/table/src/components/TableActions.d.ts +2 -2
- package/es/components/table/src/components/TableHeader.d.ts +2 -2
- package/es/components/table/src/components/editable/CellComponent.d.ts +14 -0
- package/es/components/table/src/components/editable/EditTableCell.d.ts +88 -0
- package/es/components/table/src/components/editable/componentMap.d.ts +4 -0
- package/es/components/table/src/components/editable/index.d.ts +9 -0
- package/es/components/table/src/components/setting/Download.d.ts +2 -2
- package/es/components/table/src/components/setting/Size.d.ts +2 -2
- package/es/components/table/src/hooks/useCustomRow.d.ts +19 -0
- package/es/components/table/src/index.d.ts +29 -6
- package/es/components/table/src/props.d.ts +5 -1
- package/es/components/table/src/types/table.type.d.ts +16 -0
- package/es/components/tree/index.d.ts +2 -0
- package/es/components/tree/src/hooks/useTree.d.ts +14 -0
- package/es/components/tree/src/props.d.ts +101 -0
- package/es/components/tree/src/type/tree.d.ts +85 -0
- package/es/components/tree/src/utils/tree.d.ts +5 -0
- package/es/components/upload/index.d.ts +3 -0
- package/es/components/upload/src/helper.d.ts +4 -0
- package/es/components/upload/src/index.d.ts +2807 -0
- package/es/components/upload/src/props.d.ts +40 -0
- package/es/components/upload/src/upload.d.ts +1653 -0
- package/es/index.js +2113 -270
- package/es/style/components/forms/index.less +23 -0
- package/es/style/components/table/index.less +8 -2
- package/es/style/components/tree/index.less +41 -0
- package/es/style/components/upload/index.less +43 -0
- package/es/style/theme/header/index.less +1 -1
- package/es/theme/sider/components/basic-menu/basic-menu.d.ts +3 -3
- package/es/theme/tabs/components/TabContent.d.ts +2 -2
- package/package.json +2 -1
- package/src/components/curd/src/components/dialog.vue +7 -4
- package/src/components/curd/src/hooks/useCurd.tsx +1 -1
- package/src/components/forms/index.less +23 -0
- package/src/components/forms/src/componentMap.ts +2 -0
- package/src/components/forms/src/components/formInputUseDialog.vue +43 -0
- package/src/components/forms/src/components/formItem.vue +25 -12
- package/src/components/forms/src/hooks/useFormEvents.ts +4 -3
- package/src/components/forms/src/hooks/useFormValues.ts +1 -1
- package/src/components/forms/src/types/form.type.ts +9 -3
- package/src/components/index.ts +9 -3
- package/src/components/modal/src/hooks/useModal.ts +12 -4
- package/src/components/modal/src/index.vue +2 -2
- package/src/components/modal/src/types/modal.type.ts +5 -2
- package/src/components/source/src/hooks/useFetch.ts +10 -6
- package/src/components/source/src/hooks/useSource.ts +33 -12
- package/src/components/source/src/types/table.type.ts +1 -1
- package/src/components/table/index.less +8 -2
- package/src/components/table/src/components/TableHeader.vue +2 -2
- package/src/components/table/src/components/editable/CellComponent.ts +57 -0
- package/src/components/table/src/components/editable/EditTableCell.vue +181 -0
- package/src/components/table/src/components/editable/componentMap.ts +18 -0
- package/src/components/table/src/components/editable/index.ts +58 -0
- package/src/components/table/src/hooks/useColumns.ts +15 -8
- package/src/components/table/src/hooks/useCustomRow.ts +86 -0
- package/src/components/table/src/hooks/useDataSource.ts +0 -13
- package/src/components/table/src/hooks/useTableHeader.ts +2 -2
- package/src/components/table/src/index.vue +20 -3
- package/src/components/table/src/props.ts +4 -1
- package/src/components/table/src/types/table.type.ts +28 -1
- package/src/components/tree/index.less +41 -0
- package/src/components/tree/index.ts +5 -0
- package/src/components/tree/src/components/TreeHeader.vue +97 -0
- package/src/components/tree/src/hooks/useTree.ts +239 -0
- package/src/components/tree/src/index.vue +392 -0
- package/src/components/tree/src/props.ts +133 -0
- package/src/components/tree/src/type/tree.ts +105 -0
- package/src/components/tree/src/utils/tree.ts +73 -0
- package/src/components/upload/index.less +43 -0
- package/src/components/upload/index.ts +7 -0
- package/src/components/upload/src/helper.ts +32 -0
- package/src/components/upload/src/index.vue +38 -0
- package/src/components/upload/src/props.ts +48 -0
- package/src/components/upload/src/upload.vue +166 -0
- package/src/theme/header/helper/menu-tree.ts +2 -2
- package/src/theme/header/index.less +1 -1
- package/src/theme/sider/helper/split-menu.ts +2 -2
- package/es/components/dialog/index.d.ts +0 -2
- package/es/components/dialog/src/hooks/useDialog.d.ts +0 -3
- package/src/components/dialog/index.ts +0 -5
- package/src/components/dialog/src/hooks/useDialog.ts +0 -85
|
@@ -12,7 +12,7 @@ export declare type FormCallBackParams = {
|
|
|
12
12
|
model: Recordable;
|
|
13
13
|
name: string;
|
|
14
14
|
};
|
|
15
|
-
export declare type ComponentType = 'Input' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'InputCountDown' | 'Select' | 'TreeSelect' | 'ApiTree' | 'ApiTreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'IconPicker' | 'Render' | 'Slider' | 'Rate' | 'Divider' | 'Icon';
|
|
15
|
+
export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'InputCountDown' | 'Select' | 'TreeSelect' | 'ApiTree' | 'ApiTreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'IconPicker' | 'Render' | 'Slider' | 'Rate' | 'Divider' | 'Icon';
|
|
16
16
|
export declare type ColEx = {
|
|
17
17
|
style?: any;
|
|
18
18
|
span?: number | string;
|
|
@@ -67,7 +67,7 @@ export declare type FormProps = {
|
|
|
67
67
|
style?: Recordable;
|
|
68
68
|
};
|
|
69
69
|
export declare type FormSchema = {
|
|
70
|
-
name
|
|
70
|
+
name?: string | string[];
|
|
71
71
|
changeEvent?: string;
|
|
72
72
|
valueField?: string;
|
|
73
73
|
label?: string | VNode;
|
|
@@ -76,7 +76,7 @@ export declare type FormSchema = {
|
|
|
76
76
|
labelAlign?: 'left' | 'right';
|
|
77
77
|
toolTip?: string | ((parms: FormCallBackParams) => string | string[]);
|
|
78
78
|
toolTipProps?: ToolTipProps;
|
|
79
|
-
component
|
|
79
|
+
component?: ComponentType;
|
|
80
80
|
props?: ((opt: {
|
|
81
81
|
schema?: FormSchema;
|
|
82
82
|
formActions?: any;
|
|
@@ -90,7 +90,7 @@ export declare type FormSchema = {
|
|
|
90
90
|
defaultValue?: any;
|
|
91
91
|
span?: number;
|
|
92
92
|
show?: boolean | ((parms: FormCallBackParams) => boolean);
|
|
93
|
-
render?: (parms
|
|
93
|
+
render?: (parms?: FormCallBackParams) => VNode | VNode[] | string;
|
|
94
94
|
renderCol?: (parms: FormCallBackParams) => VNode | VNode[] | string;
|
|
95
95
|
colProps?: Partial<ColEx>;
|
|
96
96
|
renderComponent?: ((parms: FormCallBackParams) => Recordable) | VNode | VNode[] | string;
|
|
@@ -102,6 +102,8 @@ export declare type FormSchema = {
|
|
|
102
102
|
labelCol?: Partial<ColEx>;
|
|
103
103
|
wrapperCol?: Partial<ColEx>;
|
|
104
104
|
isAdvanced?: boolean;
|
|
105
|
+
openDialog?: (parms: Recordable) => void;
|
|
106
|
+
linkProps?: string[];
|
|
105
107
|
};
|
|
106
108
|
export declare type FormActionType = {
|
|
107
109
|
setProps: (props: FormProps) => Promise<void>;
|
package/es/components/index.d.ts
CHANGED
|
@@ -8,8 +8,9 @@ import { useSource } from './source';
|
|
|
8
8
|
import { useCurd } from './curd';
|
|
9
9
|
import { export2Excel } from './excel';
|
|
10
10
|
import { DtIframe } from './iframe';
|
|
11
|
-
import {
|
|
11
|
+
import { DtUpload, DtUploadModal } from './upload';
|
|
12
|
+
import { DtTree } from './tree';
|
|
12
13
|
export declare function initComponents(): {
|
|
13
14
|
install(app: App): void;
|
|
14
15
|
};
|
|
15
|
-
export { DtBaseRouter, DtIcon, DtPickIcon, DtModal, DtForm, DtTable, FormButtons, DtIframe, useForm, useTable, useSource, useCurd, useModal, useModalOut, export2Excel
|
|
16
|
+
export { DtBaseRouter, DtIcon, DtPickIcon, DtModal, DtForm, DtTable, FormButtons, DtIframe, DtUpload, DtUploadModal, DtTree, useForm, useTable, useSource, useCurd, useModal, useModalOut, export2Excel };
|
|
@@ -6,13 +6,16 @@ export declare type ModalMethods = {
|
|
|
6
6
|
redoModalHeight?: () => void;
|
|
7
7
|
};
|
|
8
8
|
export interface ReturnMethods extends ModalMethods {
|
|
9
|
-
openModal:
|
|
9
|
+
openModal: (data?: {
|
|
10
|
+
data?: Recordable;
|
|
11
|
+
afterClose?: (data: Recordable) => void;
|
|
12
|
+
}, openOnSet?: boolean) => void;
|
|
10
13
|
closeModal: () => void;
|
|
11
14
|
getVisible?: ComputedRef<boolean>;
|
|
12
15
|
}
|
|
13
16
|
export interface ReturnInnerMethods extends ModalMethods {
|
|
14
17
|
openModal: <T = any>(props?: boolean, data?: T, openOnSet?: boolean) => void;
|
|
15
|
-
closeModal: (rsp
|
|
18
|
+
closeModal: (rsp?: Recordable) => void;
|
|
16
19
|
changeLoading: (loading: boolean) => void;
|
|
17
20
|
getVisible?: ComputedRef<boolean>;
|
|
18
21
|
redoModalHeight: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiType } from "@dt-frames/core";
|
|
2
2
|
export declare function useFetch(api: string | ApiType, baseUrl?: string): {
|
|
3
|
-
fetch: (params
|
|
3
|
+
fetch: (params: any) => Promise<unknown>;
|
|
4
4
|
};
|
|
@@ -4,10 +4,10 @@ import { SourceType } from "../types/source.type";
|
|
|
4
4
|
import { TableParamsType } from '../types/table.type';
|
|
5
5
|
import { DownloadType } from '../../../table/src/types/tableHeader.type';
|
|
6
6
|
export declare function useSource(opt: SourceType): {
|
|
7
|
-
api:
|
|
8
|
-
|
|
7
|
+
api: Recordable<any>;
|
|
8
|
+
apiPath: Recordable<any>;
|
|
9
9
|
form: {
|
|
10
|
-
onSearch: (model
|
|
10
|
+
onSearch: (model?: Recordable) => void;
|
|
11
11
|
onReset: (model: Recordable) => void;
|
|
12
12
|
loading: {
|
|
13
13
|
[key: string]: Ref<boolean>;
|
|
@@ -25,19 +25,19 @@ export declare function useSource(opt: SourceType): {
|
|
|
25
25
|
loading: Ref<boolean>;
|
|
26
26
|
};
|
|
27
27
|
curd: {
|
|
28
|
-
onAdd: (model: Recordable) => void
|
|
28
|
+
onAdd: (model: Recordable) => Promise<void>;
|
|
29
29
|
onQueryById: (id: string) => Promise<unknown>;
|
|
30
|
-
onUpdate: (model: Recordable) => void
|
|
30
|
+
onUpdate: (model: Recordable) => Promise<void>;
|
|
31
31
|
onDeletes: (ids: any) => void;
|
|
32
32
|
};
|
|
33
33
|
loading: {
|
|
34
34
|
[key: string]: Ref<boolean>;
|
|
35
35
|
};
|
|
36
|
-
onAdd: (model: Recordable) => void
|
|
36
|
+
onAdd: (model: Recordable) => Promise<void>;
|
|
37
37
|
onQueryById: (id: string) => Promise<unknown>;
|
|
38
38
|
onDeletes: (ids: any) => void;
|
|
39
|
-
onUpdate: (model: Recordable) => void
|
|
39
|
+
onUpdate: (model: Recordable) => Promise<void>;
|
|
40
40
|
onTableChange: (params: TableParamsType, needSearch?: boolean) => void;
|
|
41
41
|
onDownload: (excelData: DownloadType) => void;
|
|
42
|
-
onSearch: (model
|
|
42
|
+
onSearch: (model?: Recordable) => void;
|
|
43
43
|
};
|
|
@@ -387,7 +387,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
387
387
|
'onUpdate:visible': {
|
|
388
388
|
type: PropType<(val: boolean) => void>;
|
|
389
389
|
};
|
|
390
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visible" | "overlayStyle" | "disabled" | "
|
|
390
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visible" | "overlayStyle" | "disabled" | "arrow" | "forceRender" | "minOverlayWidthMatchTrigger" | "destroyPopupOnHide">;
|
|
391
391
|
$attrs: {
|
|
392
392
|
[x: string]: unknown;
|
|
393
393
|
};
|
|
@@ -824,7 +824,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
824
824
|
'onUpdate:openKeys': PropType<(keys: import("ant-design-vue/lib/_util/type").Key[]) => void>;
|
|
825
825
|
'onUpdate:selectedKeys': PropType<(keys: import("ant-design-vue/lib/_util/type").Key[]) => void>;
|
|
826
826
|
'onUpdate:activeKey': PropType<(key: import("ant-design-vue/lib/_util/type").Key) => void>;
|
|
827
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "mode" | "
|
|
827
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "mode" | "multiple" | "selectable" | "inlineCollapsed" | "disabledOverflow" | "forceSubMenuRender" | "theme" | "inlineIndent" | "subMenuOpenDelay" | "subMenuCloseDelay" | "triggerSubMenuAction">;
|
|
828
828
|
$attrs: {
|
|
829
829
|
[x: string]: unknown;
|
|
830
830
|
};
|
|
@@ -2,7 +2,7 @@ import { PropType } from "vue";
|
|
|
2
2
|
import type { BtnsType, ColumnChangeParam, TableSetting } from "../types/table.type";
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
tableTools: {
|
|
5
|
-
type: PropType<TableSetting>;
|
|
5
|
+
type: PropType<boolean | TableSetting>;
|
|
6
6
|
};
|
|
7
7
|
toolbar: {
|
|
8
8
|
type: PropType<BtnsType[]>;
|
|
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
handleMethod: (e: any) => void;
|
|
15
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "columns-change"[], "columns-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
tableTools: {
|
|
17
|
-
type: PropType<TableSetting>;
|
|
17
|
+
type: PropType<boolean | TableSetting>;
|
|
18
18
|
};
|
|
19
19
|
toolbar: {
|
|
20
20
|
type: PropType<BtnsType[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { FunctionalComponent, Ref } from "vue";
|
|
3
|
+
export declare type EditRecordRow<T = Recordable> = Partial<{
|
|
4
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
5
|
+
onValid: () => Promise<boolean>;
|
|
6
|
+
editable: boolean;
|
|
7
|
+
onCancel: Function;
|
|
8
|
+
onSubmit: Function;
|
|
9
|
+
submitCbs: Function[];
|
|
10
|
+
cancelCbs: Function[];
|
|
11
|
+
validCbs: Function[];
|
|
12
|
+
editValueRefs: Recordable<Ref>;
|
|
13
|
+
} & T>;
|
|
14
|
+
export declare const CellComponent: FunctionalComponent;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { BasicColumn, LableValOptions } from "../../types/table.type";
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
value: {
|
|
6
|
+
type: PropType<string | number | boolean | Recordable<any>>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
record: {
|
|
10
|
+
type: PropType<Partial<{
|
|
11
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
12
|
+
onValid: () => Promise<boolean>;
|
|
13
|
+
editable: boolean;
|
|
14
|
+
onCancel: Function;
|
|
15
|
+
onSubmit: Function;
|
|
16
|
+
submitCbs: Function[];
|
|
17
|
+
cancelCbs: Function[];
|
|
18
|
+
validCbs: Function[];
|
|
19
|
+
editValueRefs: Recordable<import("vue").Ref<any>>;
|
|
20
|
+
} & Recordable<any>>>;
|
|
21
|
+
};
|
|
22
|
+
column: {
|
|
23
|
+
type: PropType<BasicColumn>;
|
|
24
|
+
default: () => BasicColumn;
|
|
25
|
+
};
|
|
26
|
+
index: NumberConstructor;
|
|
27
|
+
}, {
|
|
28
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
value: {
|
|
30
|
+
type: PropType<string | number | boolean | Recordable<any>>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
record: {
|
|
34
|
+
type: PropType<Partial<{
|
|
35
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
36
|
+
onValid: () => Promise<boolean>;
|
|
37
|
+
editable: boolean;
|
|
38
|
+
onCancel: Function;
|
|
39
|
+
onSubmit: Function;
|
|
40
|
+
submitCbs: Function[];
|
|
41
|
+
cancelCbs: Function[];
|
|
42
|
+
validCbs: Function[];
|
|
43
|
+
editValueRefs: Recordable<import("vue").Ref<any>>;
|
|
44
|
+
} & Recordable<any>>>;
|
|
45
|
+
};
|
|
46
|
+
column: {
|
|
47
|
+
type: PropType<BasicColumn>;
|
|
48
|
+
default: () => BasicColumn;
|
|
49
|
+
};
|
|
50
|
+
index: NumberConstructor;
|
|
51
|
+
}>> & {
|
|
52
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
|
|
53
|
+
}>>;
|
|
54
|
+
getComponentProps: import("vue").ComputedRef<any>;
|
|
55
|
+
getRuleVisible: import("vue").ComputedRef<boolean>;
|
|
56
|
+
editRule: boolean | ((text: string, record: Recordable<any>) => Promise<string>);
|
|
57
|
+
ruleMessage: import("vue").Ref<string>;
|
|
58
|
+
getWrapperClass: import("vue").ComputedRef<string>;
|
|
59
|
+
handleChange: (e: any) => Promise<void>;
|
|
60
|
+
handleOptionsChange: (options: LableValOptions) => void;
|
|
61
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
value: {
|
|
63
|
+
type: PropType<string | number | boolean | Recordable<any>>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
record: {
|
|
67
|
+
type: PropType<Partial<{
|
|
68
|
+
onEdit: (editable: boolean, submit?: boolean) => Promise<boolean>;
|
|
69
|
+
onValid: () => Promise<boolean>;
|
|
70
|
+
editable: boolean;
|
|
71
|
+
onCancel: Function;
|
|
72
|
+
onSubmit: Function;
|
|
73
|
+
submitCbs: Function[];
|
|
74
|
+
cancelCbs: Function[];
|
|
75
|
+
validCbs: Function[];
|
|
76
|
+
editValueRefs: Recordable<import("vue").Ref<any>>;
|
|
77
|
+
} & Recordable<any>>>;
|
|
78
|
+
};
|
|
79
|
+
column: {
|
|
80
|
+
type: PropType<BasicColumn>;
|
|
81
|
+
default: () => BasicColumn;
|
|
82
|
+
};
|
|
83
|
+
index: NumberConstructor;
|
|
84
|
+
}>>, {
|
|
85
|
+
value: string;
|
|
86
|
+
column: BasicColumn;
|
|
87
|
+
}>;
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BasicColumn } from "../../types/table.type";
|
|
2
|
+
declare function renderEditCell(column: BasicColumn): ({ text: value, record, index }: {
|
|
3
|
+
text: any;
|
|
4
|
+
record: any;
|
|
5
|
+
index: any;
|
|
6
|
+
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}>;
|
|
9
|
+
export { renderEditCell };
|
|
@@ -330,7 +330,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
330
330
|
'onUpdate:visible': {
|
|
331
331
|
type: import("vue").PropType<(val: boolean) => void>;
|
|
332
332
|
};
|
|
333
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visible" | "overlayStyle" | "disabled" | "
|
|
333
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visible" | "overlayStyle" | "disabled" | "arrow" | "forceRender" | "minOverlayWidthMatchTrigger" | "destroyPopupOnHide">;
|
|
334
334
|
$attrs: {
|
|
335
335
|
[x: string]: unknown;
|
|
336
336
|
};
|
|
@@ -767,7 +767,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
767
767
|
'onUpdate:openKeys': import("vue").PropType<(keys: import("ant-design-vue/lib/_util/type").Key[]) => void>;
|
|
768
768
|
'onUpdate:selectedKeys': import("vue").PropType<(keys: import("ant-design-vue/lib/_util/type").Key[]) => void>;
|
|
769
769
|
'onUpdate:activeKey': import("vue").PropType<(key: import("ant-design-vue/lib/_util/type").Key) => void>;
|
|
770
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "mode" | "
|
|
770
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "mode" | "multiple" | "selectable" | "inlineCollapsed" | "disabledOverflow" | "forceSubMenuRender" | "theme" | "inlineIndent" | "subMenuOpenDelay" | "subMenuCloseDelay" | "triggerSubMenuAction">;
|
|
771
771
|
$attrs: {
|
|
772
772
|
[x: string]: unknown;
|
|
773
773
|
};
|
|
@@ -331,7 +331,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
331
331
|
'onUpdate:visible': {
|
|
332
332
|
type: import("vue").PropType<(val: boolean) => void>;
|
|
333
333
|
};
|
|
334
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visible" | "overlayStyle" | "disabled" | "
|
|
334
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visible" | "overlayStyle" | "disabled" | "arrow" | "forceRender" | "minOverlayWidthMatchTrigger" | "destroyPopupOnHide">;
|
|
335
335
|
$attrs: {
|
|
336
336
|
[x: string]: unknown;
|
|
337
337
|
};
|
|
@@ -768,7 +768,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
768
768
|
'onUpdate:openKeys': import("vue").PropType<(keys: import("ant-design-vue/lib/_util/type").Key[]) => void>;
|
|
769
769
|
'onUpdate:selectedKeys': import("vue").PropType<(keys: import("ant-design-vue/lib/_util/type").Key[]) => void>;
|
|
770
770
|
'onUpdate:activeKey': import("vue").PropType<(key: import("ant-design-vue/lib/_util/type").Key) => void>;
|
|
771
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "mode" | "
|
|
771
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "mode" | "multiple" | "selectable" | "inlineCollapsed" | "disabledOverflow" | "forceSubMenuRender" | "theme" | "inlineIndent" | "subMenuOpenDelay" | "subMenuCloseDelay" | "triggerSubMenuAction">;
|
|
772
772
|
$attrs: {
|
|
773
773
|
[x: string]: unknown;
|
|
774
774
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { ComputedRef } from "vue";
|
|
3
|
+
import { BasicTableProps } from "../types/table.type";
|
|
4
|
+
interface Options {
|
|
5
|
+
setSelectedRowKeys: (keys: string[]) => void;
|
|
6
|
+
getSelectRowKeys: () => string[];
|
|
7
|
+
clearSelectedRowKeys: () => void;
|
|
8
|
+
emit: any;
|
|
9
|
+
}
|
|
10
|
+
export declare function useCustomRow(propsRef: ComputedRef<BasicTableProps>, { setSelectedRowKeys, getSelectRowKeys, clearSelectedRowKeys, emit }: Options): {
|
|
11
|
+
customRow: (record: Recordable, index: number) => {
|
|
12
|
+
onClick: (e: any) => void;
|
|
13
|
+
onDblclick: (event: Event) => void;
|
|
14
|
+
onContextmenu: (event: Event) => void;
|
|
15
|
+
onMouseenter: (event: Event) => void;
|
|
16
|
+
onMouseleave: (event: Event) => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -7,9 +7,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
default: boolean;
|
|
8
8
|
};
|
|
9
9
|
tableSetting: {
|
|
10
|
-
type: import("vue").PropType<import("./types/table.type").TableSetting>;
|
|
10
|
+
type: import("vue").PropType<boolean | import("./types/table.type").TableSetting>;
|
|
11
11
|
default: () => {};
|
|
12
12
|
};
|
|
13
|
+
clickToRowSelect: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
13
17
|
striped: {
|
|
14
18
|
type: BooleanConstructor;
|
|
15
19
|
default: boolean;
|
|
@@ -264,12 +268,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
268
|
rowKey: string;
|
|
265
269
|
columns: import("./types/table.type").BasicColumn[];
|
|
266
270
|
tableLayout: string;
|
|
271
|
+
customRow: (record: Recordable<any>, index: number) => {
|
|
272
|
+
onClick: (e: any) => void;
|
|
273
|
+
onDblclick: (event: Event) => void;
|
|
274
|
+
onContextmenu: (event: Event) => void;
|
|
275
|
+
onMouseenter: (event: Event) => void;
|
|
276
|
+
onMouseleave: (event: Event) => void;
|
|
277
|
+
};
|
|
267
278
|
size: SizeType;
|
|
268
279
|
bordered: boolean;
|
|
269
|
-
|
|
280
|
+
onDownload: Function;
|
|
270
281
|
childrenColumnName: string;
|
|
271
282
|
clickRowSelect: boolean;
|
|
272
283
|
tableSetting: {};
|
|
284
|
+
clickToRowSelect: boolean;
|
|
273
285
|
striped: boolean;
|
|
274
286
|
canColDrag: boolean;
|
|
275
287
|
resizable: boolean;
|
|
@@ -279,7 +291,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
279
291
|
templates: {};
|
|
280
292
|
ellipsis: boolean;
|
|
281
293
|
onTableChange: Function;
|
|
282
|
-
onDownload: Function;
|
|
283
294
|
showIndexColumn: boolean;
|
|
284
295
|
indexColumnProps: import("./types/table.type").BasicColumn[];
|
|
285
296
|
isTreeTable: boolean;
|
|
@@ -352,15 +363,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
352
363
|
}>>, filters: Partial<Recordable<string[]>>, sorter: import("./types/table.type").SorterResult) => any;
|
|
353
364
|
getSelectRows: () => Recordable<any>[];
|
|
354
365
|
handleResizeColumn: (w: any, col: any) => void;
|
|
355
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "columns-change" | "selection-change")[], "register" | "columns-change" | "selection-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
366
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "columns-change" | "selection-change" | "row-click" | "row-dbClick" | "row-contextmenu" | "row-mouseenter" | "row-mouseleave" | "expanded-rows-change" | "edit-change")[], "register" | "columns-change" | "selection-change" | "row-click" | "row-dbClick" | "row-contextmenu" | "row-mouseenter" | "row-mouseleave" | "expanded-rows-change" | "edit-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
356
367
|
clickRowSelect: {
|
|
357
368
|
type: BooleanConstructor;
|
|
358
369
|
default: boolean;
|
|
359
370
|
};
|
|
360
371
|
tableSetting: {
|
|
361
|
-
type: import("vue").PropType<import("./types/table.type").TableSetting>;
|
|
372
|
+
type: import("vue").PropType<boolean | import("./types/table.type").TableSetting>;
|
|
362
373
|
default: () => {};
|
|
363
374
|
};
|
|
375
|
+
clickToRowSelect: {
|
|
376
|
+
type: BooleanConstructor;
|
|
377
|
+
default: boolean;
|
|
378
|
+
};
|
|
364
379
|
striped: {
|
|
365
380
|
type: BooleanConstructor;
|
|
366
381
|
default: boolean;
|
|
@@ -548,10 +563,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
548
563
|
onRegister?: (...args: any[]) => any;
|
|
549
564
|
"onColumns-change"?: (...args: any[]) => any;
|
|
550
565
|
"onSelection-change"?: (...args: any[]) => any;
|
|
566
|
+
"onRow-click"?: (...args: any[]) => any;
|
|
567
|
+
"onRow-dbClick"?: (...args: any[]) => any;
|
|
568
|
+
"onRow-contextmenu"?: (...args: any[]) => any;
|
|
569
|
+
"onRow-mouseenter"?: (...args: any[]) => any;
|
|
570
|
+
"onRow-mouseleave"?: (...args: any[]) => any;
|
|
571
|
+
"onExpanded-rows-change"?: (...args: any[]) => any;
|
|
572
|
+
"onEdit-change"?: (...args: any[]) => any;
|
|
551
573
|
}, {
|
|
552
574
|
size: SizeType;
|
|
553
575
|
loading: boolean;
|
|
554
576
|
bordered: boolean;
|
|
577
|
+
onDownload: Function;
|
|
555
578
|
columns: import("./types/table.type").BasicColumn[];
|
|
556
579
|
scroll: {};
|
|
557
580
|
rowKey: string;
|
|
@@ -562,6 +585,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
562
585
|
rowSelection: any;
|
|
563
586
|
clickRowSelect: boolean;
|
|
564
587
|
tableSetting: {};
|
|
588
|
+
clickToRowSelect: boolean;
|
|
565
589
|
striped: boolean;
|
|
566
590
|
canColDrag: boolean;
|
|
567
591
|
resizable: boolean;
|
|
@@ -572,7 +596,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
572
596
|
templates: {};
|
|
573
597
|
ellipsis: boolean;
|
|
574
598
|
onTableChange: Function;
|
|
575
|
-
onDownload: Function;
|
|
576
599
|
showIndexColumn: boolean;
|
|
577
600
|
indexColumnProps: import("./types/table.type").BasicColumn[];
|
|
578
601
|
isTreeTable: boolean;
|
|
@@ -10,9 +10,13 @@ export declare const TableProps: {
|
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
tableSetting: {
|
|
13
|
-
type: PropType<TableSetting>;
|
|
13
|
+
type: PropType<boolean | TableSetting>;
|
|
14
14
|
default: () => {};
|
|
15
15
|
};
|
|
16
|
+
clickToRowSelect: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
16
20
|
striped: {
|
|
17
21
|
type: BooleanConstructor;
|
|
18
22
|
default: boolean;
|
|
@@ -64,6 +64,12 @@ export declare type ActionType = {
|
|
|
64
64
|
fixed?: 'left' | 'right' | 'auto';
|
|
65
65
|
btns?: BtnsType[];
|
|
66
66
|
};
|
|
67
|
+
export declare type ComponentType = 'Input' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker';
|
|
68
|
+
export declare type LableValOptions = {
|
|
69
|
+
label: string;
|
|
70
|
+
value: any;
|
|
71
|
+
[key: string]: string | number | boolean;
|
|
72
|
+
}[];
|
|
67
73
|
export interface BasicColumn extends ColumnProps {
|
|
68
74
|
children?: BasicColumn[];
|
|
69
75
|
defaultHidden?: boolean;
|
|
@@ -72,6 +78,15 @@ export interface BasicColumn extends ColumnProps {
|
|
|
72
78
|
render?: CellFormat;
|
|
73
79
|
edit?: boolean;
|
|
74
80
|
editRow?: boolean;
|
|
81
|
+
editable?: boolean;
|
|
82
|
+
editComponent?: ComponentType;
|
|
83
|
+
editComponentProps?: ((opt: {
|
|
84
|
+
text: string | number | boolean | Recordable;
|
|
85
|
+
record: Recordable;
|
|
86
|
+
column: BasicColumn;
|
|
87
|
+
index: number;
|
|
88
|
+
}) => Recordable) | Recordable;
|
|
89
|
+
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
|
|
75
90
|
showIndexColumn?: boolean;
|
|
76
91
|
expand?: boolean;
|
|
77
92
|
}
|
|
@@ -86,4 +101,5 @@ export declare type TableActionType = {
|
|
|
86
101
|
setCacheColumnsByField?: (dataIndex: string | undefined, value: BasicColumn) => void;
|
|
87
102
|
getSelectRows: () => void;
|
|
88
103
|
getSelectRowKeys: () => void;
|
|
104
|
+
emit?: any;
|
|
89
105
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TreeDataItem } from "ant-design-vue/lib/tree";
|
|
2
|
+
import { ComputedRef, Ref } from "vue";
|
|
3
|
+
import { FieldNames, InsertNodeParams, TreeItem, KeyType } from "../type/tree";
|
|
4
|
+
export declare function useTree(treeDataRef: Ref<TreeDataItem[]>, getFieldNames: ComputedRef<FieldNames>): {
|
|
5
|
+
getAllKeys: (list?: TreeDataItem[]) => KeyType[];
|
|
6
|
+
getEnabledKeys: (list?: TreeDataItem[]) => KeyType[];
|
|
7
|
+
getChildrenKeys: (nodeKey: string | number, list?: TreeDataItem[]) => KeyType[];
|
|
8
|
+
updateNodeByKey: (key: string, node: TreeDataItem, list?: TreeDataItem[]) => void;
|
|
9
|
+
filterByLevel: (level?: number, list?: TreeDataItem[], currentLevel?: number) => string[] | number[];
|
|
10
|
+
insertNodeByKey: ({ parentKey, node, push }: InsertNodeParams) => void;
|
|
11
|
+
insertNodesByKey: ({ parentKey, list, push }: InsertNodeParams) => void;
|
|
12
|
+
deleteNodeByKey: (key: string, list?: TreeDataItem[]) => void;
|
|
13
|
+
getSelectedNode: (key: KeyType, list?: TreeItem[], selectedNode?: TreeItem | null) => TreeItem;
|
|
14
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { CheckKeys, ContextMenuItem, FieldNames, TreeActionItem, TreeItem } from "./type/tree";
|
|
4
|
+
export declare const BasicProps: {
|
|
5
|
+
loading: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
checkStrictly: BooleanConstructor;
|
|
10
|
+
expandedKeys: {
|
|
11
|
+
type: PropType<KeyType[]>;
|
|
12
|
+
default: () => any[];
|
|
13
|
+
};
|
|
14
|
+
selectedKeys: {
|
|
15
|
+
type: PropType<KeyType[]>;
|
|
16
|
+
default: () => any[];
|
|
17
|
+
};
|
|
18
|
+
checkedKeys: {
|
|
19
|
+
type: PropType<CheckKeys>;
|
|
20
|
+
default: () => any[];
|
|
21
|
+
};
|
|
22
|
+
fieldNames: {
|
|
23
|
+
type: PropType<FieldNames>;
|
|
24
|
+
};
|
|
25
|
+
beforeRightClick: {
|
|
26
|
+
type: PropType<(...arg: any) => ContextMenuItem[]>;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
rightMenuList: {
|
|
30
|
+
type: PropType<ContextMenuItem[]>;
|
|
31
|
+
};
|
|
32
|
+
renderIcon: {
|
|
33
|
+
type: PropType<(params: Recordable) => string>;
|
|
34
|
+
};
|
|
35
|
+
highlight: {
|
|
36
|
+
type: PropType<String | Boolean>;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
actionList: {
|
|
40
|
+
type: PropType<TreeActionItem[]>;
|
|
41
|
+
default: () => any[];
|
|
42
|
+
};
|
|
43
|
+
clickRowToExpand: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
searchValue: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
filterFn: {
|
|
52
|
+
type: PropType<(searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean>;
|
|
53
|
+
default: any;
|
|
54
|
+
};
|
|
55
|
+
checkable: BooleanConstructor;
|
|
56
|
+
expandOnSearch: BooleanConstructor;
|
|
57
|
+
checkOnSearch: BooleanConstructor;
|
|
58
|
+
selectedOnSearch: BooleanConstructor;
|
|
59
|
+
treeData: {
|
|
60
|
+
type: PropType<import("ant-design-vue/lib/tree").DataNode[]>;
|
|
61
|
+
};
|
|
62
|
+
value: {
|
|
63
|
+
type: PropType<KeyType[] | CheckKeys>;
|
|
64
|
+
};
|
|
65
|
+
title: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
toolbar: BooleanConstructor;
|
|
70
|
+
search: BooleanConstructor;
|
|
71
|
+
};
|
|
72
|
+
export declare const searchProps: {
|
|
73
|
+
title: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
toolbar: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
checkable: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
search: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
searchText: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
checkAll: {
|
|
94
|
+
type: FunctionConstructor;
|
|
95
|
+
default: any;
|
|
96
|
+
};
|
|
97
|
+
expandAll: {
|
|
98
|
+
type: FunctionConstructor;
|
|
99
|
+
default: any;
|
|
100
|
+
};
|
|
101
|
+
};
|