render-core 1.3.13 → 1.3.14
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.
|
@@ -7,7 +7,10 @@ var AppController = /** @class */ (function () {
|
|
|
7
7
|
//系统变量
|
|
8
8
|
function AppController() {
|
|
9
9
|
this.fields = {
|
|
10
|
-
system_theme:
|
|
10
|
+
system_theme: {
|
|
11
|
+
data: "default",
|
|
12
|
+
react: true
|
|
13
|
+
}
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
@@ -49,7 +52,7 @@ var AppController = /** @class */ (function () {
|
|
|
49
52
|
AppController.prototype.storeFields = function () {
|
|
50
53
|
for (var fieldsKey in this.fields) {
|
|
51
54
|
var data = {};
|
|
52
|
-
Reflect.set(data, fieldsKey, this.fields[fieldsKey]);
|
|
55
|
+
Reflect.set(data, fieldsKey, this.fields[fieldsKey]["data"]);
|
|
53
56
|
status_write({
|
|
54
57
|
type: "local",
|
|
55
58
|
fields: data
|
|
@@ -72,7 +75,7 @@ var AppController = /** @class */ (function () {
|
|
|
72
75
|
//更新数据
|
|
73
76
|
this.loadFields();
|
|
74
77
|
//执行回调
|
|
75
|
-
if (this.fields[field].
|
|
78
|
+
if (this.fields[field].callback) {
|
|
76
79
|
// @ts-ignore
|
|
77
80
|
this.fileds[filed].callback(value, window.context);
|
|
78
81
|
}
|
|
@@ -2,7 +2,10 @@ import { status_read, status_write } from "../../index";
|
|
|
2
2
|
var ContextController = /** @class */ (function () {
|
|
3
3
|
function ContextController() {
|
|
4
4
|
this.fields = {
|
|
5
|
-
system_theme:
|
|
5
|
+
system_theme: {
|
|
6
|
+
data: "default",
|
|
7
|
+
react: true
|
|
8
|
+
}
|
|
6
9
|
};
|
|
7
10
|
}
|
|
8
11
|
ContextController.prototype.saveFields = function (fields) {
|
|
@@ -33,7 +36,7 @@ var ContextController = /** @class */ (function () {
|
|
|
33
36
|
ContextController.prototype.storeFields = function () {
|
|
34
37
|
for (var fieldsKey in this.fields) {
|
|
35
38
|
var data = {};
|
|
36
|
-
Reflect.set(data, fieldsKey, this.fields[fieldsKey]);
|
|
39
|
+
Reflect.set(data, fieldsKey, this.fields[fieldsKey]["data"]);
|
|
37
40
|
status_write({
|
|
38
41
|
type: "session",
|
|
39
42
|
fields: data
|
|
@@ -57,7 +60,7 @@ var ContextController = /** @class */ (function () {
|
|
|
57
60
|
// @ts-ignore
|
|
58
61
|
this.loadfields();
|
|
59
62
|
//数据回调
|
|
60
|
-
if (this.fields[field].
|
|
63
|
+
if (this.fields[field].callback) {
|
|
61
64
|
// @ts-ignore
|
|
62
65
|
this.fields[field].callback(value, window.appSite);
|
|
63
66
|
}
|
package/func/Theme.js
CHANGED
|
@@ -17,10 +17,7 @@ export function changeSessionTheme(theme) {
|
|
|
17
17
|
data: theme,
|
|
18
18
|
react: true,
|
|
19
19
|
callback: function (value, context) {
|
|
20
|
-
context.setFiled("system_theme",
|
|
21
|
-
data: value,
|
|
22
|
-
react: false
|
|
23
|
-
});
|
|
20
|
+
context.setFiled("system_theme", theme);
|
|
24
21
|
}
|
|
25
22
|
});
|
|
26
23
|
changeTheme(application.getField("system_theme"));
|
|
@@ -31,15 +28,6 @@ export function changeSessionTheme(theme) {
|
|
|
31
28
|
*/
|
|
32
29
|
export function changeApplicationTheme(theme) {
|
|
33
30
|
var application = Reflect.get(window, "appSite");
|
|
34
|
-
application.setField("system_theme",
|
|
35
|
-
data: theme,
|
|
36
|
-
react: true,
|
|
37
|
-
callback: function (value, context) {
|
|
38
|
-
context.setFiled("system_theme", {
|
|
39
|
-
data: value,
|
|
40
|
-
react: false
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
});
|
|
31
|
+
application.setField("system_theme", theme);
|
|
44
32
|
changeTheme(application.getField("system_theme"));
|
|
45
33
|
}
|