rtcpts 0.0.26 → 0.0.27
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/j-q-table/pagination.d.ts +20 -19
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +222 -211
- package/dist/utils/tool.d.ts +14 -0
- package/package.json +1 -1
package/dist/utils/tool.d.ts
CHANGED
|
@@ -98,4 +98,18 @@ export declare function defaultAutoDataFormat(fallbackValue?: string, options?:
|
|
|
98
98
|
digits?: number;
|
|
99
99
|
unit?: TSizeUnit;
|
|
100
100
|
}): (val: any, row: any) => any;
|
|
101
|
+
/**
|
|
102
|
+
* 流量单位转换函数,支持 B、KB、MB、GB、TB 之间的任意转换
|
|
103
|
+
* @param value 要转换的数值
|
|
104
|
+
* @param fromUnit 源单位
|
|
105
|
+
* @param toUnit 目标单位
|
|
106
|
+
* @param options 配置项
|
|
107
|
+
* @param options.digits 保留小数位数,默认为 2
|
|
108
|
+
* @param options.showUnit 是否显示单位,默认为 true
|
|
109
|
+
* @returns 转换后的字符串或数字
|
|
110
|
+
*/
|
|
111
|
+
export declare function convertDataUnit(value: number | string, fromUnit: TSizeUnit, toUnit: TSizeUnit, options?: {
|
|
112
|
+
digits?: number;
|
|
113
|
+
showUnit?: boolean;
|
|
114
|
+
}): string | number;
|
|
101
115
|
export {};
|
package/package.json
CHANGED