@whitesev/utils 2.1.0 → 2.1.1
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/index.amd.js +5 -4
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +5 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +5 -4
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +5 -4
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +5 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +2 -2
- package/dist/types/src/{UtilsWindowApi.d.ts → WindowApi.d.ts} +1 -1
- package/package.json +1 -1
- package/src/Utils.ts +14 -11
- package/src/{UtilsWindowApi.ts → WindowApi.ts} +1 -1
package/dist/index.amd.js
CHANGED
|
@@ -3482,7 +3482,7 @@ define((function () { 'use strict';
|
|
|
3482
3482
|
}
|
|
3483
3483
|
}
|
|
3484
3484
|
|
|
3485
|
-
class
|
|
3485
|
+
class WindowApi {
|
|
3486
3486
|
/** 默认的配置 */
|
|
3487
3487
|
defaultApi = {
|
|
3488
3488
|
document: document,
|
|
@@ -3519,10 +3519,10 @@ define((function () { 'use strict';
|
|
|
3519
3519
|
class Utils {
|
|
3520
3520
|
windowApi;
|
|
3521
3521
|
constructor(option) {
|
|
3522
|
-
this.windowApi = new
|
|
3522
|
+
this.windowApi = new WindowApi(option);
|
|
3523
3523
|
}
|
|
3524
3524
|
/** 版本号 */
|
|
3525
|
-
version = "2024.7.
|
|
3525
|
+
version = "2024.7.24";
|
|
3526
3526
|
addStyle(cssText) {
|
|
3527
3527
|
if (typeof cssText !== "string") {
|
|
3528
3528
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|
|
@@ -5832,7 +5832,8 @@ define((function () { 'use strict';
|
|
|
5832
5832
|
if (Array.isArray(data)) {
|
|
5833
5833
|
data.sort(sortFunc);
|
|
5834
5834
|
}
|
|
5835
|
-
else if (data instanceof NodeList ||
|
|
5835
|
+
else if (data instanceof NodeList ||
|
|
5836
|
+
UtilsContext.isJQuery(data)) {
|
|
5836
5837
|
sortNodeFunc(data, getDataFunc);
|
|
5837
5838
|
result = getDataFunc();
|
|
5838
5839
|
}
|