@fsystem/fswt-ui-tools 0.3.7 → 0.3.9
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/fswt-ui-tools.es.js +144 -105
- package/dist/fswt-ui-tools.umd.js +4 -4
- package/dist/types/tools/Util.d.ts +12 -0
- package/package.json +39 -39
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blob 转 DataURL(base64)
|
|
3
|
+
* @param {Blob} blob 二进制 Blob 对象
|
|
4
|
+
* @returns {Promise<string>} 返回 DataURL 字符串
|
|
5
|
+
*/
|
|
6
|
+
export function blobToDataUrl(blob: Blob): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* 根据文件 URL 读取并转换为 DataURL(base64)
|
|
9
|
+
* @param {string} url 文件地址,支持相对路径和绝对路径
|
|
10
|
+
* @returns {Promise<string>} 返回 DataURL 字符串
|
|
11
|
+
*/
|
|
12
|
+
export function convertFileUrlToBase64(url: string): Promise<string>;
|
|
1
13
|
/**
|
|
2
14
|
* 删除URL中指定search参数,会将参数值一起删除
|
|
3
15
|
* @param {string} url 地址字符串
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fsystem/fswt-ui-tools",
|
|
3
|
+
"version": "0.3.9",
|
|
4
|
+
"description": "Personal package.",
|
|
5
|
+
"main": "dist/fswt-ui-tools.umd.js",
|
|
6
|
+
"module": "dist/fswt-ui-tools.es.js",
|
|
7
|
+
"typings": "dist/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"type": "module",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "vite",
|
|
14
|
+
"build": "vite build --force",
|
|
15
|
+
"serve": "vite preview",
|
|
16
|
+
"upload": "npm run build && npm publish --registry https://registry.npmjs.com/ --access public"
|
|
17
|
+
},
|
|
18
|
+
"author": "@fsystem",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"file-type": "^21.0.0",
|
|
22
|
+
"iconv-lite": "^0.6.3",
|
|
23
|
+
"rollup": "^3.18.0"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"registry": "https://registry.npmjs.org/",
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@rollup/plugin-commonjs": "^24.0.1",
|
|
31
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
32
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
33
|
+
"eslint": "^8.36.0",
|
|
34
|
+
"eslint-config-fswti": "workspace:*",
|
|
35
|
+
"typescript": "^4.9.3",
|
|
36
|
+
"vite": "^4.0.4",
|
|
37
|
+
"vite-tsconfig-paths": "^4.0.7"
|
|
38
|
+
}
|
|
39
|
+
}
|