render-core 1.0.38 → 1.0.40

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,6 +1,6 @@
1
1
  import { Controller } from "../../class/controller/controller";
2
2
  import { controllerCycleTypeTwo } from "../../library/lifecycle/controllerCycle";
3
- import { cmd } from "../../library/cmd/cmd";
3
+ import { afterCmd, cmd } from "../../library/cmd/cmd";
4
4
  import { mount } from "../../library/lifecycle/mount";
5
5
  import { injectRefs } from "../inject/inject";
6
6
  import { afterMethodsTypeOne } from "../../library/lifecycle/afterMethods";
@@ -29,6 +29,8 @@ export function post_render(proto, parent, child, link, tagTemplate) {
29
29
  //mount
30
30
  mount(controller, proto, parent, child, tagTemplate);
31
31
  injectRefs(controller, tagTemplate);
32
+ //渲染后处理
33
+ afterCmd(controller.root, controller.proto, controller);
32
34
  //afterRender
33
35
  var afterRender = proto.getAfterRender().bind(controller.raw_data);
34
36
  afterRender();
@@ -1,6 +1,6 @@
1
1
  import { Controller } from "../../class/controller/controller";
2
2
  import { controllerCycleTypeOne } from "../../library/lifecycle/controllerCycle";
3
- import { cmd } from "../../library/cmd/cmd";
3
+ import { afterCmd, cmd } from "../../library/cmd/cmd";
4
4
  import { mount } from "../../library/lifecycle/mount";
5
5
  import { injectRefs } from "../inject/inject";
6
6
  import { afterMethodsTypeOne } from "../../library/lifecycle/afterMethods";
@@ -30,6 +30,8 @@ export function init_render(proto, parent, child, link, tagTemplate) {
30
30
  mount(controller, proto, parent, child, tagTemplate);
31
31
  //获取
32
32
  injectRefs(controller, tagTemplate);
33
+ //渲染后处理
34
+ afterCmd(controller.root, proto, controller);
33
35
  //afterRender
34
36
  var afterRender = proto.getAfterRender().bind(controller.proxyForMethods);
35
37
  afterRender();
@@ -1,6 +1,6 @@
1
1
  import { Controller } from "../../class/controller/controller";
2
2
  import { controllerCycleTypeTwo } from "../../library/lifecycle/controllerCycle";
3
- import { cmd } from "../../library/cmd/cmd";
3
+ import { afterCmd, cmd } from "../../library/cmd/cmd";
4
4
  import { mount } from "../../library/lifecycle/mount";
5
5
  import { injectRefs } from "../inject/inject";
6
6
  import { afterMethodsTypeTwo } from "../../library/lifecycle/afterMethods";
@@ -29,6 +29,7 @@ export function raw_render(proto, parent, child, link, tagTemplate) {
29
29
  //mount
30
30
  mount(controller, proto, parent, child, tagTemplate);
31
31
  injectRefs(controller, tagTemplate);
32
+ afterCmd(tagTemplate, proto, controller);
32
33
  //afterRender
33
34
  var afterRender = proto.getAfterRender().bind(controller.raw_data);
34
35
  afterRender();
@@ -1,5 +1,5 @@
1
1
  import { bindModelForUpdater } from "../utility/miscUtility";
2
- import { cmdForUpdate } from "../../library/cmd/cmd";
2
+ import { afterCmd, cmdForUpdate } from "../../library/cmd/cmd";
3
3
  import { injectRefs } from "../inject/inject";
4
4
  import { findComponent } from "./delivery";
5
5
  import { getTemplate } from "../utility/templateUtility";
@@ -32,6 +32,8 @@ export function update_Render(controller) {
32
32
  controller.root.appendChild(tagTemplate.firstChild);
33
33
  }
34
34
  injectRefs(controller, tagTemplate);
35
+ //渲染后处理
36
+ afterCmd(controller.root, controller.proto, controller);
35
37
  //afterRender
36
38
  var afterRender = controller.proto.getAfterRender().bind(controller.raw_data);
37
39
  afterRender();
@@ -3,4 +3,5 @@ import { Controller } from "../../class/controller/controller";
3
3
  import { ApiController } from "../../class/controller/apiController";
4
4
  import ApiComponent from "../../class/component/apiComponent";
5
5
  export declare function cmd(tagTemplate: Element, proto: Component | ApiComponent, controller: Controller | ApiController): void;
6
+ export declare function afterCmd(templateSpace: ParentNode, proto: Component | ApiComponent, controller: Controller | ApiController): void;
6
7
  export declare function cmdForUpdate(tagTemplate: Element, proto: Component, controller: Controller | ApiController): void;
@@ -19,10 +19,12 @@ export function cmd(tagTemplate, proto, controller) {
19
19
  resolver_model(tagTemplate.children, controller.proxyForMethods);
20
20
  //渲染属性
21
21
  resolver_bind(tagTemplate.children, controller.proxyForMethods);
22
+ }
23
+ export function afterCmd(templateSpace, proto, controller) {
22
24
  //v-show
23
- resolver_show(tagTemplate.children, controller.proxyForMethods);
25
+ resolver_show(templateSpace.children, controller.proxyForMethods);
24
26
  //v-render
25
- resolver_render(tagTemplate.children, controller.proxyForMethods);
27
+ resolver_render(templateSpace.children, controller.proxyForMethods);
26
28
  }
27
29
  export function cmdForUpdate(tagTemplate, proto, controller) {
28
30
  //给所有元素添加上npm=tag标志
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "The core for render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",