render-core 1.3.19 → 1.3.21
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.
|
@@ -101,16 +101,7 @@ var AppController = /** @class */ (function () {
|
|
|
101
101
|
return this.fields[field].data;
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
|
-
|
|
105
|
-
if (application.getField(field) == null) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
this.fields[field] = {
|
|
110
|
-
data: application.getField(field),
|
|
111
|
-
react: true
|
|
112
|
-
};
|
|
113
|
-
}
|
|
104
|
+
return null;
|
|
114
105
|
}
|
|
115
106
|
};
|
|
116
107
|
/**
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { status_read, status_write } from "../../index";
|
|
2
2
|
var ContextController = /** @class */ (function () {
|
|
3
3
|
function ContextController() {
|
|
4
|
-
this.fields = {
|
|
5
|
-
system_theme: {
|
|
6
|
-
data: "default",
|
|
7
|
-
react: true
|
|
8
|
-
}
|
|
9
|
-
};
|
|
4
|
+
this.fields = {};
|
|
10
5
|
}
|
|
11
6
|
ContextController.prototype.saveFields = function (fields) {
|
|
12
7
|
for (var fieldsKey in fields) {
|
|
@@ -60,8 +55,16 @@ var ContextController = /** @class */ (function () {
|
|
|
60
55
|
type: "session",
|
|
61
56
|
fields: data
|
|
62
57
|
});
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
if (this.fields[field]) {
|
|
59
|
+
//更新数据
|
|
60
|
+
this.loadFields();
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.fields[field] = {
|
|
64
|
+
data: value,
|
|
65
|
+
react: true
|
|
66
|
+
};
|
|
67
|
+
}
|
|
65
68
|
//数据回调
|
|
66
69
|
if (this.fields[field].callback) {
|
|
67
70
|
// @ts-ignore
|
|
@@ -86,6 +89,7 @@ var ContextController = /** @class */ (function () {
|
|
|
86
89
|
data: application.getField(field),
|
|
87
90
|
react: true
|
|
88
91
|
};
|
|
92
|
+
return this.fields[field].data;
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
};
|