@dazhicheng/ui 1.5.33 → 1.5.35
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/components/tt-area/TtArea.vue.d.ts +2 -0
- package/dist/components/tt-area/index.d.ts +1 -0
- package/dist/components/tt-button/components/AddButton.vue.d.ts +2 -0
- package/dist/components/tt-button/index.d.ts +1740 -0
- package/dist/components/tt-button/index.vue.d.ts +1004 -0
- package/dist/components/tt-checkbox/index.d.ts +36 -0
- package/dist/components/tt-checkbox/index.vue.d.ts +28 -0
- package/dist/components/tt-checkbox/type.d.ts +9 -0
- package/dist/components/tt-drawer/index.d.ts +3703 -0
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +2121 -0
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.d.ts +94 -0
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.d.ts +27 -0
- package/dist/components/tt-drawer/src/hooks/useDrawerRender.d.ts +10 -0
- package/dist/components/tt-drawer/src/hooks/useResizable.d.ts +9 -0
- package/dist/components/tt-drawer/src/index.d.ts +10 -0
- package/dist/components/tt-drawer/src/props.d.ts +99 -0
- package/dist/components/tt-drawer/src/typing.d.ts +154 -0
- package/dist/components/tt-drawer/src/utils/drawer-api.d.ts +87 -0
- package/dist/components/tt-empty/index.d.ts +18 -0
- package/dist/components/tt-form/index.d.ts +15 -0
- package/dist/components/tt-form/src/components/ExpandableArrow.vue.d.ts +33 -0
- package/dist/components/tt-form/src/components/FormActions.vue.d.ts +34 -0
- package/dist/components/tt-form/src/components/Slot.d.ts +7 -0
- package/dist/components/tt-form/src/config.d.ts +6 -0
- package/dist/components/tt-form/src/form/FormControl.vue.d.ts +19 -0
- package/dist/components/tt-form/src/form/FormDescription.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/FormItem.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/FormLabel.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/FormMessage.vue.d.ts +2 -0
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.d.ts +8 -0
- package/dist/components/tt-form/src/form/FormWarnMessage.vue.d.ts +25 -0
- package/dist/components/tt-form/src/form/RenderContent.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/index.d.ts +10 -0
- package/dist/components/tt-form/src/form/injectionKeys.d.ts +2 -0
- package/dist/components/tt-form/src/form/useFormField.d.ts +11 -0
- package/dist/components/tt-form/src/form-render/FormField.vue.d.ts +28 -0
- package/dist/components/tt-form/src/form-render/FormLabel.vue.d.ts +27 -0
- package/dist/components/tt-form/src/form-render/context.d.ts +7 -0
- package/dist/components/tt-form/src/form-render/dependencies.d.ts +361 -0
- package/dist/components/tt-form/src/form-render/expandable.d.ts +9 -0
- package/dist/components/tt-form/src/form-render/form.vue.d.ts +41 -0
- package/dist/components/tt-form/src/form-render/helper.d.ts +11 -0
- package/dist/components/tt-form/src/form-render/index.d.ts +3 -0
- package/dist/components/tt-form/src/formApi.d.ts +71 -0
- package/dist/components/tt-form/src/group-form/FieldRenderer.d.ts +81 -0
- package/dist/components/tt-form/src/group-form/GroupForm.vue.d.ts +49 -0
- package/dist/components/tt-form/src/group-form/GroupSection.vue.d.ts +25 -0
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.d.ts +13 -0
- package/dist/components/tt-form/src/group-form/index.d.ts +3 -0
- package/dist/components/tt-form/src/group-form/lazyContext.d.ts +37 -0
- package/dist/components/tt-form/src/group-form/types.d.ts +147 -0
- package/dist/components/tt-form/src/group-form/useGroupForm.d.ts +5 -0
- package/dist/components/tt-form/src/group-form/utils.d.ts +93 -0
- package/dist/components/tt-form/src/hooks/useEmitAsProps.d.ts +7 -0
- package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts +14 -0
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.d.ts +14 -0
- package/dist/components/tt-form/src/hooks/useForwardProps.d.ts +7 -0
- package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts +8 -0
- package/dist/components/tt-form/src/index.vue.d.ts +27 -0
- package/dist/components/tt-form/src/shared/createContext.d.ts +8 -0
- package/dist/components/tt-form/src/shared/global-state.d.ts +17 -0
- package/dist/components/tt-form/src/shared/store.d.ts +1 -0
- package/dist/components/tt-form/src/shared/zod-defaults.d.ts +54 -0
- package/dist/components/tt-form/src/types/common.d.ts +11 -0
- package/dist/components/tt-form/src/types/forms.d.ts +280 -0
- package/dist/components/tt-form/src/types/index.d.ts +3 -0
- package/dist/components/tt-form/src/types/paths.d.ts +142 -0
- package/dist/components/tt-form/src/types/shared.d.ts +19 -0
- package/dist/components/tt-form/src/types.d.ts +452 -0
- package/dist/components/tt-form/src/useForm.d.ts +2 -0
- package/dist/components/tt-form/src/useFormContext.d.ts +12 -0
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +1549 -0
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +784 -0
- package/dist/components/tt-icon/components/AddIcon.vue.d.ts +7 -0
- package/dist/components/tt-icon/components/SubIcon.vue.d.ts +7 -0
- package/dist/components/tt-icon/index.d.ts +124 -0
- package/dist/components/tt-icon/index.vue.d.ts +32 -0
- package/dist/components/tt-image/index.d.ts +127 -0
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +89 -0
- package/dist/components/tt-image/tt-image.d.ts +126 -0
- package/dist/components/tt-loading/index.d.ts +16 -0
- package/dist/components/tt-loading/src/directive.d.ts +9 -0
- package/dist/components/tt-loading/src/loading.vue.d.ts +12 -0
- package/dist/components/tt-loading/src/service.d.ts +25 -0
- package/dist/components/tt-loading/src/type.d.ts +20 -0
- package/dist/components/tt-modal/index.d.ts +1809 -0
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +1008 -0
- package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts +210 -0
- package/dist/components/tt-modal/src/components/ModalHeader.vue.d.ts +31 -0
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +224 -0
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +110 -0
- package/dist/components/tt-modal/src/index.d.ts +5 -0
- package/dist/components/tt-modal/src/props.d.ts +161 -0
- package/dist/components/tt-modal/src/typing.d.ts +188 -0
- package/dist/components/tt-modal/src/utils/modal-api.d.ts +97 -0
- package/dist/components/tt-modal-form/hooks/useModalFormSlot.d.ts +6 -0
- package/dist/components/tt-modal-form/index.d.ts +2 -0
- package/dist/components/tt-modal-form/index.vue.d.ts +43 -0
- package/dist/components/tt-modal-form/props.d.ts +38 -0
- package/dist/components/tt-modal-form/useModalForm.d.ts +6 -0
- package/dist/components/tt-nav-anchor/index.d.ts +19 -0
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.d.ts +19 -0
- package/dist/components/tt-nav-anchor/src/types.d.ts +29 -0
- package/dist/components/tt-select/index.d.ts +7 -0
- package/dist/components/tt-select/src/Select.vue.d.ts +861 -0
- package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +111 -0
- package/dist/components/tt-select/src/components/Table.vue.d.ts +250 -0
- package/dist/components/tt-select/src/const.d.ts +16 -0
- package/dist/components/tt-select/src/hooks/useDataSource.d.ts +115 -0
- package/dist/components/tt-select/src/hooks/useGrid.d.ts +32 -0
- package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +59 -0
- package/dist/components/tt-select/src/hooks/usePagination.d.ts +16 -0
- package/dist/components/tt-select/src/hooks/useSelect.d.ts +87 -0
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +178 -0
- package/dist/components/tt-select/src/props.d.ts +190 -0
- package/dist/components/tt-select/src/types/index.d.ts +142 -0
- package/dist/components/tt-select/src/utils/index.d.ts +9 -0
- package/dist/components/tt-table/index.d.ts +127 -0
- package/dist/components/tt-table/src/Table.vue.d.ts +1685 -0
- package/dist/components/tt-table/src/componentMap.d.ts +8 -0
- package/dist/components/tt-table/src/components/RowContext.d.ts +24 -0
- package/dist/components/tt-table/src/components/TableAction.vue.d.ts +79 -0
- package/dist/components/tt-table/src/components/TableButtons.d.ts +30 -0
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +26 -0
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +1531 -0
- package/dist/components/tt-table/src/emits.d.ts +1 -0
- package/dist/components/tt-table/src/enum.d.ts +2 -0
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +27 -0
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +20 -0
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts +29 -0
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts +1082 -0
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +102 -0
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +30 -0
- package/dist/components/tt-table/src/hooks/useTable.d.ts +7 -0
- package/dist/components/tt-table/src/hooks/useTableContext.d.ts +43 -0
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +101 -0
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +10 -0
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +93 -0
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +11 -0
- package/dist/components/tt-table/src/props.d.ts +433 -0
- package/dist/components/tt-table/src/toolProps.d.ts +19 -0
- package/dist/components/tt-table/src/types/table.d.ts +489 -0
- package/dist/components/tt-table/src/types/tableAction.d.ts +26 -0
- package/dist/components/tt-table/src/types/tableForm.d.ts +64 -0
- package/dist/components/tt-table/src/types/tableTools.d.ts +10 -0
- package/dist/components/tt-table/src/utils/context.d.ts +18 -0
- package/dist/components/tt-table/src/utils/filters.d.ts +109 -0
- package/dist/components/tt-table/src/utils/table-api.d.ts +250 -0
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +88 -0
- package/dist/components/tt-table/src/utils/vxeTable.d.ts +28 -0
- package/dist/components/tt-text/index.d.ts +76 -0
- package/dist/components/tt-text/index.vue.d.ts +50 -0
- package/dist/components/tt-tree-select/index.d.ts +5 -0
- package/dist/components/tt-tree-select/src/TtTreeSelect.vue.d.ts +6 -0
- package/dist/components/tt-tree-select/src/cache-options.d.ts +35 -0
- package/dist/components/tt-tree-select/src/select.d.ts +10 -0
- package/dist/components/tt-tree-select/src/tree.d.ts +23 -0
- package/dist/components/tt-tree-select/src/utils.d.ts +10 -0
- package/dist/components/tt-upload/index.d.ts +428 -0
- package/dist/components/tt-upload/src/TtUpload.d.ts +449 -0
- package/dist/components/tt-upload/src/typing.d.ts +251 -0
- package/dist/components/types.d.ts +230 -0
- package/dist/directives/auto-tip/index.d.ts +3 -0
- package/dist/directives/dialog-resize/index.d.ts +25 -0
- package/dist/directives/dialog-resize/use-css-variable.d.ts +1 -0
- package/dist/directives/dialog-resize/use-draggable.d.ts +4 -0
- package/dist/directives/dialog-resize/use-fullscreen.d.ts +1 -0
- package/dist/directives/dialog-resize/use-parse-translate.d.ts +4 -0
- package/dist/directives/dialog-resize/use-resizer.d.ts +2 -0
- package/dist/directives/disabled-tip/index.d.ts +17 -0
- package/dist/directives/index.d.ts +3 -0
- package/dist/hooks/useFormat.d.ts +73 -0
- package/dist/hooks/useLoading.d.ts +9 -0
- package/dist/hooks/useSetup.d.ts +8 -0
- package/dist/hooks/useTable.d.ts +5 -0
- package/dist/hooks/useTemplateSlot.d.ts +9 -0
- package/dist/{index-CMjNBMj5.js → index-NG5FNCLD.js} +2 -3
- package/dist/index.d.ts +47 -0
- package/dist/index.js +10239 -9224
- package/dist/{index.modern-BfZxYaPy.js → index.modern-DfItAsVf.js} +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/vxeTable/switchStatus.d.ts +7 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +29 -30
- package/dist/style.css +1 -1
- package/package.json +3 -10
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { VxeGridProps } from 'vxe-table';
|
|
2
|
+
/** 获取实例 */
|
|
3
|
+
declare function getGridInstance(): import('vxe-table').VxeGridInstance | undefined;
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: any;
|
|
7
|
+
refs: {
|
|
8
|
+
gridRef: any;
|
|
9
|
+
};
|
|
10
|
+
rootEl: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
14
|
+
configProps: {
|
|
15
|
+
type: import('vue').PropType<import('../props').TtSelectProps["configProps"]>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
grid: {
|
|
19
|
+
type: import('vue').PropType<import('../props').TtSelectProps["gridProps"]>;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
list: {
|
|
23
|
+
type: import('vue').PropType<Record<string, any>[]>;
|
|
24
|
+
default: () => never[];
|
|
25
|
+
};
|
|
26
|
+
loading: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
showPager: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
pagination: {
|
|
35
|
+
type: import('vue').PropType<VxeGridProps["pagerConfig"]>;
|
|
36
|
+
default: () => {};
|
|
37
|
+
};
|
|
38
|
+
multiple: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
disableFn: {
|
|
43
|
+
type: import('vue').PropType<import('../types').TtSelectConfigProps["disableFn"]>;
|
|
44
|
+
default: null;
|
|
45
|
+
};
|
|
46
|
+
selectValue: {
|
|
47
|
+
type: import('vue').PropType<import('../types').TtSelectModelValueType>;
|
|
48
|
+
default: () => never[];
|
|
49
|
+
};
|
|
50
|
+
selectWidth: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
deleteField: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
setPagination: {
|
|
59
|
+
type: import('vue').PropType<(pagination: VxeGridProps["pagerConfig"]) => void>;
|
|
60
|
+
default: null;
|
|
61
|
+
};
|
|
62
|
+
getPagination: {
|
|
63
|
+
type: import('vue').PropType<() => VxeGridProps["pagerConfig"]>;
|
|
64
|
+
default: null;
|
|
65
|
+
};
|
|
66
|
+
reload: {
|
|
67
|
+
type: import('vue').PropType<(bool?: boolean) => Promise<void>>;
|
|
68
|
+
default: null;
|
|
69
|
+
};
|
|
70
|
+
hasNextPage: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
showCheckbox: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
multipleLimit: {
|
|
79
|
+
type: NumberConstructor;
|
|
80
|
+
default: number;
|
|
81
|
+
};
|
|
82
|
+
}>, {
|
|
83
|
+
getGridInstance: typeof getGridInstance;
|
|
84
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, any, string, import('vue').PublicProps, any, {
|
|
85
|
+
grid: import('../props').TtSelectGridProps;
|
|
86
|
+
list: Record<string, any>[];
|
|
87
|
+
loading: boolean;
|
|
88
|
+
multiple: boolean;
|
|
89
|
+
multipleLimit: number;
|
|
90
|
+
configProps: import('../types').TtSelectConfigProps;
|
|
91
|
+
disableFn: ((value: any, modelValue?: import('../types').TtSelectModelValueType, option?: import('../types').TtSelectDataOptions) => boolean) | undefined;
|
|
92
|
+
showPager: boolean;
|
|
93
|
+
pagination: import("vxe-table").VxeGridPropTypes.PagerConfig | undefined;
|
|
94
|
+
selectValue: import('../types').TtSelectModelValueType;
|
|
95
|
+
selectWidth: number;
|
|
96
|
+
deleteField: string;
|
|
97
|
+
setPagination: (pagination: VxeGridProps["pagerConfig"]) => void;
|
|
98
|
+
getPagination: () => VxeGridProps["pagerConfig"];
|
|
99
|
+
reload: (bool?: boolean) => Promise<void>;
|
|
100
|
+
hasNextPage: boolean;
|
|
101
|
+
showCheckbox: boolean;
|
|
102
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
103
|
+
gridRef: any;
|
|
104
|
+
}, HTMLDivElement>;
|
|
105
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
106
|
+
export default _default;
|
|
107
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
108
|
+
new (): {
|
|
109
|
+
$slots: S;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { VxeListProps } from 'vxe-pc-ui';
|
|
3
|
+
/** 设置当前选中行-多选 */
|
|
4
|
+
declare function setCheckboxRow(rows: any | any[], checked: boolean): void;
|
|
5
|
+
/** 清除当前选中行-多选 */
|
|
6
|
+
declare function clearCheckboxRow(): void;
|
|
7
|
+
/** 设置当前选中行-单选 */
|
|
8
|
+
declare function setRadioRow(row: any): void;
|
|
9
|
+
/** 清除当前选中行-单选 */
|
|
10
|
+
declare function clearRadioRow(): void;
|
|
11
|
+
/** 滚动到指定位置 */
|
|
12
|
+
declare function scrollTo(scrollLeft: number | null, scrollTop?: number | null): void;
|
|
13
|
+
/** 获取当前行数据 */
|
|
14
|
+
declare function getCurrentRecord(): Record<string, any> | undefined;
|
|
15
|
+
/** 获取行索引 */
|
|
16
|
+
declare function getRowIndex(row?: any): number;
|
|
17
|
+
/** 滚动到指定行 */
|
|
18
|
+
declare function scrollToRow(row: any): void;
|
|
19
|
+
/** 设置当前行状态 */
|
|
20
|
+
declare function setCurrentRow(row: any): void;
|
|
21
|
+
/** 清除当前选中行状态 */
|
|
22
|
+
declare function clearCurrentRow(): void;
|
|
23
|
+
/** 获取数据 */
|
|
24
|
+
declare function getData(rowIndex?: number): Record<string, any> | Record<string, any>[] | undefined;
|
|
25
|
+
declare function __VLS_template(): {
|
|
26
|
+
attrs: Partial<{}>;
|
|
27
|
+
slots: Readonly<{
|
|
28
|
+
[slotName: string]: () => VNode;
|
|
29
|
+
empty: () => VNode;
|
|
30
|
+
}> & {
|
|
31
|
+
[slotName: string]: () => VNode;
|
|
32
|
+
empty: () => VNode;
|
|
33
|
+
};
|
|
34
|
+
refs: {
|
|
35
|
+
vxelist: (import('vxe-pc-ui').VxeListMethods & {
|
|
36
|
+
$props: VxeListProps<any> & import('vxe-pc-ui').VxeListEventProps;
|
|
37
|
+
$slots: import('vxe-pc-ui').VxeListSlots;
|
|
38
|
+
}) | null;
|
|
39
|
+
table: HTMLTableElement;
|
|
40
|
+
resizableBar: HTMLDivElement;
|
|
41
|
+
};
|
|
42
|
+
rootEl: any;
|
|
43
|
+
};
|
|
44
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
45
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
46
|
+
configProps: {
|
|
47
|
+
type: import('vue').PropType<import('../props').TtSelectProps["configProps"]>;
|
|
48
|
+
default: () => {};
|
|
49
|
+
};
|
|
50
|
+
grid: {
|
|
51
|
+
type: import('vue').PropType<import('../props').TtSelectProps["gridProps"]>;
|
|
52
|
+
default: () => {};
|
|
53
|
+
};
|
|
54
|
+
list: {
|
|
55
|
+
type: import('vue').PropType<Record<string, any>[]>;
|
|
56
|
+
default: () => never[];
|
|
57
|
+
};
|
|
58
|
+
loading: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
showPager: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
pagination: {
|
|
67
|
+
type: import('vue').PropType<import('vxe-table').VxeGridProps["pagerConfig"]>;
|
|
68
|
+
default: () => {};
|
|
69
|
+
};
|
|
70
|
+
multiple: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
disableFn: {
|
|
75
|
+
type: import('vue').PropType<import('../types').TtSelectConfigProps["disableFn"]>;
|
|
76
|
+
default: null;
|
|
77
|
+
};
|
|
78
|
+
selectValue: {
|
|
79
|
+
type: import('vue').PropType<import('../types').TtSelectModelValueType>;
|
|
80
|
+
default: () => never[];
|
|
81
|
+
};
|
|
82
|
+
selectWidth: {
|
|
83
|
+
type: NumberConstructor;
|
|
84
|
+
default: number;
|
|
85
|
+
};
|
|
86
|
+
deleteField: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
setPagination: {
|
|
91
|
+
type: import('vue').PropType<(pagination: import('vxe-table').VxeGridProps["pagerConfig"]) => void>;
|
|
92
|
+
default: null;
|
|
93
|
+
};
|
|
94
|
+
getPagination: {
|
|
95
|
+
type: import('vue').PropType<() => import('vxe-table').VxeGridProps["pagerConfig"]>;
|
|
96
|
+
default: null;
|
|
97
|
+
};
|
|
98
|
+
reload: {
|
|
99
|
+
type: import('vue').PropType<(bool?: boolean) => Promise<void>>;
|
|
100
|
+
default: null;
|
|
101
|
+
};
|
|
102
|
+
hasNextPage: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
showCheckbox: {
|
|
107
|
+
type: BooleanConstructor;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
multipleLimit: {
|
|
111
|
+
type: NumberConstructor;
|
|
112
|
+
default: number;
|
|
113
|
+
};
|
|
114
|
+
}>, {
|
|
115
|
+
clearCurrentRow: typeof clearCurrentRow;
|
|
116
|
+
setCheckboxRow: typeof setCheckboxRow;
|
|
117
|
+
clearCheckboxRow: typeof clearCheckboxRow;
|
|
118
|
+
setRadioRow: typeof setRadioRow;
|
|
119
|
+
clearRadioRow: typeof clearRadioRow;
|
|
120
|
+
scrollTo: typeof scrollTo;
|
|
121
|
+
getCurrentRecord: typeof getCurrentRecord;
|
|
122
|
+
getRowIndex: typeof getRowIndex;
|
|
123
|
+
scrollToRow: typeof scrollToRow;
|
|
124
|
+
setCurrentRow: typeof setCurrentRow;
|
|
125
|
+
getData: typeof getData;
|
|
126
|
+
getGridInstance: () => {
|
|
127
|
+
clearCurrentRow: typeof clearCurrentRow;
|
|
128
|
+
setCheckboxRow: typeof setCheckboxRow;
|
|
129
|
+
clearCheckboxRow: typeof clearCheckboxRow;
|
|
130
|
+
setRadioRow: typeof setRadioRow;
|
|
131
|
+
clearRadioRow: typeof clearRadioRow;
|
|
132
|
+
scrollTo: typeof scrollTo;
|
|
133
|
+
getCurrentRecord: typeof getCurrentRecord;
|
|
134
|
+
getRowIndex: typeof getRowIndex;
|
|
135
|
+
scrollToRow: typeof scrollToRow;
|
|
136
|
+
setCurrentRow: typeof setCurrentRow;
|
|
137
|
+
getData: typeof getData;
|
|
138
|
+
};
|
|
139
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
140
|
+
scroll: (...args: any[]) => void;
|
|
141
|
+
"radio-change": (...args: any[]) => void;
|
|
142
|
+
"checkbox-change": (...args: any[]) => void;
|
|
143
|
+
"checkbox-all": (...args: any[]) => void;
|
|
144
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
145
|
+
configProps: {
|
|
146
|
+
type: import('vue').PropType<import('../props').TtSelectProps["configProps"]>;
|
|
147
|
+
default: () => {};
|
|
148
|
+
};
|
|
149
|
+
grid: {
|
|
150
|
+
type: import('vue').PropType<import('../props').TtSelectProps["gridProps"]>;
|
|
151
|
+
default: () => {};
|
|
152
|
+
};
|
|
153
|
+
list: {
|
|
154
|
+
type: import('vue').PropType<Record<string, any>[]>;
|
|
155
|
+
default: () => never[];
|
|
156
|
+
};
|
|
157
|
+
loading: {
|
|
158
|
+
type: BooleanConstructor;
|
|
159
|
+
default: boolean;
|
|
160
|
+
};
|
|
161
|
+
showPager: {
|
|
162
|
+
type: BooleanConstructor;
|
|
163
|
+
default: boolean;
|
|
164
|
+
};
|
|
165
|
+
pagination: {
|
|
166
|
+
type: import('vue').PropType<import('vxe-table').VxeGridProps["pagerConfig"]>;
|
|
167
|
+
default: () => {};
|
|
168
|
+
};
|
|
169
|
+
multiple: {
|
|
170
|
+
type: BooleanConstructor;
|
|
171
|
+
default: boolean;
|
|
172
|
+
};
|
|
173
|
+
disableFn: {
|
|
174
|
+
type: import('vue').PropType<import('../types').TtSelectConfigProps["disableFn"]>;
|
|
175
|
+
default: null;
|
|
176
|
+
};
|
|
177
|
+
selectValue: {
|
|
178
|
+
type: import('vue').PropType<import('../types').TtSelectModelValueType>;
|
|
179
|
+
default: () => never[];
|
|
180
|
+
};
|
|
181
|
+
selectWidth: {
|
|
182
|
+
type: NumberConstructor;
|
|
183
|
+
default: number;
|
|
184
|
+
};
|
|
185
|
+
deleteField: {
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
default: string;
|
|
188
|
+
};
|
|
189
|
+
setPagination: {
|
|
190
|
+
type: import('vue').PropType<(pagination: import('vxe-table').VxeGridProps["pagerConfig"]) => void>;
|
|
191
|
+
default: null;
|
|
192
|
+
};
|
|
193
|
+
getPagination: {
|
|
194
|
+
type: import('vue').PropType<() => import('vxe-table').VxeGridProps["pagerConfig"]>;
|
|
195
|
+
default: null;
|
|
196
|
+
};
|
|
197
|
+
reload: {
|
|
198
|
+
type: import('vue').PropType<(bool?: boolean) => Promise<void>>;
|
|
199
|
+
default: null;
|
|
200
|
+
};
|
|
201
|
+
hasNextPage: {
|
|
202
|
+
type: BooleanConstructor;
|
|
203
|
+
default: boolean;
|
|
204
|
+
};
|
|
205
|
+
showCheckbox: {
|
|
206
|
+
type: BooleanConstructor;
|
|
207
|
+
default: boolean;
|
|
208
|
+
};
|
|
209
|
+
multipleLimit: {
|
|
210
|
+
type: NumberConstructor;
|
|
211
|
+
default: number;
|
|
212
|
+
};
|
|
213
|
+
}>> & Readonly<{
|
|
214
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
215
|
+
"onRadio-change"?: ((...args: any[]) => any) | undefined;
|
|
216
|
+
"onCheckbox-change"?: ((...args: any[]) => any) | undefined;
|
|
217
|
+
"onCheckbox-all"?: ((...args: any[]) => any) | undefined;
|
|
218
|
+
}>, {
|
|
219
|
+
grid: import('../props').TtSelectGridProps;
|
|
220
|
+
list: Record<string, any>[];
|
|
221
|
+
loading: boolean;
|
|
222
|
+
multiple: boolean;
|
|
223
|
+
multipleLimit: number;
|
|
224
|
+
configProps: import('../types').TtSelectConfigProps;
|
|
225
|
+
disableFn: ((value: any, modelValue?: import('../types').TtSelectModelValueType, option?: import('../types').TtSelectDataOptions) => boolean) | undefined;
|
|
226
|
+
showPager: boolean;
|
|
227
|
+
pagination: import("vxe-table").VxeGridPropTypes.PagerConfig | undefined;
|
|
228
|
+
selectValue: import('../types').TtSelectModelValueType;
|
|
229
|
+
selectWidth: number;
|
|
230
|
+
deleteField: string;
|
|
231
|
+
setPagination: (pagination: import('vxe-table').VxeGridProps["pagerConfig"]) => void;
|
|
232
|
+
getPagination: () => import('vxe-table').VxeGridProps["pagerConfig"];
|
|
233
|
+
reload: (bool?: boolean) => Promise<void>;
|
|
234
|
+
hasNextPage: boolean;
|
|
235
|
+
showCheckbox: boolean;
|
|
236
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
237
|
+
vxelist: (import('vxe-pc-ui').VxeListMethods & {
|
|
238
|
+
$props: VxeListProps<any> & import('vxe-pc-ui').VxeListEventProps;
|
|
239
|
+
$slots: import('vxe-pc-ui').VxeListSlots;
|
|
240
|
+
}) | null;
|
|
241
|
+
table: HTMLTableElement;
|
|
242
|
+
resizableBar: HTMLDivElement;
|
|
243
|
+
}, any>;
|
|
244
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
245
|
+
export default _default;
|
|
246
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
247
|
+
new (): {
|
|
248
|
+
$slots: S;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VxeGridPropTypes } from 'vxe-table';
|
|
2
|
+
export declare const GRID_MAX_HEIGHT = 360;
|
|
3
|
+
export declare const GRID_MIN_HEIGHT = 32;
|
|
4
|
+
export declare const GRID_ROW_HEIGHT = 40;
|
|
5
|
+
export declare const KEYBOARD_KEY: {
|
|
6
|
+
ENTER: string;
|
|
7
|
+
ESC: string;
|
|
8
|
+
BACKSPACE: string;
|
|
9
|
+
TAB: string;
|
|
10
|
+
SPACE: string;
|
|
11
|
+
ARROW_UP: string;
|
|
12
|
+
ARROW_DOWN: string;
|
|
13
|
+
ARROW_LEFT: string;
|
|
14
|
+
ARROW_RIGHT: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const defaultPagination: Partial<VxeGridPropTypes.PagerConfig>;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { VxeGridPropTypes } from 'vxe-table';
|
|
3
|
+
import { TtSelectKeyboardType, TtSelectModelValueType, TtSelectSelectOptions, TtSelectConfigProps, TtSelectDataOptions } from '../types';
|
|
4
|
+
type EmitType = {
|
|
5
|
+
/**
|
|
6
|
+
* 数据获取成功时触发
|
|
7
|
+
* @param options 数据选项数组
|
|
8
|
+
*/
|
|
9
|
+
(e: "fetch-success", options: TtSelectDataOptions[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* 数据获取失败时触发
|
|
12
|
+
* @param options 错误信息
|
|
13
|
+
*/
|
|
14
|
+
(e: "fetch-error", error: Record<string, any>): void;
|
|
15
|
+
};
|
|
16
|
+
type OptType = {
|
|
17
|
+
/**
|
|
18
|
+
* 设置加载状态
|
|
19
|
+
* @param loading 是否加载中
|
|
20
|
+
*/
|
|
21
|
+
setLoading: (loading: boolean) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 设置是否显示分页器
|
|
24
|
+
* @param bool 是否显示分页器
|
|
25
|
+
*/
|
|
26
|
+
setShowPager: (bool: boolean) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 设置分页配置
|
|
29
|
+
* @param config 分页配置
|
|
30
|
+
*/
|
|
31
|
+
setPagination: (config: Partial<VxeGridPropTypes.PagerConfig>) => void;
|
|
32
|
+
/** 获取分页信息 */
|
|
33
|
+
getPaginationInfo: ComputedRef<VxeGridPropTypes.PagerConfig | undefined>;
|
|
34
|
+
extra: ComputedRef<any | undefined>;
|
|
35
|
+
/** 获取分页配置 */
|
|
36
|
+
getPagination: () => VxeGridPropTypes.PagerConfig | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* 设置选择的值
|
|
39
|
+
* @param val 选择的值
|
|
40
|
+
* @param opt 选择的选项
|
|
41
|
+
*/
|
|
42
|
+
setSelectValue: (val: TtSelectModelValueType, opt?: TtSelectSelectOptions, isEmitChange?: boolean) => void;
|
|
43
|
+
/** 是否多选 */
|
|
44
|
+
multiple?: boolean;
|
|
45
|
+
/** 获取键盘事件处理函数 */
|
|
46
|
+
getKeyboardEvent: () => Record<TtSelectKeyboardType, () => void>;
|
|
47
|
+
/** 列字段数组 */
|
|
48
|
+
columnsFields: string[] | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* 设置是否有下一页
|
|
51
|
+
* @param bool 是否有下一页
|
|
52
|
+
*/
|
|
53
|
+
setHasNextPage: (bool: boolean) => void;
|
|
54
|
+
/** 获取下拉框处理事件 */
|
|
55
|
+
getSelectEvent: () => Record<string, () => void>;
|
|
56
|
+
/**
|
|
57
|
+
* 选择器选中的值
|
|
58
|
+
*/
|
|
59
|
+
selectValue: Ref<TtSelectModelValueType>;
|
|
60
|
+
/** 渲染类型 */
|
|
61
|
+
renderType: "select" | "grid" | "tree" | "table";
|
|
62
|
+
/** 选中的选项 */
|
|
63
|
+
multipleLimit: ComputedRef<number | undefined>;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 数据源钩子函数
|
|
67
|
+
* @param props 组件属性
|
|
68
|
+
* @param opt 选项
|
|
69
|
+
* @param emit 事件触发函数
|
|
70
|
+
* @returns 数据源相关状态和方法
|
|
71
|
+
*/
|
|
72
|
+
export declare function useDataSource(props: ComputedRef<TtSelectConfigProps>, opt: OptType, emit: EmitType): {
|
|
73
|
+
options: Ref<{
|
|
74
|
+
[x: string]: any;
|
|
75
|
+
label?: string | undefined;
|
|
76
|
+
value?: any;
|
|
77
|
+
item?: Record<string, any> | undefined;
|
|
78
|
+
disabled?: boolean | undefined;
|
|
79
|
+
actionType?: "add" | "remove" | undefined;
|
|
80
|
+
}[], TtSelectDataOptions[] | {
|
|
81
|
+
[x: string]: any;
|
|
82
|
+
label?: string | undefined;
|
|
83
|
+
value?: any;
|
|
84
|
+
item?: Record<string, any> | undefined;
|
|
85
|
+
disabled?: boolean | undefined;
|
|
86
|
+
actionType?: "add" | "remove" | undefined;
|
|
87
|
+
}[]>;
|
|
88
|
+
getDefaultSingle: ComputedRef<boolean | undefined>;
|
|
89
|
+
getIsSelectFirstOption: ComputedRef<boolean | undefined>;
|
|
90
|
+
getImmediate: ComputedRef<boolean>;
|
|
91
|
+
reload: (bool?: boolean) => Promise<void>;
|
|
92
|
+
searchValue: Ref<string, string>;
|
|
93
|
+
isLoaded: Ref<boolean, boolean>;
|
|
94
|
+
dataList: Ref<{
|
|
95
|
+
[x: string]: any;
|
|
96
|
+
label?: string | undefined;
|
|
97
|
+
value?: any;
|
|
98
|
+
item?: Record<string, any> | undefined;
|
|
99
|
+
disabled?: boolean | undefined;
|
|
100
|
+
actionType?: "add" | "remove" | undefined;
|
|
101
|
+
}[], TtSelectDataOptions[] | {
|
|
102
|
+
[x: string]: any;
|
|
103
|
+
label?: string | undefined;
|
|
104
|
+
value?: any;
|
|
105
|
+
item?: Record<string, any> | undefined;
|
|
106
|
+
disabled?: boolean | undefined;
|
|
107
|
+
actionType?: "add" | "remove" | undefined;
|
|
108
|
+
}[]>;
|
|
109
|
+
setSearchValue: (val: string) => Promise<void>;
|
|
110
|
+
activeIndex: Ref<number, number>;
|
|
111
|
+
setActiveIndex: (index: number) => void;
|
|
112
|
+
needLoad: ComputedRef<boolean>;
|
|
113
|
+
updateOptionsDisabled: () => void;
|
|
114
|
+
};
|
|
115
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { VxeGridInstance, VxeGridProps, VxeGridPropTypes } from 'vxe-table';
|
|
3
|
+
import { TtSelectTableProps } from '../props';
|
|
4
|
+
/**
|
|
5
|
+
* 用于处理表格相关逻辑的钩子函数
|
|
6
|
+
* @param props - 表格的属性
|
|
7
|
+
* @param opt - 自定义的表格选项
|
|
8
|
+
* @returns 包含表格列、行样式、表格引用和其他表格配置的对象
|
|
9
|
+
*/
|
|
10
|
+
export declare function useGrid(props: ComputedRef<VxeGridProps>, opt: ComputedRef<TtSelectTableProps>): {
|
|
11
|
+
getColumns: ComputedRef<VxeGridPropTypes.Columns<any>>;
|
|
12
|
+
rowStyle: ({ row }: {
|
|
13
|
+
row: any;
|
|
14
|
+
}) => {
|
|
15
|
+
color: string;
|
|
16
|
+
fontWeight: number;
|
|
17
|
+
width: string;
|
|
18
|
+
textDecorationLine: string;
|
|
19
|
+
} | {
|
|
20
|
+
color: string;
|
|
21
|
+
width: string;
|
|
22
|
+
textDecorationLine: string;
|
|
23
|
+
fontWeight?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
color: string;
|
|
26
|
+
width: string;
|
|
27
|
+
fontWeight?: undefined;
|
|
28
|
+
textDecorationLine?: undefined;
|
|
29
|
+
};
|
|
30
|
+
gridRef: import('vue').Ref<VxeGridInstance | undefined, VxeGridInstance | undefined>;
|
|
31
|
+
getOtherGridConfig: () => Partial<VxeGridProps>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ElSelect } from 'element-plus';
|
|
2
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import { VxeGridInstance } from 'vxe-table';
|
|
4
|
+
import { TtSelectModelValueType, TtSelectDataOptions } from '../types';
|
|
5
|
+
type OptType = {
|
|
6
|
+
/**
|
|
7
|
+
* 获取表格实例的函数
|
|
8
|
+
*/
|
|
9
|
+
tableInstance: () => VxeGridInstance;
|
|
10
|
+
/**
|
|
11
|
+
* 当前活动行的索引
|
|
12
|
+
*/
|
|
13
|
+
activeIndex: Ref<number>;
|
|
14
|
+
/**
|
|
15
|
+
* 选项列表
|
|
16
|
+
*/
|
|
17
|
+
options: Ref<TtSelectDataOptions[]>;
|
|
18
|
+
/**
|
|
19
|
+
* 设置活动索引的函数
|
|
20
|
+
* @param val - 要设置的索引值
|
|
21
|
+
*/
|
|
22
|
+
setActiveIndex: (val: number) => void;
|
|
23
|
+
/**
|
|
24
|
+
* 当前选中的值
|
|
25
|
+
*/
|
|
26
|
+
selectValue: Ref<TtSelectModelValueType>;
|
|
27
|
+
/**
|
|
28
|
+
* 是否为多选模式
|
|
29
|
+
*/
|
|
30
|
+
multiple: ComputedRef<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* 获取表格事件处理函数的对象
|
|
33
|
+
*/
|
|
34
|
+
getGridEvent: () => Record<string, any>;
|
|
35
|
+
/**
|
|
36
|
+
* 选择器实例的引用
|
|
37
|
+
*/
|
|
38
|
+
selectRef: Ref<InstanceType<typeof ElSelect> | null>;
|
|
39
|
+
/**
|
|
40
|
+
* 是否在加载数据
|
|
41
|
+
*/
|
|
42
|
+
loading: Ref<boolean>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* 用于处理键盘事件的钩子函数
|
|
46
|
+
* @param opt - 包含表格实例、活动索引、选项等信息的对象
|
|
47
|
+
* @returns 包含处理键盘事件的函数和键盘事件捕获对象的对象
|
|
48
|
+
*/
|
|
49
|
+
export declare function useKeyboard(opt: OptType): {
|
|
50
|
+
handleKeyDownNext: () => void;
|
|
51
|
+
handleKeyDownPrev: () => void;
|
|
52
|
+
handleKeyDownEnter: () => void;
|
|
53
|
+
keyboardCaptureEvent: {
|
|
54
|
+
ArrowUp: () => void;
|
|
55
|
+
ArrowDown: () => void;
|
|
56
|
+
Enter: () => void;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VxeGridPropTypes } from 'vxe-table';
|
|
2
|
+
type PaginationProps = VxeGridPropTypes.PagerConfig;
|
|
3
|
+
/**
|
|
4
|
+
* 用于处理分页配置的钩子函数
|
|
5
|
+
* @returns 包含分页配置相关操作的对象
|
|
6
|
+
*/
|
|
7
|
+
export declare function usePagination(): {
|
|
8
|
+
setShowPager: (val: boolean) => void;
|
|
9
|
+
showPager: import('vue').Ref<boolean, boolean>;
|
|
10
|
+
getPaginationInfo: import('vue').ComputedRef<VxeGridPropTypes.PagerConfig | undefined>;
|
|
11
|
+
getPagination: () => VxeGridPropTypes.PagerConfig | undefined;
|
|
12
|
+
setPagination: (info: Partial<PaginationProps>) => void;
|
|
13
|
+
hasNextPage: import('vue').Ref<boolean, boolean>;
|
|
14
|
+
setHasNextPage: (val: boolean) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ElSelect } from 'element-plus';
|
|
2
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
|
+
import { TtSelectProps } from '../props';
|
|
4
|
+
import { TtSelectKeyboardType, TtSelectSelectOptions, TtSelectDataOptions } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* 定义选项类型,包含选择器的各种配置和方法
|
|
7
|
+
*/
|
|
8
|
+
type OptType = {
|
|
9
|
+
/**
|
|
10
|
+
* 是否折叠标签
|
|
11
|
+
*/
|
|
12
|
+
collapse: boolean | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* 选中的选项
|
|
15
|
+
*/
|
|
16
|
+
selectOption: Ref<TtSelectSelectOptions>;
|
|
17
|
+
/**
|
|
18
|
+
* 选择器实例引用
|
|
19
|
+
*/
|
|
20
|
+
selectRef: Ref<InstanceType<typeof ElSelect> | null>;
|
|
21
|
+
/**
|
|
22
|
+
* 是否禁用选择器
|
|
23
|
+
*/
|
|
24
|
+
disabled: ComputedRef<boolean | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* 文本占位符
|
|
27
|
+
*/
|
|
28
|
+
placeholder: string;
|
|
29
|
+
/**
|
|
30
|
+
* 是否自动计算选择器宽度
|
|
31
|
+
*/
|
|
32
|
+
autoSelectWidth: boolean | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* 是否显示分页器
|
|
35
|
+
*/
|
|
36
|
+
showPager: Ref<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* 是否使用过滤方法
|
|
39
|
+
*/
|
|
40
|
+
isFilterMethod: boolean | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* 选项列表
|
|
43
|
+
*/
|
|
44
|
+
options: Ref<TtSelectDataOptions[]>;
|
|
45
|
+
/**
|
|
46
|
+
* 数据列表
|
|
47
|
+
*/
|
|
48
|
+
dataList: Ref<TtSelectDataOptions[]>;
|
|
49
|
+
/**
|
|
50
|
+
* 搜索字段
|
|
51
|
+
*/
|
|
52
|
+
searchField: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* 列字段数组
|
|
55
|
+
*/
|
|
56
|
+
columnsFields: string[];
|
|
57
|
+
/** 创建新选项 */
|
|
58
|
+
allowCreate?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 设置搜索值的方法
|
|
61
|
+
*/
|
|
62
|
+
setSearchValue: (val: string) => void;
|
|
63
|
+
/**
|
|
64
|
+
* 获取键盘事件处理函数的方法
|
|
65
|
+
*/
|
|
66
|
+
getKeyboardEvent: () => Record<TtSelectKeyboardType, Fn>;
|
|
67
|
+
/**
|
|
68
|
+
* 设置活动索引的方法
|
|
69
|
+
*/
|
|
70
|
+
setActiveIndex: (index: number) => void;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* 用于处理选择器相关逻辑的钩子函数
|
|
74
|
+
* @param props - 选择器的属性
|
|
75
|
+
* @param opt - 选项配置
|
|
76
|
+
* @returns 包含选择器属性、计算最大折叠标签数和计算选择器宽度的对象
|
|
77
|
+
*/
|
|
78
|
+
export declare function useSelect(props: ComputedRef<TtSelectProps["selectProps"]>, opt: OptType): {
|
|
79
|
+
getOtherSelectProps: ComputedRef<Partial<Omit<import('element-plus').SelectProps, "modelValue">>>;
|
|
80
|
+
calcMaxCollapseTags: () => void;
|
|
81
|
+
calcSelectWidth: ComputedRef<string>;
|
|
82
|
+
getSelectWidth: () => any;
|
|
83
|
+
selectWidth: Ref<number, number>;
|
|
84
|
+
showPopup: Ref<boolean, boolean>;
|
|
85
|
+
setShowPopup: (val: boolean) => void;
|
|
86
|
+
};
|
|
87
|
+
export {};
|