render-core 1.0.34 → 1.0.35

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.
@@ -1,7 +1,7 @@
1
1
  interface RenderBase {
2
2
  getName(): string;
3
3
  getTemplate(): string;
4
- getBoxStyle(): {};
4
+ getBoxStyle(): string;
5
5
  getProps(): {};
6
6
  getData(): {};
7
7
  getComputed(): {};
@@ -32,7 +32,7 @@ export declare class Component implements RenderBase {
32
32
  constructor(config: {
33
33
  name: string;
34
34
  template: string;
35
- boxStyle?: {};
35
+ boxStyle?: string;
36
36
  props?: {} | string[];
37
37
  data?: {};
38
38
  computed?: {};
@@ -47,7 +47,7 @@ export declare class Component implements RenderBase {
47
47
  });
48
48
  getName(): string;
49
49
  getTemplate(): string;
50
- getBoxStyle(): {};
50
+ getBoxStyle(): string;
51
51
  getProps(): {};
52
52
  getData(): {};
53
53
  getMethods(): {};
@@ -6,7 +6,7 @@ var Component = /** @class */ (function () {
6
6
  this.template = config.template;
7
7
  //添加box样式
8
8
  if (typeof config.boxStyle === "undefined") {
9
- this.boxStyle = {};
9
+ this.boxStyle = "";
10
10
  }
11
11
  else {
12
12
  this.boxStyle = config.boxStyle;
@@ -33,9 +33,7 @@ export function init_render(proto, parent, child, link, tagTemplate) {
33
33
  //mount
34
34
  var renderSpace = document.createElement("div");
35
35
  //给box添加样式
36
- for (var boxStyleKey in proto.getBoxStyle()) {
37
- renderSpace["style"].setProperty(boxStyleKey, proto.getBoxStyle()[boxStyleKey]);
38
- }
36
+ renderSpace.setAttribute("style", proto.getBoxStyle());
39
37
  //指定渲染空间
40
38
  controller.root = renderSpace;
41
39
  //开始渲染
@@ -83,9 +81,7 @@ export function post_render(proto, parent, child, link, tagTemplate) {
83
81
  //mount
84
82
  var renderSpace = document.createElement("div");
85
83
  //给box添加样式
86
- for (var boxStyleKey in proto.getBoxStyle()) {
87
- renderSpace["style"].setProperty(boxStyleKey, proto.getBoxStyle()[boxStyleKey]);
88
- }
84
+ renderSpace.setAttribute("style", proto.getBoxStyle());
89
85
  //指定渲染空间
90
86
  controller.root = renderSpace;
91
87
  //开始渲染
@@ -132,9 +128,7 @@ export function raw_render(proto, parent, child, link, tagTemplate) {
132
128
  //mount
133
129
  var renderSpace = document.createElement("div");
134
130
  //给box添加样式
135
- for (var boxStyleKey in proto.getBoxStyle()) {
136
- renderSpace["style"].setProperty(boxStyleKey, proto.getBoxStyle()[boxStyleKey]);
137
- }
131
+ renderSpace.setAttribute("style", proto.getBoxStyle());
138
132
  //指定渲染空间
139
133
  controller.root = renderSpace;
140
134
  //开始渲染
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "The core for render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",