Skip to content
This repository was archived by the owner on Jun 6, 2019. It is now read-only.
This repository was archived by the owner on Jun 6, 2019. It is now read-only.

渲染逻辑控制器- (Render Logic Control) #7

Open
@Tancy

Description

@Tancy

新版中文网站及文档已经上线,请访问 https://weex-project.io/cn/ , 此处后续不再维护,谢谢理解。

append

append属性没有做数据绑定的工作。它不会改变最终的渲染效果。但是此属性确定是以一整棵树或子节点的方式添加。

append 有两个关键属性,treenode,使用方法如下:

<template>
  <container>
    <container id="world" append="tree">
      <text>Hello World!</text>
    </container>
    <container id="weex" append="node">
      <text>Hello Weex!</text>
    </container>
  </container>
</template>

在上面的代码中,id为world的元素将等待其所有子元素渲染完成,才完全全部渲染。然而id为weex的元素只完成自身的渲染就会被呈现在页面上,其子元素渲染完成一个展示一个。

渲染结果显而易见,后者渲染方式会使第一次绘画的速度比前者快些,但是总体的渲染时间可能比 append="tree" 长些。

默认情况下,元素的呈现为 node 模式,只要元素是 tree的渲染方式,其子元素都将以 tree模式渲染。

下一节我们将介绍复合组件

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions