@yoooloo42/joker 1.0.165 → 1.0.166
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.cjs.js +28 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +28 -13
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -22637,17 +22637,32 @@ function deepDefaults(target, source) {
|
|
|
22637
22637
|
}
|
|
22638
22638
|
return target;
|
|
22639
22639
|
}
|
|
22640
|
+
|
|
22641
|
+
// 替换对象中的内容,不改变指针
|
|
22642
|
+
function replaceObject(target, source) {
|
|
22643
|
+
// 清空 target 的所有自身属性(包括不可枚举和 Symbol)
|
|
22644
|
+
Reflect.ownKeys(target).forEach(key => delete target[key]);
|
|
22645
|
+
|
|
22646
|
+
if(!!source){
|
|
22647
|
+
// 将 source 的属性复制过去
|
|
22648
|
+
Object.assign(target, source);
|
|
22649
|
+
}
|
|
22650
|
+
|
|
22651
|
+
return target;
|
|
22652
|
+
}
|
|
22640
22653
|
var deepClone = {
|
|
22641
22654
|
deepClone: deepClone$1,
|
|
22642
22655
|
deepCloneAndMap,
|
|
22643
22656
|
typeOfValue,
|
|
22657
|
+
isObject,
|
|
22644
22658
|
isJsonString,
|
|
22645
22659
|
flattenTreeValues,
|
|
22646
22660
|
arrayToTree,
|
|
22647
22661
|
getLeafValue,
|
|
22648
22662
|
getNodeValue,
|
|
22649
22663
|
deepMerge,
|
|
22650
|
-
deepDefaults
|
|
22664
|
+
deepDefaults,
|
|
22665
|
+
replaceObject
|
|
22651
22666
|
};
|
|
22652
22667
|
|
|
22653
22668
|
var unclassified = {
|
|
@@ -22746,13 +22761,13 @@ const popupFind = async _ref5 => {
|
|
|
22746
22761
|
let {
|
|
22747
22762
|
scopeThis
|
|
22748
22763
|
} = _ref5;
|
|
22749
|
-
|
|
22764
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.query.formData);
|
|
22750
22765
|
scopeThis.tableData.query.sort = scopeThis.query && scopeThis.query.sort ? JSON.parse(JSON.stringify(scopeThis.query.sort)) : null;
|
|
22751
22766
|
scopeThis.tableData.query.pageSize = scopeThis.query && scopeThis.query.pageSize ? scopeThis.query.pageSize : ly0default$4.pageSize;
|
|
22752
22767
|
scopeThis.tableData.query.currentPage = scopeThis.query && scopeThis.query.currentPage ? scopeThis.query.currentPage : 1;
|
|
22753
|
-
|
|
22768
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.find.formProps);
|
|
22754
22769
|
// 弹出窗口
|
|
22755
|
-
|
|
22770
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22756
22771
|
visible: true
|
|
22757
22772
|
});
|
|
22758
22773
|
};
|
|
@@ -22762,10 +22777,10 @@ const popupInsertOne = async _ref6 => {
|
|
|
22762
22777
|
let {
|
|
22763
22778
|
scopeThis
|
|
22764
22779
|
} = _ref6;
|
|
22765
|
-
|
|
22766
|
-
|
|
22780
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.insertOne.formData);
|
|
22781
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.insertOne.formProps);
|
|
22767
22782
|
// 弹出窗口
|
|
22768
|
-
|
|
22783
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22769
22784
|
visible: true
|
|
22770
22785
|
});
|
|
22771
22786
|
};
|
|
@@ -22776,10 +22791,10 @@ const popupUpdateOne = async _ref7 => {
|
|
|
22776
22791
|
scopeThis,
|
|
22777
22792
|
formData
|
|
22778
22793
|
} = _ref7;
|
|
22779
|
-
|
|
22780
|
-
|
|
22794
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, formData); // 继承行记录的值
|
|
22795
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.UpdateOne.formProps);
|
|
22781
22796
|
// 弹出窗口
|
|
22782
|
-
|
|
22797
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22783
22798
|
visible: true
|
|
22784
22799
|
});
|
|
22785
22800
|
};
|
|
@@ -22790,10 +22805,10 @@ const popupDoc = async _ref8 => {
|
|
|
22790
22805
|
scopeThis,
|
|
22791
22806
|
formData
|
|
22792
22807
|
} = _ref8;
|
|
22793
|
-
|
|
22794
|
-
|
|
22808
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, formData); // 继承行记录的值
|
|
22809
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.doc.formProps);
|
|
22795
22810
|
// 弹出窗口
|
|
22796
|
-
|
|
22811
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22797
22812
|
visible: true
|
|
22798
22813
|
});
|
|
22799
22814
|
};
|