@yoooloo42/joker 1.0.164 → 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 +40 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +40 -22
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -22641,17 +22641,32 @@ function deepDefaults(target, source) {
|
|
|
22641
22641
|
}
|
|
22642
22642
|
return target;
|
|
22643
22643
|
}
|
|
22644
|
+
|
|
22645
|
+
// 替换对象中的内容,不改变指针
|
|
22646
|
+
function replaceObject(target, source) {
|
|
22647
|
+
// 清空 target 的所有自身属性(包括不可枚举和 Symbol)
|
|
22648
|
+
Reflect.ownKeys(target).forEach(key => delete target[key]);
|
|
22649
|
+
|
|
22650
|
+
if(!!source){
|
|
22651
|
+
// 将 source 的属性复制过去
|
|
22652
|
+
Object.assign(target, source);
|
|
22653
|
+
}
|
|
22654
|
+
|
|
22655
|
+
return target;
|
|
22656
|
+
}
|
|
22644
22657
|
var deepClone = {
|
|
22645
22658
|
deepClone: deepClone$1,
|
|
22646
22659
|
deepCloneAndMap,
|
|
22647
22660
|
typeOfValue,
|
|
22661
|
+
isObject,
|
|
22648
22662
|
isJsonString,
|
|
22649
22663
|
flattenTreeValues,
|
|
22650
22664
|
arrayToTree,
|
|
22651
22665
|
getLeafValue,
|
|
22652
22666
|
getNodeValue,
|
|
22653
22667
|
deepMerge,
|
|
22654
|
-
deepDefaults
|
|
22668
|
+
deepDefaults,
|
|
22669
|
+
replaceObject
|
|
22655
22670
|
};
|
|
22656
22671
|
|
|
22657
22672
|
var unclassified = {
|
|
@@ -22750,13 +22765,13 @@ const popupFind = async _ref5 => {
|
|
|
22750
22765
|
let {
|
|
22751
22766
|
scopeThis
|
|
22752
22767
|
} = _ref5;
|
|
22753
|
-
|
|
22768
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.query.formData);
|
|
22754
22769
|
scopeThis.tableData.query.sort = scopeThis.query && scopeThis.query.sort ? JSON.parse(JSON.stringify(scopeThis.query.sort)) : null;
|
|
22755
22770
|
scopeThis.tableData.query.pageSize = scopeThis.query && scopeThis.query.pageSize ? scopeThis.query.pageSize : ly0default$4.pageSize;
|
|
22756
22771
|
scopeThis.tableData.query.currentPage = scopeThis.query && scopeThis.query.currentPage ? scopeThis.query.currentPage : 1;
|
|
22757
|
-
|
|
22772
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.find.formProps);
|
|
22758
22773
|
// 弹出窗口
|
|
22759
|
-
|
|
22774
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22760
22775
|
visible: true
|
|
22761
22776
|
});
|
|
22762
22777
|
};
|
|
@@ -22766,10 +22781,10 @@ const popupInsertOne = async _ref6 => {
|
|
|
22766
22781
|
let {
|
|
22767
22782
|
scopeThis
|
|
22768
22783
|
} = _ref6;
|
|
22769
|
-
|
|
22770
|
-
|
|
22784
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.insertOne.formData);
|
|
22785
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.insertOne.formProps);
|
|
22771
22786
|
// 弹出窗口
|
|
22772
|
-
|
|
22787
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22773
22788
|
visible: true
|
|
22774
22789
|
});
|
|
22775
22790
|
};
|
|
@@ -22780,10 +22795,10 @@ const popupUpdateOne = async _ref7 => {
|
|
|
22780
22795
|
scopeThis,
|
|
22781
22796
|
formData
|
|
22782
22797
|
} = _ref7;
|
|
22783
|
-
|
|
22784
|
-
|
|
22798
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, formData); // 继承行记录的值
|
|
22799
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.UpdateOne.formProps);
|
|
22785
22800
|
// 弹出窗口
|
|
22786
|
-
|
|
22801
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22787
22802
|
visible: true
|
|
22788
22803
|
});
|
|
22789
22804
|
};
|
|
@@ -22794,10 +22809,10 @@ const popupDoc = async _ref8 => {
|
|
|
22794
22809
|
scopeThis,
|
|
22795
22810
|
formData
|
|
22796
22811
|
} = _ref8;
|
|
22797
|
-
|
|
22798
|
-
|
|
22812
|
+
unclassified.deepClone.replaceObject(scopeThis.formData, formData); // 继承行记录的值
|
|
22813
|
+
unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.doc.formProps);
|
|
22799
22814
|
// 弹出窗口
|
|
22800
|
-
|
|
22815
|
+
unclassified.deepClone.deepMerge(scopeThis.formProps.popup, {
|
|
22801
22816
|
visible: true
|
|
22802
22817
|
});
|
|
22803
22818
|
};
|
|
@@ -22808,9 +22823,9 @@ const submitFind = async _ref9 => {
|
|
|
22808
22823
|
scopeThis
|
|
22809
22824
|
} = _ref9;
|
|
22810
22825
|
scopeThis.query.formData = scopeThis.formData ? unclassified.deepClone.deepClone(scopeThis.formData) : null;
|
|
22811
|
-
scopeThis.query.sort = scopeThis.
|
|
22812
|
-
scopeThis.query.pageSize = scopeThis.
|
|
22813
|
-
scopeThis.query.currentPage = scopeThis.
|
|
22826
|
+
scopeThis.query.sort = scopeThis.tableData.query && scopeThis.tableData.query.sort ? JSON.parse(JSON.stringify(scopeThis.tableData.query.sort)) : null;
|
|
22827
|
+
scopeThis.query.pageSize = scopeThis.tableData.query && scopeThis.tableData.query.pageSize ? scopeThis.tableData.query.pageSize : ly0default$4.pageSize;
|
|
22828
|
+
scopeThis.query.currentPage = scopeThis.tableData.query && scopeThis.tableData.query.currentPage ? scopeThis.tableData.query.currentPage : 1;
|
|
22814
22829
|
const result = await refresh({
|
|
22815
22830
|
scopeThis
|
|
22816
22831
|
});
|
|
@@ -42475,12 +42490,15 @@ var ly0default$1 = {
|
|
|
42475
42490
|
modelValue: {
|
|
42476
42491
|
data: [],
|
|
42477
42492
|
total: 0,
|
|
42478
|
-
|
|
42479
|
-
|
|
42480
|
-
|
|
42481
|
-
|
|
42482
|
-
|
|
42483
|
-
|
|
42493
|
+
query: {
|
|
42494
|
+
formData: null,
|
|
42495
|
+
sort: {
|
|
42496
|
+
label: "",
|
|
42497
|
+
order: ""
|
|
42498
|
+
},
|
|
42499
|
+
pageSize: 10,
|
|
42500
|
+
currentPage: 1
|
|
42501
|
+
}
|
|
42484
42502
|
}
|
|
42485
42503
|
};
|
|
42486
42504
|
|