zmdms-utils 0.0.16 → 0.0.17
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/es/file.d.ts +1 -0
- package/dist/es/file.js +1 -0
- package/dist/es/math.d.ts +2 -2
- package/package.json +1 -1
- package/src/file.ts +1 -0
- package/src/math.ts +1 -1
package/dist/es/file.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ declare function createOriginalLink(fileId: string, fileName: string, options?:
|
|
|
71
71
|
* @param options.authToken {string} token 非必传
|
|
72
72
|
* @param options.scale {number} 缩略比
|
|
73
73
|
* @returns
|
|
74
|
+
* createThumbnailLink('1', 'z', { API_BASEURL: 1 })
|
|
74
75
|
*/
|
|
75
76
|
declare function createThumbnailLink(fileId: string, fileName: string, options: IThumbnailLinkOptions): string;
|
|
76
77
|
/**
|
package/dist/es/file.js
CHANGED
|
@@ -258,6 +258,7 @@ function createOriginalLink(fileId, fileName, options) {
|
|
|
258
258
|
* @param options.authToken {string} token 非必传
|
|
259
259
|
* @param options.scale {number} 缩略比
|
|
260
260
|
* @returns
|
|
261
|
+
* createThumbnailLink('1', 'z', { API_BASEURL: 1 })
|
|
261
262
|
*/
|
|
262
263
|
function createThumbnailLink(fileId, fileName, options) {
|
|
263
264
|
var API_BASEURL = options.API_BASEURL, authToken = options.authToken, _a = options.scale, scale = _a === void 0 ? 0.5 : _a;
|
package/dist/es/math.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type numType =
|
|
1
|
+
type numType = number | string;
|
|
2
2
|
/**
|
|
3
3
|
* 加法
|
|
4
4
|
*/
|
|
@@ -18,7 +18,7 @@ declare function divide(num1: numType, num2: numType): number;
|
|
|
18
18
|
/**
|
|
19
19
|
* 四舍五入保留小数
|
|
20
20
|
*/
|
|
21
|
-
declare function exactRound(num: numType, ratio: number):
|
|
21
|
+
declare function exactRound(num: numType, ratio: number): numType;
|
|
22
22
|
/**
|
|
23
23
|
* 将字节数加上合适的单位
|
|
24
24
|
* @param numBytes 字节数
|
package/package.json
CHANGED
package/src/file.ts
CHANGED
|
@@ -312,6 +312,7 @@ export function createOriginalLink(
|
|
|
312
312
|
* @param options.authToken {string} token 非必传
|
|
313
313
|
* @param options.scale {number} 缩略比
|
|
314
314
|
* @returns
|
|
315
|
+
* createThumbnailLink('1', 'z', { API_BASEURL: 1 })
|
|
315
316
|
*/
|
|
316
317
|
export function createThumbnailLink(
|
|
317
318
|
fileId: string,
|
package/src/math.ts
CHANGED