tutor-pro-ui-vue 1.3.72 → 1.3.76
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/dist/index.css +1 -1
- package/dist/index.css.gz +0 -0
- package/dist/index.js +11264 -9107
- package/dist/index.js.gz +0 -0
- package/dist/index.umd.cjs +28 -23
- package/dist/src/components/CommonForm/types.d.ts +6 -0
- package/dist/src/components/CommonTable/src/hooks.d.ts +5 -4
- package/dist/src/components/CommonTable/src/index.vue.d.ts +20 -0
- package/dist/src/components/CommonTable/src/setting/content/index.vue.d.ts +27 -0
- package/dist/src/components/CommonTable/src/setting/header-btn/index.vue.d.ts +23 -0
- package/dist/src/components/CommonTable/src/setting/hooks.d.ts +38 -0
- package/dist/src/components/CommonTable/src/setting/index.d.ts +3 -0
- package/dist/src/components/CommonTable/src/setting/types.d.ts +15 -0
- package/dist/src/components/CommonTable/src/types.d.ts +6 -0
- package/package.json +3 -1
|
@@ -38,6 +38,7 @@ export type FieldConfig = Partial<Omit<InputProps & SelectV2Context['props'] & I
|
|
|
38
38
|
type: DatePickerProps['type'] | InputProps['type'];
|
|
39
39
|
props?: CascaderProps;
|
|
40
40
|
filterMethod?: (value: string, setOptions: (options?: any[]) => void) => boolean;
|
|
41
|
+
onCheck: (checked: boolean, checkedNodes: any[]) => void;
|
|
41
42
|
}>;
|
|
42
43
|
export interface FormItemSlots {
|
|
43
44
|
name: string;
|
|
@@ -52,6 +53,11 @@ export type FormDataItem = {
|
|
|
52
53
|
key: string;
|
|
53
54
|
value: any;
|
|
54
55
|
isHidden?: () => boolean;
|
|
56
|
+
show: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* 该项是否可以编辑(拖拽or隐藏)
|
|
59
|
+
*/
|
|
60
|
+
isSetting?: boolean;
|
|
55
61
|
fieldConfig?: FieldConfig;
|
|
56
62
|
formItemConfig?: Partial<Omit<FormItemProps, 'label'> & {
|
|
57
63
|
labelTooltip?: string | VNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
2
|
import { CommonTableProps } from './types';
|
|
3
3
|
import { TableInstance } from 'element-plus';
|
|
4
4
|
import { GroupBtn } from '../../CommonButtonGroup';
|
|
5
|
+
import { FormData } from '../../CommonForm';
|
|
5
6
|
/**
|
|
6
7
|
* 初始化表格
|
|
7
8
|
* @param props
|
|
@@ -585,7 +586,7 @@ export declare const useInitTable: (props: CommonTableProps, table?: Ref<TableIn
|
|
|
585
586
|
* 默认每个项改变的时候都可以搜索
|
|
586
587
|
*/
|
|
587
588
|
export declare const useAutoSearch: (props: CommonTableProps, request: (isRestCurrentPage?: boolean) => void) => {
|
|
588
|
-
formData:
|
|
589
|
+
formData: ComputedRef<FormData>;
|
|
589
590
|
commonForm: Ref<any, any>;
|
|
590
591
|
};
|
|
591
592
|
/**
|
|
@@ -599,8 +600,8 @@ export declare const useTableSelection: (props: CommonTableProps, tableData: Ref
|
|
|
599
600
|
* 右边的按钮
|
|
600
601
|
* @param props
|
|
601
602
|
*/
|
|
602
|
-
export declare const useRightBtns: (props: CommonTableProps, onSearch?: () => void, onReset?: () => void) => {
|
|
603
|
-
innerRightBtns:
|
|
603
|
+
export declare const useRightBtns: (props: CommonTableProps, onSearch?: () => void, onReset?: () => void, formData?: ComputedRef<FormData>) => {
|
|
604
|
+
innerRightBtns: ComputedRef<GroupBtn[]>;
|
|
604
605
|
isToggle: Ref<boolean, boolean>;
|
|
605
606
|
isShowToggleBtn: Ref<boolean, boolean>;
|
|
606
607
|
commonFormContainerRef: Ref<any, any>;
|
|
@@ -364,6 +364,12 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
364
364
|
readonly type: import('vue').PropType<import('../../types').CommonButtonProps & import('./types').ToggleBtn>;
|
|
365
365
|
readonly default: () => void;
|
|
366
366
|
};
|
|
367
|
+
readonly settingBtn: {
|
|
368
|
+
readonly type: import('vue').PropType<import('../../types').CommonButtonProps & {
|
|
369
|
+
saveKey?: string;
|
|
370
|
+
}>;
|
|
371
|
+
readonly default: () => void;
|
|
372
|
+
};
|
|
367
373
|
}>, {
|
|
368
374
|
reset: <T>(isRestCurrentPage?: boolean, isClearSort?: boolean) => Promise<void>;
|
|
369
375
|
getParams: () => {
|
|
@@ -472,6 +478,12 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
472
478
|
readonly type: import('vue').PropType<import('../../types').CommonButtonProps & import('./types').ToggleBtn>;
|
|
473
479
|
readonly default: () => void;
|
|
474
480
|
};
|
|
481
|
+
readonly settingBtn: {
|
|
482
|
+
readonly type: import('vue').PropType<import('../../types').CommonButtonProps & {
|
|
483
|
+
saveKey?: string;
|
|
484
|
+
}>;
|
|
485
|
+
readonly default: () => void;
|
|
486
|
+
};
|
|
475
487
|
}>> & Readonly<{
|
|
476
488
|
"onUpdate:formState"?: ((...args: any[]) => any) | undefined;
|
|
477
489
|
"onUpdate:selectData"?: ((...args: any[]) => any) | undefined;
|
|
@@ -519,6 +531,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
519
531
|
[x: number]: any;
|
|
520
532
|
[x: symbol]: any;
|
|
521
533
|
} & Omit<import('element-plus').ButtonProps, "icon">> & import('./types').ToggleBtn;
|
|
534
|
+
readonly settingBtn: Partial<{
|
|
535
|
+
[x: string]: any;
|
|
536
|
+
} & {
|
|
537
|
+
[x: number]: any;
|
|
538
|
+
[x: symbol]: any;
|
|
539
|
+
} & Omit<import('element-plus').ButtonProps, "icon">> & {
|
|
540
|
+
saveKey?: string;
|
|
541
|
+
};
|
|
522
542
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
523
543
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
524
544
|
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { FormData } from '../../../../types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
formData: {
|
|
5
|
+
type: PropType<FormData>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
saveKey: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
}>, {
|
|
13
|
+
handleOk: () => void;
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
formData: {
|
|
16
|
+
type: PropType<FormData>;
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
saveKey: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
}>> & Readonly<{}>, {
|
|
24
|
+
formData: FormData;
|
|
25
|
+
saveKey: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
close: {
|
|
3
|
+
type: FunctionConstructor;
|
|
4
|
+
default: () => void;
|
|
5
|
+
};
|
|
6
|
+
contentRef: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
default: () => void;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
11
|
+
close: {
|
|
12
|
+
type: FunctionConstructor;
|
|
13
|
+
default: () => void;
|
|
14
|
+
};
|
|
15
|
+
contentRef: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
default: () => void;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
close: Function;
|
|
21
|
+
contentRef: Record<string, any>;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { StorageTableFormData, StorageTableFormDataItem } from './types';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 存储formData的key
|
|
5
|
+
* {
|
|
6
|
+
* 路由:{
|
|
7
|
+
* default:[{
|
|
8
|
+
* key:'name',
|
|
9
|
+
* show:false,
|
|
10
|
+
* filterShow:false
|
|
11
|
+
* }]
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export declare const useStorageTableFormData: (saveKey?: string) => {
|
|
16
|
+
storageTableFormData: import('@vueuse/core').RemovableRef<StorageTableFormData>;
|
|
17
|
+
setCurrentFormData: (formData: StorageTableFormDataItem[]) => void;
|
|
18
|
+
getCurrentFormData: () => StorageTableFormDataItem[];
|
|
19
|
+
clearCurrentFormData: () => void;
|
|
20
|
+
getOriginalFormData: () => StorageTableFormDataItem[];
|
|
21
|
+
setOriginalFormData: (formData: StorageTableFormDataItem[]) => void;
|
|
22
|
+
getSortFormData: <T extends StorageTableFormDataItem>(propsFormData: T[], formData: T[]) => (T & {
|
|
23
|
+
isSetting: boolean;
|
|
24
|
+
key?: string | undefined;
|
|
25
|
+
show?: boolean | undefined;
|
|
26
|
+
filterShow?: boolean | undefined;
|
|
27
|
+
label?: string | undefined;
|
|
28
|
+
})[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 全选和半选的逻辑
|
|
32
|
+
*/
|
|
33
|
+
export declare const useSelectAll: (formData: Ref<StorageTableFormDataItem[]>) => {
|
|
34
|
+
checkAll: Ref<boolean, boolean>;
|
|
35
|
+
indeterminate: Ref<boolean, boolean>;
|
|
36
|
+
checkAllChange: (value: boolean) => void;
|
|
37
|
+
handleReverse: () => void;
|
|
38
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type StorageTableFormDataItem = {
|
|
2
|
+
key: string;
|
|
3
|
+
show: boolean;
|
|
4
|
+
filterShow: boolean;
|
|
5
|
+
label: string;
|
|
6
|
+
isSetting?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type StorageTableFormData = {
|
|
9
|
+
[key: string]: {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
original: StorageTableFormDataItem[];
|
|
12
|
+
current: StorageTableFormDataItem[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -114,6 +114,12 @@ export declare const tableProps: {
|
|
|
114
114
|
readonly type: PropType<CommonButtonProps & ToggleBtn>;
|
|
115
115
|
readonly default: () => void;
|
|
116
116
|
};
|
|
117
|
+
readonly settingBtn: {
|
|
118
|
+
readonly type: PropType<CommonButtonProps & {
|
|
119
|
+
saveKey?: string;
|
|
120
|
+
}>;
|
|
121
|
+
readonly default: () => void;
|
|
122
|
+
};
|
|
117
123
|
};
|
|
118
124
|
export type CommonTableProps = ExtractPropTypes<typeof tableProps>;
|
|
119
125
|
export type CommonTableInstance = InstanceType<typeof CommonTable>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tutor-pro-ui-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.76",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@element-plus/icons-vue": "^2.3.1",
|
|
27
|
+
"@rollup/rollup-win32-x64-msvc": "^4.53.2",
|
|
27
28
|
"@types/node": "^22.10.1",
|
|
28
29
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
29
30
|
"@vueuse/core": "^12.2.0",
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"vite-plugin-compression": "^0.5.1",
|
|
40
41
|
"vite-plugin-vue-setup-extend": "^0.4.0",
|
|
41
42
|
"vue": "^3.5.13",
|
|
43
|
+
"vue-draggable-plus": "^0.6.0",
|
|
42
44
|
"vue-router": "^4.5.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|