giime 0.6.2 → 0.6.4
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 +59 -58
- package/es/api/materialApi/cross/getAdFileExist.d.ts +1 -0
- package/es/api/materialApi/cross/getAdFileExist.mjs.map +1 -1
- package/es/components/src/base/chart/Chart.vue.d.ts +2 -2
- package/es/components/src/base/chart/index.d.ts +2 -2
- package/es/components/src/base/empty/Empty.vue.d.ts +1 -1
- package/es/components/src/base/empty/index.d.ts +3 -3
- package/es/components/src/business/loginDialog/LoginDialog.vue2.mjs +7 -8
- package/es/components/src/business/loginDialog/LoginDialog.vue2.mjs.map +1 -1
- package/es/components/src/business/uploadMaterial/UploadMaterial.vue.d.ts +4 -4
- package/es/components/src/business/uploadMaterial/index.d.ts +4 -4
- package/es/components/src/business/uploadMaterial/uploadMaterial.d.ts +2 -5
- package/es/components/src/business/uploadMaterial/uploadMaterial.mjs.map +1 -1
- package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
- package/es/components/src/composite/fileComponent/index.d.ts +1 -1
- package/es/components/src/composite/importDialog/ImportDialog.vue.d.ts +9 -2
- package/es/components/src/composite/importDialog/ImportDialog.vue2.mjs +5 -4
- package/es/components/src/composite/importDialog/ImportDialog.vue2.mjs.map +1 -1
- package/es/components/src/composite/importDialog/index.d.ts +193 -49
- package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
- package/es/components/src/composite/previewFile/index.d.ts +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +5 -5
- package/es/components/src/composite/uploadFile/UploadFile.vue.mjs +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue2.mjs +156 -145
- package/es/components/src/composite/uploadFile/UploadFile.vue2.mjs.map +1 -1
- package/es/components/src/composite/uploadFile/index.d.ts +12 -12
- package/es/giime/index.mjs +2 -1
- package/es/giime/index.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/hooks/base/usePasteFile/index.d.ts +89 -0
- package/es/hooks/base/usePasteFile/index.mjs +109 -0
- package/es/hooks/base/usePasteFile/index.mjs.map +1 -0
- package/es/hooks/store/useOrgUserList/index.d.ts +3 -3
- package/es/hooks/store/useOrgUserList/index.mjs +3 -3
- package/es/hooks/store/useOrgUserList/index.mjs.map +1 -1
- package/es/index.css +59 -58
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/index.mjs.map +1 -1
- package/es/utils/src/alioss/aliossPutHook.d.ts +116 -41
- package/es/utils/src/alioss/aliossPutHook.mjs +165 -97
- package/es/utils/src/alioss/aliossPutHook.mjs.map +1 -1
- package/es/utils/src/file.d.ts +7 -0
- package/es/utils/src/file.mjs +39 -1
- package/es/utils/src/file.mjs.map +1 -1
- package/es/utils/src/pasteFile/index.d.ts +33 -0
- package/es/utils/src/pasteFile/index.mjs +142 -0
- package/es/utils/src/pasteFile/index.mjs.map +1 -0
- package/lib/api/materialApi/cross/getAdFileExist.d.ts +1 -0
- package/lib/api/materialApi/cross/getAdFileExist.js.map +1 -1
- package/lib/components/src/base/chart/Chart.vue.d.ts +2 -2
- package/lib/components/src/base/chart/index.d.ts +2 -2
- package/lib/components/src/base/empty/Empty.vue.d.ts +1 -1
- package/lib/components/src/base/empty/index.d.ts +3 -3
- package/lib/components/src/business/loginDialog/LoginDialog.vue2.js +7 -8
- package/lib/components/src/business/loginDialog/LoginDialog.vue2.js.map +1 -1
- package/lib/components/src/business/uploadMaterial/UploadMaterial.vue.d.ts +4 -4
- package/lib/components/src/business/uploadMaterial/index.d.ts +4 -4
- package/lib/components/src/business/uploadMaterial/uploadMaterial.d.ts +2 -5
- package/lib/components/src/business/uploadMaterial/uploadMaterial.js.map +1 -1
- package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
- package/lib/components/src/composite/fileComponent/index.d.ts +1 -1
- package/lib/components/src/composite/importDialog/ImportDialog.vue.d.ts +9 -2
- package/lib/components/src/composite/importDialog/ImportDialog.vue2.js +4 -3
- package/lib/components/src/composite/importDialog/ImportDialog.vue2.js.map +1 -1
- package/lib/components/src/composite/importDialog/index.d.ts +193 -49
- package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
- package/lib/components/src/composite/previewFile/index.d.ts +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +5 -5
- package/lib/components/src/composite/uploadFile/UploadFile.vue.js +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue2.js +160 -149
- package/lib/components/src/composite/uploadFile/UploadFile.vue2.js.map +1 -1
- package/lib/components/src/composite/uploadFile/index.d.ts +12 -12
- package/lib/giime/index.js +334 -328
- package/lib/giime/index.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/hooks/base/usePasteFile/index.d.ts +89 -0
- package/lib/hooks/base/usePasteFile/index.js +111 -0
- package/lib/hooks/base/usePasteFile/index.js.map +1 -0
- package/lib/hooks/store/useOrgUserList/index.d.ts +3 -3
- package/lib/hooks/store/useOrgUserList/index.js +3 -3
- package/lib/hooks/store/useOrgUserList/index.js.map +1 -1
- package/lib/index.css +59 -58
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +6 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/src/alioss/aliossPutHook.d.ts +116 -41
- package/lib/utils/src/alioss/aliossPutHook.js +165 -97
- package/lib/utils/src/alioss/aliossPutHook.js.map +1 -1
- package/lib/utils/src/file.d.ts +7 -0
- package/lib/utils/src/file.js +40 -0
- package/lib/utils/src/file.js.map +1 -1
- package/lib/utils/src/pasteFile/index.d.ts +33 -0
- package/lib/utils/src/pasteFile/index.js +146 -0
- package/lib/utils/src/pasteFile/index.js.map +1 -0
- package/package.json +1 -1
package/lib/giime/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/giime/index.ts"],"sourcesContent":["import installer from './defaults';\r\nimport './tailwind.css';\r\nexport * from '@giime/utils';\r\nexport * from '@giime/components';\r\nexport * from '@giime/hooks';\r\n// export * from '@giime/api'; // 用户通过giime/es/api 导入类型\r\nexport const install = installer.install;\r\nexport const version = installer.version;\r\nexport default installer;\r\n"],"names":["installer"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../packages/giime/index.ts"],"sourcesContent":["import installer from './defaults';\r\nimport './tailwind.css';\r\nexport * from '@giime/utils';\r\nexport * from '@giime/components';\r\nexport * from '@giime/hooks';\r\n// export * from '@giime/api'; // 用户通过giime/es/api 导入类型\r\nexport const install = installer.install;\r\nexport const version = installer.version;\r\nexport default installer;\r\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,UAAUA,gBAAU,CAAA,QAAA;AAC1B,MAAM,UAAUA,gBAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/giime/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.6.
|
|
1
|
+
export declare const version = "0.6.4";
|
package/lib/giime/version.js
CHANGED
package/lib/giime/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.6.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../packages/giime/version.ts"],"sourcesContent":["export const version = '0.6.4';\n"],"names":[],"mappings":";;AAAO,MAAM,OAAU,GAAA;;;;"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from '@vueuse/core';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 成功回调函数类型
|
|
5
|
+
*/
|
|
6
|
+
type SuccessCallback = (files: File[]) => void;
|
|
7
|
+
/**
|
|
8
|
+
* 错误回调函数类型
|
|
9
|
+
*/
|
|
10
|
+
type ErrorCallback = (error: Error) => void;
|
|
11
|
+
/**
|
|
12
|
+
* 粘贴文件选项
|
|
13
|
+
*/
|
|
14
|
+
export interface UsePasteFileOptions {
|
|
15
|
+
/**
|
|
16
|
+
* 允许的文件类型,例如 'image/png,image/jpeg'
|
|
17
|
+
*/
|
|
18
|
+
accept?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 是否禁用粘贴文件功能
|
|
21
|
+
*/
|
|
22
|
+
disabled?: Ref<boolean> | boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 是否自动阻止默认行为
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
preventDefault?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 粘贴文件hooks返回值类型
|
|
31
|
+
*/
|
|
32
|
+
interface UsePasteFileReturn {
|
|
33
|
+
/**
|
|
34
|
+
* 添加成功回调函数
|
|
35
|
+
* @param callback 当成功粘贴文件时调用的回调函数
|
|
36
|
+
* @returns 移除该回调的函数
|
|
37
|
+
*/
|
|
38
|
+
onSuccess: (callback: SuccessCallback) => () => void;
|
|
39
|
+
/**
|
|
40
|
+
* 添加错误回调函数
|
|
41
|
+
* @param callback 当粘贴文件出错时调用的回调函数
|
|
42
|
+
* @returns 移除该回调的函数
|
|
43
|
+
*/
|
|
44
|
+
onError: (callback: ErrorCallback) => () => void;
|
|
45
|
+
/**
|
|
46
|
+
* 清理函数,移除事件监听器和所有回调
|
|
47
|
+
*/
|
|
48
|
+
cleanup: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* 是否正在处理粘贴事件
|
|
51
|
+
*/
|
|
52
|
+
isProcessing: Ref<boolean>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 粘贴文件hooks
|
|
56
|
+
* @param target 监听的DOM元素或事件目标
|
|
57
|
+
* @param options 配置选项
|
|
58
|
+
* @returns 包含onSuccess、onError、cleanup方法和isProcessing状态的对象
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const { onSuccess, onError, cleanup, isProcessing } = usePasteFile(
|
|
63
|
+
* document,
|
|
64
|
+
* {
|
|
65
|
+
* accept: 'image/png,image/jpeg',
|
|
66
|
+
* disabled: ref(false),
|
|
67
|
+
* preventDefault: true
|
|
68
|
+
* }
|
|
69
|
+
* );
|
|
70
|
+
*
|
|
71
|
+
* // 添加成功回调
|
|
72
|
+
* const removeSuccessListener = onSuccess((files) => {
|
|
73
|
+
* console.log('粘贴的文件:', files);
|
|
74
|
+
* });
|
|
75
|
+
*
|
|
76
|
+
* // 添加错误回调
|
|
77
|
+
* onError((error) => {
|
|
78
|
+
* console.error('粘贴处理错误:', error);
|
|
79
|
+
* });
|
|
80
|
+
*
|
|
81
|
+
* // 移除特定的成功回调
|
|
82
|
+
* removeSuccessListener();
|
|
83
|
+
*
|
|
84
|
+
* // 清理所有事件监听器和回调
|
|
85
|
+
* // cleanup();
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare const usePasteFile: (target: MaybeRefOrGetter<EventTarget | null | undefined>, options?: UsePasteFileOptions) => UsePasteFileReturn;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var core = require('@vueuse/core');
|
|
5
|
+
var file = require('../../../utils/src/file.js');
|
|
6
|
+
require('../../../utils/index.js');
|
|
7
|
+
var index = require('../../../utils/src/pasteFile/index.js');
|
|
8
|
+
|
|
9
|
+
class PasteFileError extends Error {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.name = "PasteFileError";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const usePasteFile = (target, options = {}) => {
|
|
16
|
+
const { accept, disabled = false, preventDefault = true } = options;
|
|
17
|
+
const successCallbacks = /* @__PURE__ */ new Set();
|
|
18
|
+
const errorCallbacks = /* @__PURE__ */ new Set();
|
|
19
|
+
const isProcessing = vue.ref(false);
|
|
20
|
+
let isCleanedUp = false;
|
|
21
|
+
const getDisabled = () => {
|
|
22
|
+
if (isCleanedUp)
|
|
23
|
+
return true;
|
|
24
|
+
return typeof disabled === "boolean" ? disabled : disabled.value;
|
|
25
|
+
};
|
|
26
|
+
const onPaste = async (e) => {
|
|
27
|
+
if (getDisabled())
|
|
28
|
+
return;
|
|
29
|
+
if (preventDefault) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
}
|
|
32
|
+
isProcessing.value = true;
|
|
33
|
+
try {
|
|
34
|
+
const clipboardEvent = e;
|
|
35
|
+
const files = await index.handlePasteEvent(clipboardEvent);
|
|
36
|
+
if (files.length === 0)
|
|
37
|
+
return;
|
|
38
|
+
const filteredFiles = accept && accept !== "*" ? files.filter((file$1) => file.fileValidType(file$1, accept)) : files;
|
|
39
|
+
if (filteredFiles.length === 0)
|
|
40
|
+
return;
|
|
41
|
+
if (successCallbacks.size > 0) {
|
|
42
|
+
successCallbacks.forEach((callback) => {
|
|
43
|
+
try {
|
|
44
|
+
callback(filteredFiles);
|
|
45
|
+
} catch (callbackError) {
|
|
46
|
+
console.error("\u6267\u884C\u6210\u529F\u56DE\u8C03\u65F6\u51FA\u9519:", callbackError);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
} catch (error) {
|
|
51
|
+
handlePasteError(error);
|
|
52
|
+
} finally {
|
|
53
|
+
isProcessing.value = false;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const handlePasteError = (error) => {
|
|
57
|
+
const pasteError = error instanceof Error ? error : new PasteFileError(`\u7C98\u8D34\u6587\u4EF6\u5904\u7406\u5931\u8D25: ${String(error)}`);
|
|
58
|
+
if (errorCallbacks.size > 0) {
|
|
59
|
+
errorCallbacks.forEach((callback) => {
|
|
60
|
+
try {
|
|
61
|
+
callback(pasteError);
|
|
62
|
+
} catch (callbackError) {
|
|
63
|
+
console.error("\u6267\u884C\u9519\u8BEF\u56DE\u8C03\u65F6\u51FA\u9519:", callbackError);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
console.error("\u7C98\u8D34\u6587\u4EF6\u5904\u7406\u5931\u8D25:", pasteError);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
core.useEventListener(target, "paste", onPaste);
|
|
71
|
+
const cleanupAll = () => {
|
|
72
|
+
if (isCleanedUp)
|
|
73
|
+
return;
|
|
74
|
+
successCallbacks.clear();
|
|
75
|
+
errorCallbacks.clear();
|
|
76
|
+
isCleanedUp = true;
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
// 添加成功回调,并返回移除该回调的函数
|
|
80
|
+
onSuccess: (callback) => {
|
|
81
|
+
if (isCleanedUp) {
|
|
82
|
+
console.warn("usePasteFile\u5DF2\u6E05\u7406\uFF0C\u65E0\u6CD5\u6DFB\u52A0\u56DE\u8C03");
|
|
83
|
+
return () => {
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
successCallbacks.add(callback);
|
|
87
|
+
return () => {
|
|
88
|
+
successCallbacks.delete(callback);
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
// 添加错误回调,并返回移除该回调的函数
|
|
92
|
+
onError: (callback) => {
|
|
93
|
+
if (isCleanedUp) {
|
|
94
|
+
console.warn("usePasteFile\u5DF2\u6E05\u7406\uFF0C\u65E0\u6CD5\u6DFB\u52A0\u56DE\u8C03");
|
|
95
|
+
return () => {
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
errorCallbacks.add(callback);
|
|
99
|
+
return () => {
|
|
100
|
+
errorCallbacks.delete(callback);
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
// 清理函数
|
|
104
|
+
cleanup: cleanupAll,
|
|
105
|
+
// 是否正在处理粘贴事件
|
|
106
|
+
isProcessing
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
exports.usePasteFile = usePasteFile;
|
|
111
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/base/usePasteFile/index.ts"],"sourcesContent":["import { ref } from 'vue';\r\nimport { type MaybeRefOrGetter, useEventListener } from '@vueuse/core';\r\nimport { fileValidType } from '@giime/utils/src/file';\r\nimport { handlePasteEvent } from '@giime/utils';\r\nimport type { Ref } from 'vue';\r\n\r\n/**\r\n * 成功回调函数类型\r\n */\r\ntype SuccessCallback = (files: File[]) => void;\r\n\r\n/**\r\n * 错误回调函数类型\r\n */\r\ntype ErrorCallback = (error: Error) => void;\r\n\r\n/**\r\n * 粘贴文件选项\r\n */\r\nexport interface UsePasteFileOptions {\r\n /**\r\n * 允许的文件类型,例如 'image/png,image/jpeg'\r\n */\r\n accept?: string;\r\n\r\n /**\r\n * 是否禁用粘贴文件功能\r\n */\r\n disabled?: Ref<boolean> | boolean;\r\n\r\n /**\r\n * 是否自动阻止默认行为\r\n * @default true\r\n */\r\n preventDefault?: boolean;\r\n}\r\n\r\n/**\r\n * 粘贴文件错误类型\r\n */\r\nclass PasteFileError extends Error {\r\n constructor(message: string) {\r\n super(message);\r\n this.name = 'PasteFileError';\r\n }\r\n}\r\n\r\n/**\r\n * 粘贴文件hooks返回值类型\r\n */\r\ninterface UsePasteFileReturn {\r\n /**\r\n * 添加成功回调函数\r\n * @param callback 当成功粘贴文件时调用的回调函数\r\n * @returns 移除该回调的函数\r\n */\r\n onSuccess: (callback: SuccessCallback) => () => void;\r\n\r\n /**\r\n * 添加错误回调函数\r\n * @param callback 当粘贴文件出错时调用的回调函数\r\n * @returns 移除该回调的函数\r\n */\r\n onError: (callback: ErrorCallback) => () => void;\r\n\r\n /**\r\n * 清理函数,移除事件监听器和所有回调\r\n */\r\n cleanup: () => void;\r\n\r\n /**\r\n * 是否正在处理粘贴事件\r\n */\r\n isProcessing: Ref<boolean>;\r\n}\r\n\r\n/**\r\n * 粘贴文件hooks\r\n * @param target 监听的DOM元素或事件目标\r\n * @param options 配置选项\r\n * @returns 包含onSuccess、onError、cleanup方法和isProcessing状态的对象\r\n *\r\n * @example\r\n * ```ts\r\n * const { onSuccess, onError, cleanup, isProcessing } = usePasteFile(\r\n * document,\r\n * {\r\n * accept: 'image/png,image/jpeg',\r\n * disabled: ref(false),\r\n * preventDefault: true\r\n * }\r\n * );\r\n *\r\n * // 添加成功回调\r\n * const removeSuccessListener = onSuccess((files) => {\r\n * console.log('粘贴的文件:', files);\r\n * });\r\n *\r\n * // 添加错误回调\r\n * onError((error) => {\r\n * console.error('粘贴处理错误:', error);\r\n * });\r\n *\r\n * // 移除特定的成功回调\r\n * removeSuccessListener();\r\n *\r\n * // 清理所有事件监听器和回调\r\n * // cleanup();\r\n * ```\r\n */\r\nexport const usePasteFile = (target: MaybeRefOrGetter<EventTarget | null | undefined>, options: UsePasteFileOptions = {}): UsePasteFileReturn => {\r\n const { accept, disabled = false, preventDefault = true } = options;\r\n\r\n // 使用Set存储回调函数,避免重复添加\r\n const successCallbacks = new Set<SuccessCallback>();\r\n const errorCallbacks = new Set<ErrorCallback>();\r\n\r\n // 是否正在处理粘贴事件\r\n const isProcessing = ref(false);\r\n\r\n // 是否已经清理\r\n let isCleanedUp = false;\r\n\r\n // 获取禁用状态\r\n const getDisabled = (): boolean => {\r\n if (isCleanedUp) return true;\r\n return typeof disabled === 'boolean' ? disabled : disabled.value;\r\n };\r\n\r\n /**\r\n * 处理粘贴事件\r\n */\r\n const onPaste = async (e: Event) => {\r\n // 如果已禁用,则不处理\r\n if (getDisabled()) return;\r\n\r\n // 阻止默认行为(如果配置为阻止)\r\n if (preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // 设置处理状态\r\n isProcessing.value = true;\r\n\r\n try {\r\n // 类型断言为ClipboardEvent\r\n const clipboardEvent = e as ClipboardEvent;\r\n\r\n // 获取粘贴的文件\r\n const files = await handlePasteEvent(clipboardEvent);\r\n\r\n // 如果没有文件被粘贴,直接返回\r\n if (files.length === 0) return;\r\n\r\n // 如果指定了文件类型,进行过滤\r\n const filteredFiles = accept && accept !== '*' ? files.filter(file => fileValidType(file, accept)) : files;\r\n\r\n // 如果过滤后没有文件,则不触发回调\r\n if (filteredFiles.length === 0) return;\r\n\r\n // 如果有成功回调,则调用所有成功回调\r\n if (successCallbacks.size > 0) {\r\n successCallbacks.forEach(callback => {\r\n try {\r\n callback(filteredFiles);\r\n } catch (callbackError) {\r\n console.error('执行成功回调时出错:', callbackError);\r\n }\r\n });\r\n }\r\n } catch (error) {\r\n // 处理错误\r\n handlePasteError(error);\r\n } finally {\r\n // 重置处理状态\r\n isProcessing.value = false;\r\n }\r\n };\r\n\r\n /**\r\n * 处理粘贴错误\r\n */\r\n const handlePasteError = (error: unknown) => {\r\n // 确保错误是Error类型\r\n const pasteError = error instanceof Error ? error : new PasteFileError(`粘贴文件处理失败: ${String(error)}`);\r\n\r\n // 如果有错误回调,则调用所有错误回调\r\n if (errorCallbacks.size > 0) {\r\n errorCallbacks.forEach(callback => {\r\n try {\r\n callback(pasteError);\r\n } catch (callbackError) {\r\n console.error('执行错误回调时出错:', callbackError);\r\n }\r\n });\r\n } else {\r\n // 如果没有错误回调,则输出到控制台\r\n console.error('粘贴文件处理失败:', pasteError);\r\n }\r\n };\r\n\r\n // 使用useEventListener监听粘贴事件\r\n useEventListener(target, 'paste', onPaste);\r\n\r\n // 清理函数\r\n const cleanupAll = () => {\r\n if (isCleanedUp) return;\r\n\r\n // 清空回调函数\r\n successCallbacks.clear();\r\n errorCallbacks.clear();\r\n\r\n // 标记为已清理\r\n isCleanedUp = true;\r\n };\r\n\r\n return {\r\n // 添加成功回调,并返回移除该回调的函数\r\n onSuccess: (callback: SuccessCallback) => {\r\n if (isCleanedUp) {\r\n console.warn('usePasteFile已清理,无法添加回调');\r\n return () => {};\r\n }\r\n\r\n successCallbacks.add(callback);\r\n\r\n // 返回移除该回调的函数\r\n return () => {\r\n successCallbacks.delete(callback);\r\n };\r\n },\r\n\r\n // 添加错误回调,并返回移除该回调的函数\r\n onError: (callback: ErrorCallback) => {\r\n if (isCleanedUp) {\r\n console.warn('usePasteFile已清理,无法添加回调');\r\n return () => {};\r\n }\r\n\r\n errorCallbacks.add(callback);\r\n\r\n // 返回移除该回调的函数\r\n return () => {\r\n errorCallbacks.delete(callback);\r\n };\r\n },\r\n\r\n // 清理函数\r\n cleanup: cleanupAll,\r\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rg
|
|
|
42
42
|
user_status: number;
|
|
43
43
|
}[];
|
|
44
44
|
msg: string;
|
|
45
|
-
}, any>, any
|
|
45
|
+
}, any>, any>>;
|
|
46
46
|
}, "isLoading">>, Pick<{
|
|
47
47
|
userList: import("vue").ComputedRef<{
|
|
48
48
|
user_id: number;
|
|
@@ -85,7 +85,7 @@ export declare const useOrgUserListStore: import("pinia").StoreDefinition<"gmOrg
|
|
|
85
85
|
user_status: number;
|
|
86
86
|
}[];
|
|
87
87
|
msg: string;
|
|
88
|
-
}, any>, any
|
|
88
|
+
}, any>, any>>;
|
|
89
89
|
}, "userList" | "orgUserList">, Pick<{
|
|
90
90
|
userList: import("vue").ComputedRef<{
|
|
91
91
|
user_id: number;
|
|
@@ -128,5 +128,5 @@ export declare const useOrgUserListStore: import("pinia").StoreDefinition<"gmOrg
|
|
|
128
128
|
user_status: number;
|
|
129
129
|
}[];
|
|
130
130
|
msg: string;
|
|
131
|
-
}, any>, any
|
|
131
|
+
}, any>, any>>;
|
|
132
132
|
}, "getOrgUserList">>;
|
|
@@ -20,13 +20,13 @@ const useOrgUserListStore = pinia.defineStore("gmOrgUserList", (options = { disa
|
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
const getOrgUserList = async (input) => {
|
|
23
|
-
if (userList.value.length !== 0 || isLoading.value) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
23
|
return exec(input);
|
|
27
24
|
};
|
|
28
25
|
if (!options.disabledInitList) {
|
|
29
26
|
vue.onMounted(() => {
|
|
27
|
+
if (userList.value.length !== 0 || isLoading.value) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
30
|
getOrgUserList({ user_status: 1 });
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/store/useOrgUserList/index.ts"],"sourcesContent":["import { computed, onMounted } from 'vue';\nimport { defineStore } from 'pinia';\nimport { groupBy } from 'lodash-es';\nimport { usePostBasicV1UserListUserOrg } from '@giime/api/guardBasic/controller';\nimport type { UserOrgReq } from '@giime/api/guardBasic/interface';\n\n/**用户-家族列表 */\nexport const useOrgUserListStore = defineStore('gmOrgUserList', (options = { disabledInitList: false }) => {\n const { isLoading, exec, data: userListData } = usePostBasicV1UserListUserOrg();\n const userList = computed(() => userListData.value?.data || []);\n const orgUserList = computed(() => {\n const familyGroup = groupBy(userList.value, 'family_code');\n return Object.keys(familyGroup).map(familyCode => {\n return {\n label: familyGroup[familyCode][0].family_name,\n value: familyCode,\n children: familyGroup[familyCode].map(it => ({ label: it.user_name, value: it.user_id })),\n };\n });\n });\n const getOrgUserList = async (input?: UserOrgReq) => {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/store/useOrgUserList/index.ts"],"sourcesContent":["import { computed, onMounted } from 'vue';\nimport { defineStore } from 'pinia';\nimport { groupBy } from 'lodash-es';\nimport { usePostBasicV1UserListUserOrg } from '@giime/api/guardBasic/controller';\nimport type { UserOrgReq } from '@giime/api/guardBasic/interface';\n\n/**用户-家族列表 */\nexport const useOrgUserListStore = defineStore('gmOrgUserList', (options = { disabledInitList: false }) => {\n const { isLoading, exec, data: userListData } = usePostBasicV1UserListUserOrg();\n const userList = computed(() => userListData.value?.data || []);\n const orgUserList = computed(() => {\n const familyGroup = groupBy(userList.value, 'family_code');\n return Object.keys(familyGroup).map(familyCode => {\n return {\n label: familyGroup[familyCode][0].family_name,\n value: familyCode,\n children: familyGroup[familyCode].map(it => ({ label: it.user_name, value: it.user_id })),\n };\n });\n });\n const getOrgUserList = async (input?: UserOrgReq) => {\n return exec(input);\n };\n if (!options.disabledInitList) {\n onMounted(() => {\n if (userList.value.length !== 0 || isLoading.value) {\n return;\n }\n getOrgUserList({ user_status: 1 });\n });\n }\n\n return {\n userList,\n isLoading,\n orgUserList,\n getOrgUserList,\n };\n});\n"],"names":["defineStore","usePostBasicV1UserListUserOrg","computed","groupBy","onMounted"],"mappings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AA,KAClC,CAAA,CAAA;AAAA,GACH;AAEA,EAAO,OAAA;AAAA,IACL,QAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA;AACF,CAAC;;;;"}
|
package/lib/index.css
CHANGED
|
@@ -801,11 +801,6 @@ video {
|
|
|
801
801
|
.gm-group:hover .group-hover\:gm-block {
|
|
802
802
|
display: block;
|
|
803
803
|
}
|
|
804
|
-
|
|
805
|
-
.gm-range-number .el-form-item[data-v-11c39847] {
|
|
806
|
-
margin: 0;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
804
|
.gm-flex-center[data-v-2a79bac9] {
|
|
810
805
|
align-items: center;
|
|
811
806
|
}
|
|
@@ -813,6 +808,43 @@ video {
|
|
|
813
808
|
.gm-flex-justify-between[data-v-2a79bac9] {
|
|
814
809
|
justify-content: space-between;
|
|
815
810
|
}
|
|
811
|
+
.gm-upload-preview-dialog[data-v-3bf7f50d] [data-v-3bf7f50d] .el-dialog__body {
|
|
812
|
+
padding: 0;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.gm-upload-file-picture-card[data-v-3bf7f50d] [data-v-3bf7f50d] .el-upload-list__item, .gm-upload-file-picture-card[data-v-3bf7f50d] [data-v-3bf7f50d] .el-upload--picture-card {
|
|
816
|
+
width: 120px;
|
|
817
|
+
height: 120px;
|
|
818
|
+
display: flex;
|
|
819
|
+
align-items: center;
|
|
820
|
+
justify-content: center;
|
|
821
|
+
}
|
|
822
|
+
.gm-upload-file {
|
|
823
|
+
line-height: normal;
|
|
824
|
+
}
|
|
825
|
+
.gm-upload-file .el-checkbox {
|
|
826
|
+
position: absolute;
|
|
827
|
+
left: 10px;
|
|
828
|
+
top: 0;
|
|
829
|
+
z-index: 9;
|
|
830
|
+
}
|
|
831
|
+
.gm-upload-file .el-upload-list__item-file-name {
|
|
832
|
+
line-height: normal;
|
|
833
|
+
}
|
|
834
|
+
.gm-upload-file .el-upload-dragger {
|
|
835
|
+
padding: 0;
|
|
836
|
+
border: none;
|
|
837
|
+
width: 100%;
|
|
838
|
+
height: 100%;
|
|
839
|
+
display: flex;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.gm-upload-file-disabled .el-upload--picture-card {
|
|
843
|
+
display: none;
|
|
844
|
+
}
|
|
845
|
+
.gm-upload-file-disabled .el-upload-list__item-status-label {
|
|
846
|
+
display: none;
|
|
847
|
+
}
|
|
816
848
|
.circular[data-v-b391445c] {
|
|
817
849
|
animation: loading-rotate-b391445c 2s linear infinite;
|
|
818
850
|
}
|
|
@@ -844,35 +876,11 @@ video {
|
|
|
844
876
|
stroke-dashoffset: -120px;
|
|
845
877
|
}
|
|
846
878
|
}
|
|
847
|
-
.gm-number-interval-single[data-v-47a13fd0] {
|
|
848
|
-
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
849
|
-
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
850
|
-
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
851
|
-
}
|
|
852
|
-
.gm-number-interval-single[data-v-47a13fd0] [data-v-47a13fd0] .el-input__wrapper {
|
|
853
|
-
box-shadow: none;
|
|
854
|
-
background: none;
|
|
855
|
-
}
|
|
856
879
|
|
|
857
|
-
.gm-number-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
.gm-number-interval-single[data-v-47a13fd0]:hover .gm-number-interval-close[data-v-47a13fd0] {
|
|
863
|
-
display: flex;
|
|
864
|
-
}
|
|
865
|
-
.gm-upload-preview-dialog[data-v-142ef678] [data-v-142ef678] .el-dialog__body {
|
|
866
|
-
padding: 0;
|
|
867
|
-
}
|
|
880
|
+
.gm-range-number .el-form-item[data-v-11c39847] {
|
|
881
|
+
margin: 0;
|
|
882
|
+
}
|
|
868
883
|
|
|
869
|
-
.gm-upload-file-picture-card[data-v-142ef678] [data-v-142ef678] .el-upload-list__item, .gm-upload-file-picture-card[data-v-142ef678] [data-v-142ef678] .el-upload--picture-card {
|
|
870
|
-
width: 120px;
|
|
871
|
-
height: 120px;
|
|
872
|
-
display: flex;
|
|
873
|
-
align-items: center;
|
|
874
|
-
justify-content: center;
|
|
875
|
-
}
|
|
876
884
|
[data-v-7b6755e2] .gmSearchForm .el-form-item {
|
|
877
885
|
margin-right: 0;
|
|
878
886
|
margin-bottom: 4px;
|
|
@@ -900,32 +908,6 @@ video {
|
|
|
900
908
|
[data-v-668dc408] .gmTableNoBorder .el-table__border-left-patch {
|
|
901
909
|
height: 0;
|
|
902
910
|
}
|
|
903
|
-
.gm-upload-file {
|
|
904
|
-
line-height: normal;
|
|
905
|
-
}
|
|
906
|
-
.gm-upload-file .el-checkbox {
|
|
907
|
-
position: absolute;
|
|
908
|
-
left: 10px;
|
|
909
|
-
top: 0;
|
|
910
|
-
z-index: 9;
|
|
911
|
-
}
|
|
912
|
-
.gm-upload-file .el-upload-list__item-file-name {
|
|
913
|
-
line-height: normal;
|
|
914
|
-
}
|
|
915
|
-
.gm-upload-file .el-upload-dragger {
|
|
916
|
-
padding: 0;
|
|
917
|
-
border: none;
|
|
918
|
-
width: 100%;
|
|
919
|
-
height: 100%;
|
|
920
|
-
display: flex;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
.gm-upload-file-disabled .el-upload--picture-card {
|
|
924
|
-
display: none;
|
|
925
|
-
}
|
|
926
|
-
.gm-upload-file-disabled .el-upload-list__item-status-label {
|
|
927
|
-
display: none;
|
|
928
|
-
}
|
|
929
911
|
|
|
930
912
|
.pagination-container[data-v-19230954] {
|
|
931
913
|
background: #fff;
|
|
@@ -934,3 +916,22 @@ video {
|
|
|
934
916
|
.pagination-container.hidden[data-v-19230954] {
|
|
935
917
|
display: none;
|
|
936
918
|
}
|
|
919
|
+
|
|
920
|
+
.gm-number-interval-single[data-v-47a13fd0] {
|
|
921
|
+
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
922
|
+
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
923
|
+
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
924
|
+
}
|
|
925
|
+
.gm-number-interval-single[data-v-47a13fd0] [data-v-47a13fd0] .el-input__wrapper {
|
|
926
|
+
box-shadow: none;
|
|
927
|
+
background: none;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.gm-number-interval-close[data-v-47a13fd0] {
|
|
931
|
+
display: none;
|
|
932
|
+
color: var(--el-input-icon-color, var(--el-text-color-placeholder));
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.gm-number-interval-single[data-v-47a13fd0]:hover .gm-number-interval-close[data-v-47a13fd0] {
|
|
936
|
+
display: flex;
|
|
937
|
+
}
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var general = require('./src/general.js');
|
|
|
12
12
|
require('./src/crypto/index.js');
|
|
13
13
|
var number = require('./src/number.js');
|
|
14
14
|
require('./src/tree/index.js');
|
|
15
|
+
var index = require('./src/pasteFile/index.js');
|
|
15
16
|
var install = require('./src/vue/install.js');
|
|
16
17
|
var resolver = require('./src/vue/resolver.js');
|
|
17
18
|
var event = require('./src/elementPlus/event.js');
|
|
@@ -64,9 +65,11 @@ exports.base64ToBlob = file.base64ToBlob;
|
|
|
64
65
|
exports.base64ToFile = file.base64ToFile;
|
|
65
66
|
exports.blobToBase64 = file.blobToBase64;
|
|
66
67
|
exports.blobToFile = file.blobToFile;
|
|
68
|
+
exports.fileMd5 = file.fileMd5;
|
|
67
69
|
exports.fileToBase64 = file.fileToBase64;
|
|
68
70
|
exports.fileToBlob = file.fileToBlob;
|
|
69
71
|
exports.fileToUrl = file.fileToUrl;
|
|
72
|
+
exports.fileValidType = file.fileValidType;
|
|
70
73
|
exports.urlToBlob = file.urlToBlob;
|
|
71
74
|
exports.urlToFile = file.urlToFile;
|
|
72
75
|
exports.compareVersions = general.compareVersions;
|
|
@@ -74,6 +77,9 @@ exports.isVersionGreaterOrEqual = general.isVersionGreaterOrEqual;
|
|
|
74
77
|
exports.omitOnEvents = general.omitOnEvents;
|
|
75
78
|
exports.remove = general.remove;
|
|
76
79
|
exports.formatNumberWithCommas = number.formatNumberWithCommas;
|
|
80
|
+
exports.PasteFileError = index.PasteFileError;
|
|
81
|
+
exports.generateFileName = index.generateFileName;
|
|
82
|
+
exports.handlePasteEvent = index.handlePasteEvent;
|
|
77
83
|
exports.withInstall = install.withInstall;
|
|
78
84
|
exports.withInstallDirective = install.withInstallDirective;
|
|
79
85
|
exports.withInstallFunction = install.withInstallFunction;
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|