@form-create/utils
Advanced tools
Comparing version 1.0.11 to 1.0.15
{ | ||
"name": "@form-create/utils", | ||
"version": "1.0.11", | ||
"version": "1.0.15", | ||
"description": "", | ||
@@ -34,3 +34,3 @@ "main": "./src/index.js", | ||
}, | ||
"gitHead": "94ee8d2239eaef119ecdfc216dea7e476dc52d79" | ||
"gitHead": "e46919c12248d450ef195849672b97fa27a8bfeb" | ||
} |
@@ -91,3 +91,3 @@ import Vue from 'vue'; | ||
export function deepExtend(origin, target = {}) { | ||
export function deepExtend(origin, target = {}, mode) { | ||
let isArr = false; | ||
@@ -102,6 +102,15 @@ for (let key in target) { | ||
nst && $set(origin, key, []); | ||
} else if (clone._clone) { | ||
clone = clone._clone(); | ||
if (mode) { | ||
clone = clone.getRule(); | ||
nst && $set(origin, key, {}); | ||
} else { | ||
$set(origin, key, clone); | ||
continue; | ||
} | ||
} else { | ||
nst && $set(origin, key, {}); | ||
} | ||
deepExtend(origin[key], clone); | ||
deepExtend(origin[key], clone, mode); | ||
} else { | ||
@@ -108,0 +117,0 @@ $set(origin, key, clone); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7851
163