qidian-shared 1.0.25 → 1.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/qidian-shared.cjs.js +5 -1
- package/dist/qidian-shared.cjs.js.map +1 -1
- package/dist/qidian-shared.es.js +5 -1
- package/dist/qidian-shared.es.js.map +1 -1
- package/dist/qidian-shared.umd.js +5 -1
- package/dist/qidian-shared.umd.js.map +1 -1
- package/dist/utils/calc.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1331,6 +1331,9 @@ function toPrecision(num, precision = 0) {
|
|
|
1331
1331
|
const result = Math.round(Number(num) * 10 ** precision) / 10 ** precision;
|
|
1332
1332
|
return parseFloat(`${result}`);
|
|
1333
1333
|
}
|
|
1334
|
+
function padZero(value, length) {
|
|
1335
|
+
return String(value).padStart(length, "0");
|
|
1336
|
+
}
|
|
1334
1337
|
function toArr(target) {
|
|
1335
1338
|
if (Array.isArray(target)) return target;
|
|
1336
1339
|
if (isEmpty(target)) return [];
|
|
@@ -12085,7 +12088,7 @@ function useServiceLoadMore({
|
|
|
12085
12088
|
const res = { list: [], page: 1, total: 0 };
|
|
12086
12089
|
const paginationV = vue.unref(pagination);
|
|
12087
12090
|
const currentParams = paginationV !== false ? {
|
|
12088
|
-
pageNum: params?.page
|
|
12091
|
+
pageNum: isEmpty(params?.page) ? 1 : params.page + 1,
|
|
12089
12092
|
pageSize: params?.size ?? paginationV?.pageSize ?? 30
|
|
12090
12093
|
} : void 0;
|
|
12091
12094
|
if (currentParams?.pageNum === 1) firstLoad.value = true;
|
|
@@ -12453,6 +12456,7 @@ exports.isPromise = isPromise;
|
|
|
12453
12456
|
exports.kebabCase = kebabCase;
|
|
12454
12457
|
exports.noop = noop;
|
|
12455
12458
|
exports.objToStr = objToStr;
|
|
12459
|
+
exports.padZero = padZero;
|
|
12456
12460
|
exports.resize = resize;
|
|
12457
12461
|
exports.resizeDirective = resizeDirective;
|
|
12458
12462
|
exports.setUrlParam = setUrlParam;
|