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

特殊元素 #36

Open
lvscar opened this issue Jun 29, 2016 · 4 comments
Open

特殊元素 #36

lvscar opened this issue Jun 29, 2016 · 4 comments

Comments

@lvscar
Copy link

lvscar commented Jun 29, 2016

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

特殊元素

原文链接

<content>

在组合模板中,这个元素作为填充内容替代元素使用,它自身会被填充内容替代。

别名: <slot>

代码示例

<we-element name="item">
  <template>
    <div>
      <content></content>
    </div>
  </template>
</we-element>

<template>
  <div>
    <item>
      <text>Content Text</text>
    </item>
  </div>
</template>
@taotao4840
Copy link

Content Text

@xl20071926
Copy link

没明白这个有什么用? 把content 换成text 也是一样的结果

@yundongbot
Copy link

@yundongbot
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants