@fsystem/fswt-ui-tools 0.3.5 → 0.3.7

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.
@@ -110,7 +110,7 @@ export function buildTree(root: any, data: any[], opt: {
110
110
  treePathSplit: string;
111
111
  } | undefined, createNodeFn: (currentName: any, rawNode: any, level: any, parent: any) => object, setNodeFn: (node: any, currentName: any, rawNode: any, level: any, parent: any) => object): object;
112
112
  /**
113
- * 设置对象数组内指定页范文内对象的属性项
113
+ * 设置对象数组内指定页范文内对象的属性项,范围内的对象是同步设置的
114
114
  * @param {Array} list 操作的数组
115
115
  * @param {string} key 设置的属性key
116
116
  * @param {number} start 开始页
@@ -119,4 +119,15 @@ export function buildTree(root: any, data: any[], opt: {
119
119
  * @param {{(element:object, idx:number)=>any}} fn 回调函数
120
120
  * @returns {Array} 返回设置指定属性后的数组
121
121
  */
122
- export function setObejctArrayProperty(list: any[], key: string, start: number, end: number, pageSize: number, fn: (element: object, idx: number) => any): any[];
122
+ export function setObejctArrayPropertySync(list: any[], key: string, start: number, end: number, pageSize: number, fn: (element: object, idx: number) => any): any[];
123
+ /**
124
+ * 设置对象数组内指定页范文内对象的属性项,范围内的对象是异步设置的
125
+ * @param {Array} list 操作的数组
126
+ * @param {string} key 设置的属性key
127
+ * @param {number} start 开始页
128
+ * @param {number} end 结束页
129
+ * @param {number} pageSize 页大小
130
+ * @param {{(element:object}} fn 回调函数
131
+ * @returns {Array} 返回设置指定属性后的数组
132
+ */
133
+ export function setObejctArrayPropertyAsync(list: any[], key: string, start: number, end: number, pageSize: number, fn: (element: object) => any): any[];
@@ -35,10 +35,10 @@ export function downloadBase64Image(fileName: string, base64: string): void;
35
35
  /**
36
36
  * 下载
37
37
  * @param {string} filename 下载文件名
38
- * @param {string} filetype 下载文件类型 'application/txt'
39
38
  * @param {array} buffer 下载数据
39
+ * @param {string} filetype 下载文件类型 不填写,则从 buffer中获取类型 'application/txt'
40
40
  */
41
- export function downloadFile(filename: string, filetype: string, buffer: array): void;
41
+ export function downloadFile(filename: string, buffer: array, filetype: string): Promise<void>;
42
42
  /**
43
43
  * 根据url地址下载
44
44
  * @param {*} url
package/package.json CHANGED
@@ -1,38 +1,39 @@
1
- {
2
- "name": "@fsystem/fswt-ui-tools",
3
- "version": "0.3.5",
4
- "description": "Personal package.",
5
- "main": "dist/fswt-ui-tools.umd.js",
6
- "module": "dist/fswt-ui-tools.es.js",
7
- "typings": "dist/types/tools/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
- "iconv-lite": "^0.6.3",
22
- "rollup": "^3.18.0"
23
- },
24
- "publishConfig": {
25
- "registry": "https://registry.npmjs.org/",
26
- "access": "public"
27
- },
28
- "devDependencies": {
29
- "@rollup/plugin-commonjs": "^24.0.1",
30
- "@rollup/plugin-node-resolve": "^15.0.1",
31
- "@rollup/plugin-typescript": "^11.0.0",
32
- "eslint": "^8.36.0",
33
- "eslint-config-fswti": "workspace:*",
34
- "typescript": "^4.9.3",
35
- "vite": "^4.0.4",
36
- "vite-tsconfig-paths": "^4.0.7"
37
- }
38
- }
1
+ {
2
+ "name": "@fsystem/fswt-ui-tools",
3
+ "version": "0.3.7",
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
+ }