@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,251 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
/** 后端返回的阿里云 OSS V4 签名信息(服务端签名直传) */
|
|
3
|
+
export interface OssSignatureResult {
|
|
4
|
+
/** HMAC-SHA256 签名 */
|
|
5
|
+
signature: string;
|
|
6
|
+
/** STS 安全令牌 */
|
|
7
|
+
security_token: string;
|
|
8
|
+
/** OSS 上传地址,如 http://bucket.oss-cn-shenzhen.aliyuncs.com */
|
|
9
|
+
host: string;
|
|
10
|
+
/** Base64 编码的 callback 配置 */
|
|
11
|
+
callback: string;
|
|
12
|
+
/** 签名凭证,格式:AccessKeyId/date/region/oss/aliyun_v4_request */
|
|
13
|
+
x_oss_credential: string;
|
|
14
|
+
/** 文件存储目录前缀 */
|
|
15
|
+
dir: string;
|
|
16
|
+
/** 签名版本,固定 OSS4-HMAC-SHA256 */
|
|
17
|
+
version: string;
|
|
18
|
+
/** 请求时间,ISO 8601 格式 */
|
|
19
|
+
x_oss_date: string;
|
|
20
|
+
/** Base64 编码的上传策略 */
|
|
21
|
+
policy: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TtUploadFileItem {
|
|
24
|
+
/** 文件唯一标识 */
|
|
25
|
+
id: string | number;
|
|
26
|
+
/** 文件名 */
|
|
27
|
+
name: string;
|
|
28
|
+
/** 文件URL(用于预览/下载) */
|
|
29
|
+
url?: string;
|
|
30
|
+
/** 文件大小(字节) */
|
|
31
|
+
size?: number;
|
|
32
|
+
/** 文件类型 */
|
|
33
|
+
type?: string;
|
|
34
|
+
/** 上传时间 */
|
|
35
|
+
uploadTime?: string;
|
|
36
|
+
/** 原始文件对象 */
|
|
37
|
+
raw?: File;
|
|
38
|
+
/** 扩展数据 */
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
export declare const ttUploadProps: {
|
|
42
|
+
readonly action: {
|
|
43
|
+
readonly type: PropType<string>;
|
|
44
|
+
readonly default: "";
|
|
45
|
+
};
|
|
46
|
+
readonly accept: {
|
|
47
|
+
readonly type: PropType<string>;
|
|
48
|
+
readonly default: ".pdf,.xlsx,.xls,.doc,.docx,.jpg,.jpeg,.png";
|
|
49
|
+
};
|
|
50
|
+
readonly multiple: {
|
|
51
|
+
readonly type: PropType<boolean>;
|
|
52
|
+
readonly default: true;
|
|
53
|
+
};
|
|
54
|
+
readonly drag: {
|
|
55
|
+
readonly type: PropType<boolean>;
|
|
56
|
+
readonly default: true;
|
|
57
|
+
};
|
|
58
|
+
/** 是否使用弹框模式 */
|
|
59
|
+
readonly modal: {
|
|
60
|
+
readonly type: PropType<boolean>;
|
|
61
|
+
readonly default: true;
|
|
62
|
+
};
|
|
63
|
+
/** 已上传文件列表(v-model) */
|
|
64
|
+
readonly modelValue: {
|
|
65
|
+
readonly type: PropType<TtUploadFileItem[]>;
|
|
66
|
+
readonly default: () => never[];
|
|
67
|
+
};
|
|
68
|
+
/** 获取 OSS 签名信息的接口(服务端签名直传),不传则使用全局 setup 的 uploadOssApi */
|
|
69
|
+
readonly uploadOssApi: {
|
|
70
|
+
readonly type: PropType<(file: File) => Promise<OssSignatureResult>>;
|
|
71
|
+
readonly default: undefined;
|
|
72
|
+
};
|
|
73
|
+
/** 上传提示文字 */
|
|
74
|
+
readonly uploadTip: {
|
|
75
|
+
readonly type: PropType<string>;
|
|
76
|
+
readonly default: "可以上传pdf、excel、word、图片格式";
|
|
77
|
+
};
|
|
78
|
+
/** 最大上传文件大小(MB) */
|
|
79
|
+
readonly maxSize: {
|
|
80
|
+
readonly type: PropType<number>;
|
|
81
|
+
readonly default: 50;
|
|
82
|
+
};
|
|
83
|
+
/** 是否显示已上传列表 */
|
|
84
|
+
readonly showFileList: {
|
|
85
|
+
readonly type: PropType<boolean>;
|
|
86
|
+
readonly default: true;
|
|
87
|
+
};
|
|
88
|
+
/** 是否显示模板下载链接 */
|
|
89
|
+
readonly showTemplateDownload: {
|
|
90
|
+
readonly type: PropType<boolean>;
|
|
91
|
+
readonly default: false;
|
|
92
|
+
};
|
|
93
|
+
/** 模板下载链接文字 */
|
|
94
|
+
readonly templateText: {
|
|
95
|
+
readonly type: PropType<string>;
|
|
96
|
+
readonly default: "模板下载";
|
|
97
|
+
};
|
|
98
|
+
/** 是否显示查看按钮 */
|
|
99
|
+
readonly showPreview: {
|
|
100
|
+
readonly type: PropType<boolean>;
|
|
101
|
+
readonly default: true;
|
|
102
|
+
};
|
|
103
|
+
/** 是否显示下载按钮 */
|
|
104
|
+
readonly showDownload: {
|
|
105
|
+
readonly type: PropType<boolean>;
|
|
106
|
+
readonly default: true;
|
|
107
|
+
};
|
|
108
|
+
/** 是否显示删除按钮 */
|
|
109
|
+
readonly showDelete: {
|
|
110
|
+
readonly type: PropType<boolean>;
|
|
111
|
+
readonly default: true;
|
|
112
|
+
};
|
|
113
|
+
/** 文件数量达到该值时切换为网格布局 */
|
|
114
|
+
readonly gridThreshold: {
|
|
115
|
+
readonly type: PropType<number>;
|
|
116
|
+
readonly default: 4;
|
|
117
|
+
};
|
|
118
|
+
/** 网格模式下每行列数 */
|
|
119
|
+
readonly gridColumns: {
|
|
120
|
+
readonly type: PropType<number>;
|
|
121
|
+
readonly default: 4;
|
|
122
|
+
};
|
|
123
|
+
/** 显示已上传数量统计(需传入 limit) */
|
|
124
|
+
readonly showCount: {
|
|
125
|
+
readonly type: PropType<boolean>;
|
|
126
|
+
readonly default: true;
|
|
127
|
+
};
|
|
128
|
+
readonly beforeUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
129
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
130
|
+
new (): any;
|
|
131
|
+
readonly prototype: any;
|
|
132
|
+
} | ((new (...args: any[]) => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
133
|
+
(): (rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
134
|
+
new (): any;
|
|
135
|
+
readonly prototype: any;
|
|
136
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
137
|
+
readonly beforeRemove: {
|
|
138
|
+
readonly type: import('vue').PropType<(uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => import('element-plus/es/utils/typescript.mjs').Awaitable<boolean>>;
|
|
139
|
+
readonly required: false;
|
|
140
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
141
|
+
__epPropKey: true;
|
|
142
|
+
};
|
|
143
|
+
readonly onRemove: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
144
|
+
(): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
145
|
+
new (): any;
|
|
146
|
+
readonly prototype: any;
|
|
147
|
+
} | ((new (...args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
148
|
+
(): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
149
|
+
new (): any;
|
|
150
|
+
readonly prototype: any;
|
|
151
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
152
|
+
readonly onChange: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
153
|
+
(): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
154
|
+
new (): any;
|
|
155
|
+
readonly prototype: any;
|
|
156
|
+
} | ((new (...args: any[]) => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
157
|
+
(): (uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
158
|
+
new (): any;
|
|
159
|
+
readonly prototype: any;
|
|
160
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
161
|
+
readonly onPreview: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (uploadFile: import('element-plus').UploadFile) => void) | (() => (uploadFile: import('element-plus').UploadFile) => void) | {
|
|
162
|
+
(): (uploadFile: import('element-plus').UploadFile) => void;
|
|
163
|
+
new (): any;
|
|
164
|
+
readonly prototype: any;
|
|
165
|
+
} | ((new (...args: any[]) => (uploadFile: import('element-plus').UploadFile) => void) | (() => (uploadFile: import('element-plus').UploadFile) => void) | {
|
|
166
|
+
(): (uploadFile: import('element-plus').UploadFile) => void;
|
|
167
|
+
new (): any;
|
|
168
|
+
readonly prototype: any;
|
|
169
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
170
|
+
readonly onSuccess: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
171
|
+
(): (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
172
|
+
new (): any;
|
|
173
|
+
readonly prototype: any;
|
|
174
|
+
} | ((new (...args: any[]) => (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
175
|
+
(): (response: any, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
176
|
+
new (): any;
|
|
177
|
+
readonly prototype: any;
|
|
178
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
179
|
+
readonly onProgress: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
180
|
+
(): (evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
181
|
+
new (): any;
|
|
182
|
+
readonly prototype: any;
|
|
183
|
+
} | ((new (...args: any[]) => (evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
184
|
+
(): (evt: import('element-plus').UploadProgressEvent, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
185
|
+
new (): any;
|
|
186
|
+
readonly prototype: any;
|
|
187
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
188
|
+
readonly onError: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
189
|
+
(): (error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
190
|
+
new (): any;
|
|
191
|
+
readonly prototype: any;
|
|
192
|
+
} | ((new (...args: any[]) => (error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | (() => (error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void) | {
|
|
193
|
+
(): (error: Error, uploadFile: import('element-plus').UploadFile, uploadFiles: import('element-plus').UploadFiles) => void;
|
|
194
|
+
new (): any;
|
|
195
|
+
readonly prototype: any;
|
|
196
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
197
|
+
readonly onExceed: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void) | {
|
|
198
|
+
(): (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void;
|
|
199
|
+
new (): any;
|
|
200
|
+
readonly prototype: any;
|
|
201
|
+
} | ((new (...args: any[]) => (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void) | {
|
|
202
|
+
(): (files: File[], uploadFiles: import('element-plus').UploadUserFile[]) => void;
|
|
203
|
+
new (): any;
|
|
204
|
+
readonly prototype: any;
|
|
205
|
+
})[], unknown, unknown, () => void, boolean>;
|
|
206
|
+
readonly crossorigin: {
|
|
207
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
|
|
208
|
+
readonly required: false;
|
|
209
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
210
|
+
__epPropKey: true;
|
|
211
|
+
};
|
|
212
|
+
readonly headers: {
|
|
213
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | ((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers))[], unknown, unknown>>;
|
|
214
|
+
readonly required: false;
|
|
215
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
216
|
+
__epPropKey: true;
|
|
217
|
+
};
|
|
218
|
+
readonly method: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
219
|
+
readonly data: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | ((new (...args: any[]) => import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>> | Promise<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)) | (() => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus/es/utils/typescript.mjs').Mutable<Record<string, any>>> | ((rawFile: import('element-plus').UploadRawFile) => import('element-plus/es/utils/typescript.mjs').Awaitable<import('element-plus').UploadData>)))[], unknown, unknown, () => import('element-plus/es/utils/typescript.mjs').Mutable<{}>, boolean>;
|
|
220
|
+
readonly name: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
221
|
+
readonly withCredentials: BooleanConstructor;
|
|
222
|
+
readonly fileList: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]) | ((new (...args: any[]) => import('element-plus').UploadUserFile[]) | (() => import('element-plus').UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
|
|
223
|
+
readonly autoUpload: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
224
|
+
readonly listType: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
|
|
225
|
+
readonly httpRequest: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
226
|
+
(): import('element-plus').UploadRequestHandler;
|
|
227
|
+
new (): any;
|
|
228
|
+
readonly prototype: any;
|
|
229
|
+
} | ((new (...args: any[]) => import('element-plus').UploadRequestHandler) | (() => import('element-plus').UploadRequestHandler) | {
|
|
230
|
+
(): import('element-plus').UploadRequestHandler;
|
|
231
|
+
new (): any;
|
|
232
|
+
readonly prototype: any;
|
|
233
|
+
})[], unknown, unknown, import('element-plus').UploadRequestHandler, boolean>;
|
|
234
|
+
readonly disabled: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
235
|
+
readonly limit: NumberConstructor;
|
|
236
|
+
readonly directory: BooleanConstructor;
|
|
237
|
+
};
|
|
238
|
+
export type TtUploadProps = ExtractPropTypes<typeof ttUploadProps>;
|
|
239
|
+
export interface TtUploadEmits {
|
|
240
|
+
(e: "update:modelValue", val: TtUploadFileItem[]): void;
|
|
241
|
+
/** 每次上传成功后抛出:当前文件项与后端返回的 url */
|
|
242
|
+
(e: "afterUpload", file: TtUploadFileItem, url: string): void;
|
|
243
|
+
(e: "preview", file: TtUploadFileItem): void;
|
|
244
|
+
(e: "download", file: TtUploadFileItem): void;
|
|
245
|
+
(e: "delete", file: TtUploadFileItem): void;
|
|
246
|
+
(e: "templateDownload"): void;
|
|
247
|
+
(e: "ok", fileList: TtUploadFileItem[]): void;
|
|
248
|
+
/** 弹框模式下点击确定时抛出,携带当前文件列表 */
|
|
249
|
+
(e: "submit", fileList: TtUploadFileItem[]): void;
|
|
250
|
+
(e: "cancel"): void;
|
|
251
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { VxeGridPropTypes, VxeTablePropTypes } from 'vxe-table';
|
|
2
|
+
import { TtTableProps } from './tt-table/src/types/table';
|
|
3
|
+
import { OssSignatureResult } from './tt-upload/src/typing';
|
|
4
|
+
export type Fn<T = any, R = T> = (...arg: T[]) => R;
|
|
5
|
+
export type Nullable<T> = T | null;
|
|
6
|
+
export type Recordable<T = any> = Record<string, T>;
|
|
7
|
+
export type TtUiGlobalConfig = {
|
|
8
|
+
/**
|
|
9
|
+
* 登录的用户id
|
|
10
|
+
*/
|
|
11
|
+
userId?: string | number;
|
|
12
|
+
/** 获取 OSS 签名信息的接口(服务端签名直传) */
|
|
13
|
+
uploadOssApi?: (file: File) => Promise<OssSignatureResult>;
|
|
14
|
+
table?: {
|
|
15
|
+
/** 自定义列服务端配置的key,支持函数动态获取 */
|
|
16
|
+
columnsKey?: string | (() => string);
|
|
17
|
+
/** 自定义列服务端配置接口 - 获取 */
|
|
18
|
+
getColumnsApi?: (params: {
|
|
19
|
+
permissionOnlyCode: string;
|
|
20
|
+
userId: string | number;
|
|
21
|
+
}) => Promise<{
|
|
22
|
+
data: any;
|
|
23
|
+
}>;
|
|
24
|
+
/** 自定义列服务端配置接口 - 当没有id值得时候 */
|
|
25
|
+
setColumnsApi?: (params: {
|
|
26
|
+
permissionOnlyCode: string;
|
|
27
|
+
json: string;
|
|
28
|
+
userId: string | number;
|
|
29
|
+
}) => Promise<any>;
|
|
30
|
+
/** 自定义列服务端配置接口 - 当有id值得时候 */
|
|
31
|
+
updateColumnsApi?: (params: {
|
|
32
|
+
permissionOnlyCode: string;
|
|
33
|
+
json: string;
|
|
34
|
+
userId: string | number;
|
|
35
|
+
}) => Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* 是否开启服务端缓存
|
|
38
|
+
* @default-false
|
|
39
|
+
*/
|
|
40
|
+
useHttpCache?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 默认展示的列
|
|
43
|
+
* @default-[]
|
|
44
|
+
*/
|
|
45
|
+
defaultDisplayFields?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* 是否开启框选到checkbox自动勾选 field
|
|
48
|
+
* @default-false
|
|
49
|
+
* @deprecated 使用 checkboxConfig.range 替换
|
|
50
|
+
*/
|
|
51
|
+
isAreaCheckboxSelection?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 当前页数 field
|
|
54
|
+
* @default-pageIndex
|
|
55
|
+
*/
|
|
56
|
+
currentPageField?: string;
|
|
57
|
+
/**
|
|
58
|
+
* 当前页的大小 field
|
|
59
|
+
* @default-pageSize
|
|
60
|
+
*/
|
|
61
|
+
pageSizeField?: string;
|
|
62
|
+
/**
|
|
63
|
+
* 总数 field
|
|
64
|
+
* @default-total
|
|
65
|
+
*/
|
|
66
|
+
totalField?: string;
|
|
67
|
+
/**
|
|
68
|
+
* 数据的 field
|
|
69
|
+
* @default-list
|
|
70
|
+
*/
|
|
71
|
+
dataField?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 表格行id
|
|
74
|
+
* @default-id
|
|
75
|
+
*/
|
|
76
|
+
tableRowId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 请求的状态码
|
|
79
|
+
* @default-200
|
|
80
|
+
* @deprecated
|
|
81
|
+
*/
|
|
82
|
+
resultCode?: string | number;
|
|
83
|
+
/**
|
|
84
|
+
* loading text
|
|
85
|
+
* @default-loading text
|
|
86
|
+
*/
|
|
87
|
+
loadingText?: string;
|
|
88
|
+
/**
|
|
89
|
+
* empty text
|
|
90
|
+
* @default-暂无数据
|
|
91
|
+
*/
|
|
92
|
+
emptyText?: string;
|
|
93
|
+
/**
|
|
94
|
+
* empty text
|
|
95
|
+
* @default-未查询时文案
|
|
96
|
+
*/
|
|
97
|
+
noSearchText?: string;
|
|
98
|
+
/**
|
|
99
|
+
* @default { isClip: true }
|
|
100
|
+
*/
|
|
101
|
+
keyboardConfig?: VxeTablePropTypes.KeyboardConfig;
|
|
102
|
+
/**
|
|
103
|
+
* @default
|
|
104
|
+
* {
|
|
105
|
+
selected: false,
|
|
106
|
+
}
|
|
107
|
+
*/
|
|
108
|
+
mouseConfig?: VxeTablePropTypes.MouseConfig;
|
|
109
|
+
/**
|
|
110
|
+
* @default
|
|
111
|
+
* {
|
|
112
|
+
pageSize: 300,
|
|
113
|
+
pageSizes: [300, 500, 1000, 2000],
|
|
114
|
+
}
|
|
115
|
+
*/
|
|
116
|
+
pagerConfig?: VxeGridPropTypes.PagerConfig;
|
|
117
|
+
/** 复选框配置 */
|
|
118
|
+
checkboxConfig?: VxeTablePropTypes.CheckboxConfig;
|
|
119
|
+
/** 单选框配置 */
|
|
120
|
+
radioConfig?: VxeTablePropTypes.RadioConfig;
|
|
121
|
+
/** 表格的size */
|
|
122
|
+
size?: VxeGridPropTypes.Size;
|
|
123
|
+
/** 表格边框 */
|
|
124
|
+
border?: "full" | "inner" | boolean;
|
|
125
|
+
/**
|
|
126
|
+
* 是否开启缓存
|
|
127
|
+
* @default-false 不开启
|
|
128
|
+
*/
|
|
129
|
+
useCache?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 是否显示右边刷新按钮
|
|
132
|
+
* @default-true 显示
|
|
133
|
+
*/
|
|
134
|
+
showRefresh?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* 是否显示右边设置
|
|
137
|
+
* @default-true 显示
|
|
138
|
+
*/
|
|
139
|
+
showSetting?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* 是否显示自定义列
|
|
142
|
+
* @default-true 显示
|
|
143
|
+
*/
|
|
144
|
+
showSetColumn?: boolean;
|
|
145
|
+
/** 自定义函数 */
|
|
146
|
+
customizeColumn?: TtTableProps["customizeColumn"];
|
|
147
|
+
/** 外部插槽 */
|
|
148
|
+
getSyncSlotComponent?: TtTableProps["getSyncSlotComponent"];
|
|
149
|
+
/**
|
|
150
|
+
* 表格斑马线
|
|
151
|
+
* @default- false
|
|
152
|
+
*/
|
|
153
|
+
stripe?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* 请求后的回调
|
|
156
|
+
* @param data 表格数据
|
|
157
|
+
* @param res 原始结果数据
|
|
158
|
+
*/
|
|
159
|
+
afterFetch?: TtTableProps["afterFetch"];
|
|
160
|
+
/**
|
|
161
|
+
* 请求前的回调
|
|
162
|
+
* @param params 请求参数
|
|
163
|
+
*/
|
|
164
|
+
beforeFetch?: TtTableProps["beforeFetch"];
|
|
165
|
+
/**
|
|
166
|
+
* reload 是否重置为第一页
|
|
167
|
+
* @default true
|
|
168
|
+
*/
|
|
169
|
+
isReloadResetToFirstPage?: boolean;
|
|
170
|
+
};
|
|
171
|
+
form: {
|
|
172
|
+
/**
|
|
173
|
+
* 表单的提交按钮字段
|
|
174
|
+
* @default-查询
|
|
175
|
+
*/
|
|
176
|
+
submitTitle?: string;
|
|
177
|
+
};
|
|
178
|
+
TtSelect?: {
|
|
179
|
+
/**
|
|
180
|
+
* 响应结果不分页字段
|
|
181
|
+
* @default-data
|
|
182
|
+
*/
|
|
183
|
+
dataField?: string;
|
|
184
|
+
/**
|
|
185
|
+
* 响应结果分页字段
|
|
186
|
+
* @default-data.list
|
|
187
|
+
*/
|
|
188
|
+
resultField?: string;
|
|
189
|
+
/** 当前页数 field */
|
|
190
|
+
currentPageField?: string;
|
|
191
|
+
/** 当前页的大小 field */
|
|
192
|
+
pageSizeField?: string;
|
|
193
|
+
/**
|
|
194
|
+
* 响应结果分页总数字段 field
|
|
195
|
+
* @default-data.pagination.total
|
|
196
|
+
*/
|
|
197
|
+
totalField?: string;
|
|
198
|
+
/**
|
|
199
|
+
* 只有一条数据是否默认选中, 需要开启立即加载 暂时只兼容了分页数据
|
|
200
|
+
* @default-false
|
|
201
|
+
* @deprecated 使用 defaultSingle 替换
|
|
202
|
+
*/
|
|
203
|
+
isDefaultSelect?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* 是否需要每次展开加载数据
|
|
206
|
+
* @default-false
|
|
207
|
+
*/
|
|
208
|
+
isExpandLoadData?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* 外部值改变是否立即触发emit
|
|
211
|
+
* @deprecated 兼容旧代码,新开发不要使用
|
|
212
|
+
*/
|
|
213
|
+
immediateEmitChange?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* 只有一条数据是否默认选中, 需要开启立即加载 暂时只兼容了分页数据
|
|
216
|
+
* @default-false
|
|
217
|
+
*/
|
|
218
|
+
defaultSingle?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* 是否选中第一条数据
|
|
221
|
+
* @default-false
|
|
222
|
+
*/
|
|
223
|
+
isSelectFirstOption?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* 渲染模式
|
|
226
|
+
*/
|
|
227
|
+
renderType?: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
export type TtUiGlobalSetup = (options?: TtUiGlobalConfig) => TtUiGlobalConfig;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInternalInstance, DirectiveBinding, VNode } from 'vue';
|
|
2
|
+
declare function handle(el: HTMLElement, binding: DirectiveBinding, vnode: any): void;
|
|
3
|
+
/**
|
|
4
|
+
* element-plus dialog组件大小缩放功能
|
|
5
|
+
* 不要使用ElDialog自带的 draggable 和 fullscreen
|
|
6
|
+
* @param draggable Boolean 是否支持拖拽
|
|
7
|
+
* @param fullscreen Boolean 是否支持全屏
|
|
8
|
+
* @param resizer Boolean 是否支持自定义大小
|
|
9
|
+
* @param resizeChange Function 自定义大小改变时触发
|
|
10
|
+
* @param draggableLimit Number 拖拽上右下左拖动限制 默认 [50,50,50,50]
|
|
11
|
+
* @param resizerLimit Number 自定义大小限制 默认[260,180]
|
|
12
|
+
* @example
|
|
13
|
+
* <div v-dialogResize="{ draggable: true, resizer: true, resizeChange: (newWidth, newHeight) => {}, fullscreen: true, draggableLimit: [50,50,50,50] }">
|
|
14
|
+
* <el-dialog v-model="dialogVisible" title="Tips" width="30%">
|
|
15
|
+
* </el-dialog>
|
|
16
|
+
* </div>
|
|
17
|
+
*/
|
|
18
|
+
declare const _default: {
|
|
19
|
+
mounted: typeof handle;
|
|
20
|
+
updated: typeof handle;
|
|
21
|
+
beforeUnmount: (_el: HTMLElement, _binding: DirectiveBinding, vnode: VNode & {
|
|
22
|
+
ctx: ComponentInternalInstance;
|
|
23
|
+
}) => void;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useCssVariable(dialogEl: HTMLElement): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComputedRef, DirectiveBinding, Ref } from 'vue';
|
|
2
|
+
export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
|
|
3
|
+
declare function useDraggable(targetRef: Ref<HTMLElement | undefined> | HTMLElement, dragRef: Ref<HTMLElement | undefined> | HTMLElement, draggable: ComputedRef<boolean>, beforeMountedFun: Array<(...args: any) => any>, binding: DirectiveBinding): void;
|
|
4
|
+
export default useDraggable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useFullscreen(dialogEl: HTMLElement, dialogVnode: any): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive, MaybeRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 定义提示配置项类型
|
|
4
|
+
* @property {boolean | MaybeRef<boolean>} condition - 表示是否禁用的标志,可能是一个响应式引用
|
|
5
|
+
* @property {string} message - 提示信息
|
|
6
|
+
* @property {string} placement - 提示信息位置
|
|
7
|
+
*/
|
|
8
|
+
export interface TipConfig {
|
|
9
|
+
condition: boolean | MaybeRef<boolean>;
|
|
10
|
+
message: string;
|
|
11
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 禁用提示指令对象,包含指令的生命周期钩子函数
|
|
15
|
+
*/
|
|
16
|
+
declare const disabledTipDirective: Directive;
|
|
17
|
+
export default disabledTipDirective;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { default as dayjs } from 'dayjs';
|
|
2
|
+
type ILabelFormatType = "period" | "month";
|
|
3
|
+
type FormatReturnType = {
|
|
4
|
+
/**
|
|
5
|
+
* 生成表单验证规则
|
|
6
|
+
* @param message - 验证失败时的提示信息
|
|
7
|
+
* @param trigger - 触发验证的时机,默认为'change'
|
|
8
|
+
* @returns 验证规则数组
|
|
9
|
+
*/
|
|
10
|
+
formatFormRole: (message: string, trigger?: string) => {
|
|
11
|
+
required: boolean;
|
|
12
|
+
message: string;
|
|
13
|
+
trigger: string;
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* 格式化日期时间
|
|
17
|
+
* @param date - 要格式化的日期,可以是字符串、数字、Date对象或dayjs对象
|
|
18
|
+
* @param format - 格式化模板,默认为'YYYY-MM-DD HH:mm:ss'
|
|
19
|
+
* @returns 格式化后的日期时间字符串,无效日期返回'--'
|
|
20
|
+
*/
|
|
21
|
+
formatToDateTime: (date: string | number | Date | dayjs.Dayjs | null | undefined, format?: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* 格式化日期
|
|
24
|
+
* @param date - 要格式化的日期,可以是字符串、数字、Date对象或dayjs对象
|
|
25
|
+
* @param format - 格式化模板,默认为'YYYY-MM-DD'
|
|
26
|
+
* @param isTimeStamp - 是否为时间戳格式,默认为false
|
|
27
|
+
* @returns 格式化后的日期字符串,无效日期返回'--'
|
|
28
|
+
*/
|
|
29
|
+
formatToDate: (date: string | number | Date | dayjs.Dayjs | null | undefined, format?: string, isTimeStamp?: boolean) => string;
|
|
30
|
+
/**
|
|
31
|
+
* 格式化金额数据
|
|
32
|
+
* @param val - 要格式化的金额,可以是数字或字符串
|
|
33
|
+
* @param format - 格式化模板,默认为'0,0.00'
|
|
34
|
+
* @returns 格式化后的金额字符串
|
|
35
|
+
*/
|
|
36
|
+
formatAmount: (val: number | string, format?: string) => string;
|
|
37
|
+
/**
|
|
38
|
+
* 格式化金额为千分位并保留两位小数
|
|
39
|
+
* @param val - 要格式化的数值
|
|
40
|
+
* @param format - 格式化模板,默认为'0,0.00'
|
|
41
|
+
* @returns 格式化后的金额字符串
|
|
42
|
+
*/
|
|
43
|
+
formatAmountOfPlace: (val: number, format?: string) => string;
|
|
44
|
+
/**
|
|
45
|
+
* 将千分位格式的金额字符串转换为数值
|
|
46
|
+
* @param val - 要转换的金额字符串或数值
|
|
47
|
+
* @returns 转换后的数值
|
|
48
|
+
*/
|
|
49
|
+
formatPlaceOfAmount: (val: string | number) => number;
|
|
50
|
+
/**
|
|
51
|
+
* 格式化金额但不四舍五入
|
|
52
|
+
* @param str - 要格式化的金额字符串或数字
|
|
53
|
+
* @param index - 要保留的小数位数
|
|
54
|
+
* @returns 格式化后的金额字符串
|
|
55
|
+
*/
|
|
56
|
+
formatDecimal: (str: string | number, index: number) => string;
|
|
57
|
+
/**
|
|
58
|
+
* 格式化文件大小
|
|
59
|
+
* @param bytes - 文件大小(字节)
|
|
60
|
+
* @param decimalPoint - 保留的小数位数,默认为2
|
|
61
|
+
* @returns 格式化后的文件大小字符串(带单位)
|
|
62
|
+
*/
|
|
63
|
+
formatFileSize: (bytes: number, decimalPoint?: number) => string;
|
|
64
|
+
/**
|
|
65
|
+
* 格式化期间(年月)
|
|
66
|
+
* @param val - 要格式化的期间值,可以是数字或字符串
|
|
67
|
+
* @param formatType - 格式化类型,'period'表示期间,'month'表示月份
|
|
68
|
+
* @returns 格式化后的期间字符串
|
|
69
|
+
*/
|
|
70
|
+
formatPeriod: (val: number | string, formatType?: ILabelFormatType) => string;
|
|
71
|
+
};
|
|
72
|
+
export declare function useFormat(): FormatReturnType;
|
|
73
|
+
export {};
|