render-core 1.0.122 → 1.0.124

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.
@@ -15,6 +15,7 @@ export declare class AppController implements AppTip {
15
15
  * @private
16
16
  */
17
17
  loadFileds(): void;
18
+ storeFileds(): void;
18
19
  setFiled(filed: string, value: any): void;
19
20
  /**
20
21
  * 获取数据
@@ -49,6 +49,16 @@ var AppController = /** @class */ (function () {
49
49
  }
50
50
  }
51
51
  };
52
+ AppController.prototype.storeFileds = function () {
53
+ for (var filedsKey in this.fileds) {
54
+ var data = {};
55
+ Reflect.set(data, filedsKey, this.fileds[filedsKey]);
56
+ status_write({
57
+ type: "local",
58
+ fields: data
59
+ });
60
+ }
61
+ };
52
62
  AppController.prototype.setFiled = function (filed, value) {
53
63
  //写入数
54
64
  status_write({
@@ -4,6 +4,7 @@ export declare class ContextController {
4
4
  constructor();
5
5
  saveFileds(fileds: {}): void;
6
6
  loadFileds(): void;
7
+ storeFileds(): void;
7
8
  /**
8
9
  * 写入数据
9
10
  * @param filed
@@ -39,6 +39,16 @@ var ContextController = /** @class */ (function () {
39
39
  }
40
40
  }
41
41
  };
42
+ ContextController.prototype.storeFileds = function () {
43
+ for (var filedsKey in this.fileds) {
44
+ var data = {};
45
+ Reflect.set(data, filedsKey, this.fileds[filedsKey]);
46
+ status_write({
47
+ type: "session",
48
+ fields: data
49
+ });
50
+ }
51
+ };
42
52
  /**
43
53
  * 写入数据
44
54
  * @param filed
@@ -37,7 +37,7 @@ export function themeStyle(component, styleLib) {
37
37
  */
38
38
  export function styleResolve(tag) {
39
39
  // @ts-ignore
40
- var theme = window.context.getFiled("theme");
40
+ var theme = window.context.getFiled("system_theme");
41
41
  if (Reflect.get(window, "styleLib").get(tag.toUpperCase()).get(theme) === undefined) {
42
42
  console.log("tag:" + tag + " has no theme " + theme);
43
43
  if (Reflect.get(window, "styleLib").get(tag.toUpperCase()).get("default") === undefined) {
package/index.js CHANGED
@@ -26,6 +26,7 @@ var RenderJS = /** @class */ (function () {
26
26
  */
27
27
  RenderJS.prototype.configApp = function (config) {
28
28
  this.application.saveFileds(config);
29
+ this.application.storeFileds();
29
30
  this.application.loadFileds();
30
31
  };
31
32
  /**
@@ -34,6 +35,7 @@ var RenderJS = /** @class */ (function () {
34
35
  */
35
36
  RenderJS.prototype.configContext = function (cinfig) {
36
37
  this.context.saveFileds(cinfig);
38
+ this.context.storeFileds();
37
39
  this.context.loadFileds();
38
40
  };
39
41
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.0.122",
3
+ "version": "1.0.124",
4
4
  "description": "The core of render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",