@whitesev/pops 1.1.0 → 1.2.0
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 +11 -3
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +11 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +11 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +11 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +11 -3
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +11 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +41 -41
package/dist/index.esm.js
CHANGED
|
@@ -1489,6 +1489,12 @@ class PopsUtils {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
assign(target = {}, source = {}, isAdd = false) {
|
|
1491
1491
|
let UtilsContext = this;
|
|
1492
|
+
if (source == null) {
|
|
1493
|
+
return target;
|
|
1494
|
+
}
|
|
1495
|
+
if (target == null) {
|
|
1496
|
+
target = {};
|
|
1497
|
+
}
|
|
1492
1498
|
if (Array.isArray(source)) {
|
|
1493
1499
|
let canTraverse = source.filter((item) => {
|
|
1494
1500
|
return typeof item === "object";
|
|
@@ -1502,8 +1508,9 @@ class PopsUtils {
|
|
|
1502
1508
|
const targetKeyName = sourceKeyName;
|
|
1503
1509
|
let targetValue = target[targetKeyName];
|
|
1504
1510
|
let sourceValue = source[sourceKeyName];
|
|
1505
|
-
if (
|
|
1506
|
-
|
|
1511
|
+
if (typeof sourceValue === "object" &&
|
|
1512
|
+
sourceValue != null &&
|
|
1513
|
+
sourceKeyName in target &&
|
|
1507
1514
|
!UtilsContext.isDOM(sourceValue)) {
|
|
1508
1515
|
/* 源端的值是object类型,且不是元素节点 */
|
|
1509
1516
|
target[sourceKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
|
|
@@ -1518,6 +1525,7 @@ class PopsUtils {
|
|
|
1518
1525
|
let targetValue = target[targetKeyName];
|
|
1519
1526
|
let sourceValue = source[targetKeyName];
|
|
1520
1527
|
if (typeof sourceValue === "object" &&
|
|
1528
|
+
sourceValue != null &&
|
|
1521
1529
|
!UtilsContext.isDOM(sourceValue) &&
|
|
1522
1530
|
Object.keys(sourceValue).length) {
|
|
1523
1531
|
/* 源端的值是object类型,且不是元素节点 */
|
|
@@ -9915,7 +9923,7 @@ class Pops {
|
|
|
9915
9923
|
/** 配置 */
|
|
9916
9924
|
config = {
|
|
9917
9925
|
/** 版本号 */
|
|
9918
|
-
version: "2024.7.
|
|
9926
|
+
version: "2024.7.14",
|
|
9919
9927
|
cssText: {
|
|
9920
9928
|
/** 主CSS */
|
|
9921
9929
|
index: indexCSS,
|