efront 3.9.4 → 3.9.8
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/apps/pivot/api.yml
CHANGED
package/coms/layer/glance.less
CHANGED
package/coms/zimoli/data.js
CHANGED
|
@@ -621,7 +621,7 @@ function responseCrash(e, data) {
|
|
|
621
621
|
}
|
|
622
622
|
error_report(data.error_message, e.status < 500 ? 'warn' : 'error');
|
|
623
623
|
}
|
|
624
|
-
|
|
624
|
+
var getData = function () { return this.data };
|
|
625
625
|
var data = {
|
|
626
626
|
decodeStructure,
|
|
627
627
|
encodeStructure,
|
|
@@ -898,12 +898,11 @@ var data = {
|
|
|
898
898
|
getInstance(instanceId, onlyFromLocalStorage = false) {
|
|
899
899
|
if (!instanceDataMap[instanceId]) {
|
|
900
900
|
var data = getItem(instanceId, onlyFromLocalStorage);
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
instanceDataMap[instanceId] = data;
|
|
901
|
+
var instance = new LoadingArray;
|
|
902
|
+
this.rebuildInstance(instance, data);
|
|
903
|
+
instance.is_loading = false;
|
|
904
|
+
instance.is_loaded = true;
|
|
905
|
+
instanceDataMap[instanceId] = instance;
|
|
907
906
|
}
|
|
908
907
|
return instanceDataMap[instanceId];
|
|
909
908
|
|
|
@@ -947,7 +946,7 @@ var data = {
|
|
|
947
946
|
*/
|
|
948
947
|
setInstance(instanceId, data, rememberWithStorage = 0) {
|
|
949
948
|
const instance = this.getInstance(instanceId);
|
|
950
|
-
if (isObject(
|
|
949
|
+
if (isObject(instance)) {
|
|
951
950
|
this.rebuildInstance(instance, data);
|
|
952
951
|
} else {
|
|
953
952
|
instanceDataMap[instanceId] = data;
|
|
@@ -1005,7 +1004,8 @@ var data = {
|
|
|
1005
1004
|
},
|
|
1006
1005
|
rebuildInstance(instance, data, old = instance) {
|
|
1007
1006
|
if (instance === data) return;
|
|
1008
|
-
if (!isObject(instance)
|
|
1007
|
+
if (!isObject(instance)) throw new Error("只支持object类型的数据!");
|
|
1008
|
+
if (!isObject(data)) data = { data }, data.toString = data.valueOf = getData;
|
|
1009
1009
|
if (instance instanceof Array) instance.splice(0, instance.length);
|
|
1010
1010
|
var sample = new LoadingArray;
|
|
1011
1011
|
Object.keys(old).forEach(function (k) {
|