You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2017/03/10 10:07:40 UTC

[02/51] [partial] incubator-weex-site git commit: Site updated: 2017-03-10 18:07:21

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/95bb2077/cn/v-0.10/guide/syntax/data-binding.html
----------------------------------------------------------------------
diff --git a/cn/v-0.10/guide/syntax/data-binding.html b/cn/v-0.10/guide/syntax/data-binding.html
new file mode 100644
index 0000000..7fa897f
--- /dev/null
+++ b/cn/v-0.10/guide/syntax/data-binding.html
@@ -0,0 +1,579 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  
+  <title>\u6570\u636e\u7ed1\u5b9a | Weex</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+  <meta name="description" content="\u6570\u636e\u7ed1\u5b9aWeex\u4f7f\u7528 mustache \u7684\u8bed\u6cd5 ({{...}}) \u6765\u5bf9 &amp;lt;template&amp;gt; \u4e2d\u7684\u6a21\u677f\u548c &amp;lt;script&amp;gt; \u91cc\u7684\u6570\u636e\u8fdb\u884c\u7ed1\u5b9a. \u4e00\u65e6\u6570\u636e\u989d\u6a21\u677f\u7ed1\u5b9a\u4e86, \u6570\u636e\u4e0a\u7684\u4fee\u6539\u4f1a\u5b9e\u65f6\u7684\u5728\u6a21\u677f\u5185\u5bb9\u4e2d\u751f\u6548\u3002
+\u6570\u636e\u7ed1\u5b9a\u8def\u5f84&amp;lt;template&amp;gt;  &amp;lt;div&amp;gt;    &amp;lt;text style=&quot;font-size: &amp;#123;&amp;#123;size&amp;">
+<meta property="og:type" content="website">
+<meta property="og:title" content="\u6570\u636e\u7ed1\u5b9a">
+<meta property="og:url" content="https://weex.apache.org/cn/v-0.10/guide/syntax/data-binding.html">
+<meta property="og:site_name" content="Weex">
+<meta property="og:description" content="\u6570\u636e\u7ed1\u5b9aWeex\u4f7f\u7528 mustache \u7684\u8bed\u6cd5 ({{...}}) \u6765\u5bf9 &amp;lt;template&amp;gt; \u4e2d\u7684\u6a21\u677f\u548c &amp;lt;script&amp;gt; \u91cc\u7684\u6570\u636e\u8fdb\u884c\u7ed1\u5b9a. \u4e00\u65e6\u6570\u636e\u989d\u6a21\u677f\u7ed1\u5b9a\u4e86, \u6570\u636e\u4e0a\u7684\u4fee\u6539\u4f1a\u5b9e\u65f6\u7684\u5728\u6a21\u677f\u5185\u5bb9\u4e2d\u751f\u6548\u3002
+\u6570\u636e\u7ed1\u5b9a\u8def\u5f84&amp;lt;template&amp;gt;  &amp;lt;div&amp;gt;    &amp;lt;text style=&quot;font-size: &amp;#123;&amp;#123;size&amp;">
+<meta property="og:updated_time" content="2017-02-24T16:39:42.000Z">
+<meta name="twitter:card" content="summary">
+<meta name="twitter:title" content="\u6570\u636e\u7ed1\u5b9a">
+<meta name="twitter:description" content="\u6570\u636e\u7ed1\u5b9aWeex\u4f7f\u7528 mustache \u7684\u8bed\u6cd5 ({{...}}) \u6765\u5bf9 &amp;lt;template&amp;gt; \u4e2d\u7684\u6a21\u677f\u548c &amp;lt;script&amp;gt; \u91cc\u7684\u6570\u636e\u8fdb\u884c\u7ed1\u5b9a. \u4e00\u65e6\u6570\u636e\u989d\u6a21\u677f\u7ed1\u5b9a\u4e86, \u6570\u636e\u4e0a\u7684\u4fee\u6539\u4f1a\u5b9e\u65f6\u7684\u5728\u6a21\u677f\u5185\u5bb9\u4e2d\u751f\u6548\u3002
+\u6570\u636e\u7ed1\u5b9a\u8def\u5f84&amp;lt;template&amp;gt;  &amp;lt;div&amp;gt;    &amp;lt;text style=&quot;font-size: &amp;#123;&amp;#123;size&amp;">
+  
+    <link rel="alternate" href="/atom.xml" title="Weex" type="application/atom+xml">
+  
+  
+    <link rel="icon" href="//gw.alicdn.com/tps/TB1XNqxPXXXXXcSXVXXXXXXXXXX-64-63.png">
+  
+  
+    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
+  
+  <link rel="stylesheet" href="/css/style.css">
+  <link rel="stylesheet" href="/css/swiper.min.css">
+</head>
+
+<body id="guide" class="lang-cn">
+  
+  <script>
+    window.PAGE_TYPE = "guide";
+    window.ROOT = "/"
+  </script>
+  <header id="header">
+  <div class="navbar">
+    <a id="logo" href="/cn/">
+      <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+    </a>
+    <div class="main-nav">
+      <ul class="links">
+        <li><a href="/cn/guide">\u6559\u7a0b</a></li>
+        <li><a href="/cn/references">\u624b\u518c</a></li>
+        <li><a href="/cn/faq.html">FAQ</a></li>
+        <li class="dropdown">
+            <a href="javascript:;">\u4e0b\u8f7d</a>
+            <ul class="dropdown-menu subnav">
+              <li>
+                <a href="/cn/playground.html">Playground</a>
+              </li>
+              <li>
+                <a href="https://www.npmjs.com/package/weex-devtool" target="_blank">Devtool</a>
+              </li>
+              <li>
+                <a href="https://www.npmjs.com/package/weexpack" target="_blank">Weexpack</a>
+              </li>
+              <li>
+                <a href="http://dotwe.org" target="_blank">Snippets</a>
+              </li>
+              <li>
+                <a href="https://market.weex-project.io/" target="_blank">Market</a>
+              </li>
+            </ul>
+        </li>
+      </ul>
+      <ul class="info">
+        <li><a href="https://github.com/alibaba/weex/" target="_blank"><span class="btn-github iconfont icon-github"></span></a></li>
+      </ul>
+      <ul class="tools">
+        <li>
+          <div class="search">
+  <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <span class="iconfont icon-search"></span>
+  </form>
+  <div class="results-panel">
+  </div>
+</div>
+        </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/v-0.10/guide/syntax/data-binding.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/data-binding.html" data-lang="zh-cn">\u4e2d\u6587</a>
+              </li>
+            </ul>
+          </div>
+        </li>
+        <!--<li></li>-->
+      </ul>
+    </div>
+  </div>
+  <div id="mobile-nav">
+    <a id="logo" href="/cn/">
+      <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+    </a>
+    <a class="btn-menu"><span class="iconfont icon-nav"></span></a>
+  </div>
+</header>
+  <div id="sidebar" class="">
+  <div class="sidebar-menu">
+    
+      <div class="search">
+  <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <span class="iconfont icon-search"></span>
+  </form>
+  <div class="results-panel">
+  </div>
+</div>
+      
+
+
+<div class="summary">
+  <h2 class="part-title">
+    
+      \u6559\u7a0b
+    
+  </h2>
+  <ul class="doc-summary">
+    
+    
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+   
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link  ">\u4e0a\u624b\u6559\u7a0b</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/develop-on-your-local-machine.html" class="sidebar-link  ">\u5982\u4f55\u5728\u672c\u5730\u5f00\u53d1 Weex \u9875\u9762</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/syntax/index.html" class="sidebar-link  ">\u8bed\u6cd5\u4ecb\u7ecd</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/data-binding.html" class="sidebar-link current ">\u6570\u636e\u7ed1\u5b9a</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/style-n-class.html" class="sidebar-link  ">CSS \u6837\u5f0f\u548c\u7c7b</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/events.html" class="sidebar-link  ">\u4e8b\u4ef6\u5904\u7406</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/display-logic.html" class="sidebar-link  ">\u5c55\u793a\u903b\u8f91\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/render-logic.html" class="sidebar-link  ">\u6e32\u67d3\u8fc7\u7a0b\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/composed-component.html" class="sidebar-link  ">\u7ec4\u4ef6\u5c01\u88c5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/id.html" class="sidebar-link  ">\u627e\u8282\u70b9</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/comm.html" class="sidebar-link  ">\u7ec4\u4ef6\u901a\u4fe1</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/config-n-data.html" class="sidebar-link  ">\u9875\u9762\u914d\u7f6e\u548c\u9875\u9762\u6570\u636e</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/how-to/index.html" class="sidebar-link  ">\u4f7f\u7528 Devtools \u8c03\u8bd5 Weex \u9875\u9762</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/debug-with-html5.html" class="sidebar-link  ">\u5728\u6d4f\u89c8\u5668\u4e2d\u8c03\u8bd5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/require-3rd-party-libs.html" class="sidebar-link  ">\u5982\u4f55\u5f15\u5165\u7b2c\u4e09\u65b9\u5e93</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/transform-code-into-js-bundle.html" class="sidebar-link  ">\u5c06 `.we` \u6e90\u4ee3\u7801\u8f6c\u6362\u6210 JS Bundle</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+    
+    
+  </ul>
+</div>
+    
+    <a class="btn-close-sidebar iconfont  icon-close"></a>
+  </div>
+</div>
+  <div class="article-wrapper page-layout">
+  <div class="doc-nav">
+    
+
+
+<div class="summary">
+  <h2 class="part-title">
+    
+      \u6559\u7a0b
+    
+  </h2>
+  <ul class="doc-summary">
+    
+    
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+   
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link  ">\u4e0a\u624b\u6559\u7a0b</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/develop-on-your-local-machine.html" class="sidebar-link  ">\u5982\u4f55\u5728\u672c\u5730\u5f00\u53d1 Weex \u9875\u9762</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/syntax/index.html" class="sidebar-link  ">\u8bed\u6cd5\u4ecb\u7ecd</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/data-binding.html" class="sidebar-link current ">\u6570\u636e\u7ed1\u5b9a</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/style-n-class.html" class="sidebar-link  ">CSS \u6837\u5f0f\u548c\u7c7b</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/events.html" class="sidebar-link  ">\u4e8b\u4ef6\u5904\u7406</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/display-logic.html" class="sidebar-link  ">\u5c55\u793a\u903b\u8f91\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/render-logic.html" class="sidebar-link  ">\u6e32\u67d3\u8fc7\u7a0b\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/composed-component.html" class="sidebar-link  ">\u7ec4\u4ef6\u5c01\u88c5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/id.html" class="sidebar-link  ">\u627e\u8282\u70b9</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/comm.html" class="sidebar-link  ">\u7ec4\u4ef6\u901a\u4fe1</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/config-n-data.html" class="sidebar-link  ">\u9875\u9762\u914d\u7f6e\u548c\u9875\u9762\u6570\u636e</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/how-to/index.html" class="sidebar-link  ">\u4f7f\u7528 Devtools \u8c03\u8bd5 Weex \u9875\u9762</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/debug-with-html5.html" class="sidebar-link  ">\u5728\u6d4f\u89c8\u5668\u4e2d\u8c03\u8bd5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/require-3rd-party-libs.html" class="sidebar-link  ">\u5982\u4f55\u5f15\u5165\u7b2c\u4e09\u65b9\u5e93</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/transform-code-into-js-bundle.html" class="sidebar-link  ">\u5c06 `.we` \u6e90\u4ee3\u7801\u8f6c\u6362\u6210 JS Bundle</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+    
+    
+  </ul>
+</div>
+  </div>
+  
+
+<article class="article article-type-guide">
+  <div class="article-entry" itemprop="articleBody">
+    <header class="article-header">
+  
+    
+      <h1 class="article-title" itemprop="name">
+        \u6570\u636e\u7ed1\u5b9a
+      </h1>
+    
+  
+  <time class="article-date" datetime="2017-02-24T16:39:42.000Z">Updated time: 25/02/2017</time>
+</header>
+    <h1 id="\u6570\u636e\u7ed1\u5b9a"><a href="#\u6570\u636e\u7ed1\u5b9a" class="headerlink" title="\u6570\u636e\u7ed1\u5b9a"></a>\u6570\u636e\u7ed1\u5b9a</h1><p>Weex\u4f7f\u7528 <em>mustache</em> \u7684\u8bed\u6cd5 (<code>{{...}}</code>) \u6765\u5bf9 <code>&lt;template&gt;</code> \u4e2d\u7684\u6a21\u677f\u548c <code>&lt;script&gt;</code> \u91cc\u7684\u6570\u636e\u8fdb\u884c\u7ed1\u5b9a. \u4e00\u65e6\u6570\u636e\u989d\u6a21\u677f\u7ed1\u5b9a\u4e86, \u6570\u636e\u4e0a\u7684\u4fee\u6539\u4f1a\u5b9e\u65f6\u7684\u5728\u6a21\u677f\u5185\u5bb9\u4e2d\u751f\u6548\u3002</p>
+<h2 id="\u6570\u636e\u7ed1\u5b9a\u8def\u5f84"><a href="#\u6570\u636e\u7ed1\u5b9a\u8def\u5f84" class="headerlink" title="\u6570\u636e\u7ed1\u5b9a\u8def\u5f84"></a>\u6570\u636e\u7ed1\u5b9a\u8def\u5f84</h2><figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">style</span>=<span class="string">"font-size: &#123;&#123;size&#125;&#125;"</span>&gt;</span>&#123;&#123;title&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class=
 "line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">      <span class="attr">size</span>: <span class="number">48</span>,</div><div class="line">      <span class="attr">title</span>: <span class="string">'Alibaba Weex Team'</span></div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/6d18c0e696d33705083e34ef387ac529" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u4e0a\u9762\u7684\u4ee3\u7801\u4f1a\u628a <code>title</code> \u548c <code>size</code> \u7684\u6570\u503c\u7ed1\u5b9a\u5230\u6a21\u677f\u5185\u5bb9\u4e0a\u3002</p>
+<p>\u6211\u4eec\u4e5f\u53ef\u4ee5\u901a\u8fc7 <code>.</code> \u7b26\u53f7\u6765\u7ed1\u5b9a\u6570\u636e\u7ed3\u6784\u4e2d\u7684\u5b57\u6bb5\u3002\u770b\u4e00\u4e0b\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">style</span>=<span class="string">"font-size: &#123;&#123;title.size&#125;&#125;"</span>&gt;</span>&#123;&#123;title.value&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span
 >: &#123;</div><div class="line">      <span class="attr">title</span>: &#123;</div><div class="line">        <span class="attr">size</span>: <span class="number">48</span>,</div><div class="line">        <span class="attr">value</span>: <span class="string">'Alibaba Weex Team'</span></div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/e291bbe2d5c34fe04db92bc827697a4b" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<h2 id="\u6570\u636e\u7ed1\u5b9a\u8868\u8fbe\u5f0f"><a href="#\u6570\u636e\u7ed1\u5b9a\u8868\u8fbe\u5f0f" class="headerlink" title="\u6570\u636e\u7ed1\u5b9a\u8868\u8fbe\u5f0f"></a>\u6570\u636e\u7ed1\u5b9a\u8868\u8fbe\u5f0f</h2><p>\u8fdb\u884c\u6570\u636e\u7ed1\u5b9a\u65f6\uff0cWeex \u652f\u6301\u4e00\u4e9b\u7b80\u5355\u7684 JavaScript \u8868\u8fbe\u5f0f\uff0c\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"flex-direction: row;"</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;firstName + ' ' + lastName&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;<
 /div><div class="line">      <span class="attr">firstName</span>: <span class="string">'John'</span>,</div><div class="line">      <span class="attr">lastName</span>: <span class="string">'Smith'</span></div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/aeef6c2ca9bd9b7c5d039ed84572e1ee" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u8fd9\u4e9b\u8868\u8fbe\u5f0f\u4f1a\u5728\u5f53\u524d\u7684\u4e0a\u4e0b\u6587\u4e2d\u8fdb\u884c\u8fd0\u7b97\u3002</p>
+<h2 id="\u8ba1\u7b97\u5c5e\u6027-v0-5"><a href="#\u8ba1\u7b97\u5c5e\u6027-v0-5" class="headerlink" title="\u8ba1\u7b97\u5c5e\u6027 v0.5+"></a>\u8ba1\u7b97\u5c5e\u6027 <sup>v0.5+</sup></h2><p>\u6570\u636e\u7ed1\u5b9a\u8868\u8fbe\u5f0f\u5df2\u7ecf\u975e\u5e38\u65b9\u4fbf\u4e86\uff0c\u4f46\u5982\u679c\u5e0c\u671b\u5728\u6a21\u677f\u91cc\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u903b\u8f91\u5224\u65ad\uff0c\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u8ba1\u7b97\u5c5e\u6027\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"flex-direction: row;"</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;fullName&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">onclick</span>=<span class="string">"changeName"</span> <span class="attr">style</span>=<span class="string">"margin-left: 10;"</span>&gt;</span>CHANGE NAME<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>
 &gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">      <span class="attr">firstName</span>: <span class="string">'John'</span>,</div><div class="line">      <span class="attr">lastName</span>: <span class="string">'Smith'</span></div><div class="line">    &#125;,</div><div class="line">    <span class="attr">computed</span>: &#123;</div><div class="line">      <span class="attr">fullName</span>: <span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</div><div class="line">        <span class="keyword">return</span> <span class="keyword">this</span>.firstName + <span class="string">' '</span> + <span class="keyword">this</span>.lastName</div><div class="line">    
   &#125;</div><div class="line">    &#125;,</div><div class="line">    <span class="attr">methods</span>: &#123;</div><div class="line">      <span class="attr">changeName</span>: <span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</div><div class="line">        <span class="keyword">this</span>.firstName = <span class="string">'Terry'</span></div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/276e7c42a2d480d669868476e62b326e" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u540c\u6837\u80fd\u591f\u8fbe\u5230\u76f8\u540c\u7684\u6548\u679c\u3002\u8fd9\u91cc\u6211\u4eec\u5f15\u5165\u4e86\u4e00\u4e2a\u53eb\u505a <code>fullName</code> \u7684\u8ba1\u7b97\u5c5e\u6027\uff0c\u7531 <code>firstName</code> \u548c <code>lastName</code> \u8ba1\u7b97\u800c\u6210\uff0c\u5728\u6570\u636e\u7ed1\u5b9a\u7684\u65f6\u5019\uff0c\u5982\u679c <code>firstName</code> \u6216 <code>lastName</code> \u53d1\u751f\u6539\u53d8\uff0c<code>fullName</code> \u90fd\u4f1a\u81ea\u52a8\u91cd\u65b0\u8ba1\u7b97\u5e76\u89e6\u53d1\u6539\u53d8\u3002</p>
+<p>\u53e6\u5916\u8ba1\u7b97\u5c5e\u6027\u8fd8\u652f\u6301\u53e6\u5916\u4e00\u79cd\u5199\u6cd5\uff0c\u5c31\u662f\u540c\u65f6\u5b9a\u4e49\u4e00\u4e2a\u8ba1\u7b97\u5c5e\u6027\u7684 getter \u548c setter\uff0c\u8fd9\u6837\u7684\u8bdd\u5f53\u4e0b\u9762\u4f8b\u5b50\u4e2d\u7684 <code>fullName</code> \u88ab\u8d4b\u503c\u65f6\uff0c<code>data</code> \u91cc\u7684 <code>firstName</code> \u548c <code>lastName</code> \u4f1a\u88ab\u81ea\u52a8\u6539\u53d8\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"flex-direction: row;"</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;fullName&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">onclick</span>=<span class="string">"changeName"</span> <span class="attr">style</span>=<span class="string">"margin-left: 10;"</span>&gt;</span>CHANGE NAME<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>
 &gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">      <span class="attr">firstName</span>: <span class="string">'John'</span>,</div><div class="line">      <span class="attr">lastName</span>: <span class="string">'Smith'</span></div><div class="line">    &#125;,</div><div class="line">    <span class="attr">computed</span>: &#123;</div><div class="line">      <span class="attr">fullName</span>: &#123;</div><div class="line">        <span class="attr">get</span>: <span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</div><div class="line">          <span class="keyword">return</span> <span class="keyword">this</span>.firstName + <span class="string">' '</span> +
  <span class="keyword">this</span>.lastName</div><div class="line">        &#125;,</div><div class="line"></div><div class="line">        <span class="attr">set</span>: <span class="function"><span class="keyword">function</span>(<span class="params">v</span>) </span>&#123;</div><div class="line">          <span class="keyword">var</span> s = v.split(<span class="string">' '</span>)</div><div class="line">          <span class="keyword">this</span>.firstName = s[<span class="number">0</span>]</div><div class="line">          <span class="keyword">this</span>.lastName = s[<span class="number">1</span>]</div><div class="line">        &#125;</div><div class="line">      &#125;</div><div class="line">    &#125;,</div><div class="line">    <span class="attr">methods</span>: &#123;</div><div class="line">      <span class="attr">changeName</span>: <span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</div><div class="line">        <span c
 lass="keyword">this</span>.fullName = <span class="string">'Terry King'</span></div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/9f33809592391c566c886029c509c167" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<code>data</code>\u3001<code>methods</code>\u3001<code>computed</code> \u4e2d\u7684\u5b57\u6bb5\u662f\u4e0d\u80fd\u76f8\u4e92\u91cd\u590d\u7684\uff0c\u56e0\u4e3a\u5b83\u4eec\u90fd\u4f1a\u901a\u8fc7\u7ec4\u4ef6\u5b9e\u4f8b\u7684 <code>this</code> \u8bbf\u95ee\u5230\u3002</strong></p>
+<h2 id="\u6570\u636e\u7ed1\u5b9a\u5728-lt-template-gt-\u4e2d\u7684\u7279\u6b8a\u7528\u6cd5"><a href="#\u6570\u636e\u7ed1\u5b9a\u5728-lt-template-gt-\u4e2d\u7684\u7279\u6b8a\u7528\u6cd5" class="headerlink" title="\u6570\u636e\u7ed1\u5b9a\u5728 &lt;template&gt; \u4e2d\u7684\u7279\u6b8a\u7528\u6cd5"></a>\u6570\u636e\u7ed1\u5b9a\u5728 <code>&lt;template&gt;</code> \u4e2d\u7684\u7279\u6b8a\u7528\u6cd5</h2><h3 id="\u6837\u5f0f-style-\u6216-class"><a href="#\u6837\u5f0f-style-\u6216-class" class="headerlink" title="\u6837\u5f0f: style \u6216 class"></a>\u6837\u5f0f: <code>style</code> \u6216 <code>class</code></h3><p>\u7ec4\u4ef6\u7684\u6837\u5f0f\u80fd\u591f\u901a\u8fc7 <code>style</code> \u7279\u6027\u8fdb\u884c\u7ed1\u5b9a\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">style</span>=<span class="string">"font-size: &#123;&#123;size&#125;&#125;; color: &#123;&#123;color&#125;&#125;;"</span>&gt;</span>Hello World<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">d
 ata</span>: &#123;</div><div class="line">      <span class="attr">size</span>: <span class="number">32</span>,</div><div class="line">      <span class="attr">color</span>: <span class="string">'#ff0000'</span></div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/f53674fa7910d266e0a2d8a5c285d2b1" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u6837\u5f0f\u4e5f\u80fd\u591f\u901a\u8fc7 <code>class</code> \u7279\u6027\u5b9e\u73b0\u6837\u5f0f\u7ed1\u5b9a\uff0c\u591a\u4e2a class \u540d\u901a\u8fc7\u7a7a\u683c\u5206\u9694\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;size&#125;&#125;"</span>&gt;</span>Hello<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">class</span>=<span class="string">"title &#123;&#123;status&#125;&#125;"</span>&gt;</span>World<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt
 ;<span class="name">style</span>&gt;</span><span class="css"></span></div><div class="line">  <span class="selector-class">.large</span> &#123; <span class="attribute">font-size</span>: <span class="number">64</span>; &#125;</div><div class="line">  <span class="selector-class">.small</span> &#123; <span class="attribute">font-size</span>: <span class="number">32</span>; &#125;</div><div class="line">  <span class="selector-class">.title</span> &#123; <span class="attribute">font-weight</span>: bold; &#125;</div><div class="line">  <span class="selector-class">.success</span> &#123; <span class="attribute">color</span>: <span class="number">#00ff00</span>; &#125;</div><div class="line">  <span class="selector-class">.error</span> &#123; <span class="attribute">color</span>: <span class="number">#ff0000</span>; &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span clas
 s="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">      <span class="attr">size</span>: <span class="string">'large'</span>,</div><div class="line">      <span class="attr">status</span>: <span class="string">'success'</span></div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/4260897c1526a685672dca95af271493" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\u5982\u679c <code>{{size}}</code> \u548c <code>{{status}}</code> \u662f\u7a7a\u503c, \u5c31\u53ea\u6709 <code>class=&quot;title&quot;</code> \u4f1a\u88ab\u89e3\u6790\u3002</p>
+<p>\u5ef6\u4f38\u9605\u8bfb\uff1a<a href="./style-n-class.html">style \u548c class</a></p>
+<h3 id="\u4e8b\u4ef6\u7ed1\u5b9a\uff1aon"><a href="#\u4e8b\u4ef6\u7ed1\u5b9a\uff1aon" class="headerlink" title="\u4e8b\u4ef6\u7ed1\u5b9a\uff1aon..."></a>\u4e8b\u4ef6\u7ed1\u5b9a\uff1a<code>on...</code></h3><p>\u4ee5 <code>on...</code> \u5f00\u5934\u7684\u5c31\u662f\u7528\u4e8e\u7ed1\u5b9a\u4e8b\u4ef6\u7684\u7279\u6027\uff0c\u7279\u6027\u540d\u4e2d <code>on</code> \u4e4b\u540e\u7684\u90e8\u5206\u5c31\u662f\u4e8b\u4ef6\u7684\u7c7b\u578b\uff0c\u7279\u6027\u7684\u503c\u5c31\u662f\u5904\u7406\u8be5\u4e8b\u4ef6\u7684\u51fd\u6570\u540d\u3002<em>\u51fd\u6570\u540d\u5916\u4e0d\u9700\u8981\u6dfb\u52a0 mustache \u8bed\u6cd5\u4e2d\u7684\u5927\u62ec\u53f7</em>\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">onclick</span>=<span class="string">"toggle"</span>&gt;</span>Toggle: &#123;&#123;result&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line"> 
      <span class="attr">result</span>: <span class="literal">true</span></div><div class="line">    &#125;,</div><div class="line">    <span class="attr">methods</span>: &#123;</div><div class="line">      <span class="attr">toggle</span>: <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</div><div class="line">        <span class="keyword">this</span>.result = !<span class="keyword">this</span>.result</div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/2f9f910a60ffc1ed54c797390d6615e1" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u9664\u6b64\u4e4b\u5916 Weex \u8fd8\u652f\u6301\u66f4\u591a\u7684\u4e8b\u4ef6\u5904\u7406\u65b9\u5f0f\u3002</p>
+<p>\u5ef6\u4f38\u9605\u8bfb\uff1a<a href="./events.html">\u4e8b\u4ef6\u5904\u7406</a></p>
+<h3 id="\u5c55\u793a\u903b\u8f91\u63a7\u5236-if-amp-repeat"><a href="#\u5c55\u793a\u903b\u8f91\u63a7\u5236-if-amp-repeat" class="headerlink" title="\u5c55\u793a\u903b\u8f91\u63a7\u5236 if &amp; repeat"></a>\u5c55\u793a\u903b\u8f91\u63a7\u5236 <code>if</code> &amp; <code>repeat</code></h3><p><code>if</code> \u7279\u6027\u80fd\u591f\u901a\u8fc7\u7279\u6027\u503c\u7684\u771f\u5047\u6765\u63a7\u5236\u7ec4\u5efa\u662f\u5426\u663e\u793a\uff0c<em>\u4e14 mustache \u5927\u62ec\u53f7\u53ef\u4ee5\u7701\u7565</em>\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"flex-direction: column;"</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">onclick</span>=<span class="string">"toggle"</span>&gt;</span>Toggle<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">image</span> <span class="attr">if</span>=<span class="string">"&#123;&#123;shown&#125;&#125;"</span> <span class="attr">src</span>=<span class="string">"&#123;&#123;imageUrl&#125;&#125;"</span> <span class="attr">class</span>=<span class="string">"logo"</span>&gt;</span><span class="tag">&lt;/<span class="name">image</span>&gt;</span></div><div class="line">  <span clas
 s="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></div><div class="line">  <span class="selector-class">.logo</span> &#123; <span class="attribute">width</span>: <span class="number">512</span>; <span class="attribute">height</span>: <span class="number">512</span>; &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">      <span class="attr">shown</span>: <span class="literal">true</span>,</div><div clas
 s="line">      <span class="attr">imageUrl</span>: <span class="string">'https://gtms02.alicdn.com/tps/i2/TB1QHKjMXXXXXadXVXX20ySQVXX-512-512.png'</span></div><div class="line">    &#125;,</div><div class="line">    <span class="attr">methods</span>: &#123;</div><div class="line">      <span class="attr">toggle</span>: <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</div><div class="line">        <span class="keyword">this</span>.shown = !<span class="keyword">this</span>.shown</div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/3ec9347e4810f503b641849d214d8c15" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p><code>repeat</code> \u7279\u6027\u53ef\u4ee5\u6839\u636e\u4e00\u7ec4\u6570\u7ec4\u6570\u636e\u91cd\u590d\u751f\u6210\u76f8\u540c\u6216\u76f8\u4f3c\u7684\u987a\u5e8f\u6392\u5217\u7684\u754c\u9762\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">repeat</span>=<span class="string">"(k,v) in list"</span>&gt;</span>&#123;&#123;k&#125;&#125; - &#123;&#123;v&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">    
   <span class="attr">list</span>: [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/db40d2341fdbf16d3d806f502189843d" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u5ef6\u4f38\u9605\u8bfb\uff1a<a href="./display-logic.html">\u5c55\u793a\u903b\u8f91\u63a7\u5236</a></p>
+<h3 id="\u9759\u6001\u6a21\u677f\u4f18\u5316-static-v0-9-2"><a href="#\u9759\u6001\u6a21\u677f\u4f18\u5316-static-v0-9-2" class="headerlink" title="\u9759\u6001\u6a21\u677f\u4f18\u5316 static v0.9.2+"></a>\u9759\u6001\u6a21\u677f\u4f18\u5316 <code>static</code> <sup>v0.9.2+</sup></h3><p><code>static</code> \u7279\u6027\u53ef\u4ee5\u4e00\u6b21\u6027\u628a\u6570\u636e\u8bbe\u7f6e\u5230\u6a21\u677f\u76f8\u5e94\u7684\u4f4d\u7f6e\u4e0a\uff0c\u4f46\u662f\u4eca\u540e\u4e0d\u4f1a\u968f\u7740\u6570\u636e\u7684\u53d8\u5316\u800c\u66f4\u65b0\u3002\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u65e0\u8c13\u7684\u6570\u636e\u7ed1\u5b9a\uff0c\u6709\u6548\u63a7\u5236\u548c\u4f18\u5316\u957f\u5217\u8868\u3001\u7eaf\u9759\u6001\u9875\u9762\u5728\u8fd0\u884c\u65f6\u7684\u5f00\u9500\u3002\u4e0d\u8fc7\u4f60\u4e5f\u8981\u5c0f\u5fc3\u4f7f\u7528\u4e0d\u8981\u5bfc\u81f4\u539f\u672c\u9700\u8981\u66f4\u65b0\u7684\u89c6\u56fe\u6ca1\u6709\u89e6\u53d1\u66f4\u65b0\u3002</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">static</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123; word &#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="built_in">module</span>.exports = &#123;</div><div class="line">    <span class="attr">ready</span>: <span class="function"><span class="keyword">function</span>(<span class="pa
 rams"></span>) </span>&#123;</div><div class="line">      <span class="keyword">this</span>.word = <span class="string">'Data changes'</span> <span class="comment">// UI won't be updated</span></div><div class="line">    &#125;,</div><div class="line">    <span class="attr">data</span>: &#123;</div><div class="line">      <span class="attr">word</span>: <span class="string">'Hello static'</span></div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/dbadfd66463a2c03e3e06d391b0ad8ec" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u5982\u4e0a\u6240\u793a\uff0c\u6dfb\u52a0 <code>static</code> \u5173\u952e\u5b57\uff0c\u6e32\u67d3\u7ed3\u679c\u4f1a\u662f\u201cHello static\u201d\u5b57\u6837\uff0c\u76f8\u5f53\u4e8e\u6e32\u67d3\u4e00\u4e2a\u9759\u6001\u7684\u8282\u70b9\uff0c<code>ready</code> \u51fd\u6570\u4e2d\u5bf9\u6570\u636e <code>word</code> \u7684\u6539\u53d8\u4e0d\u4f1a\u66f4\u65b0\u5230\u89c6\u56fe\u3002</p>
+<p>\u4e0b\u4e00\u7bc7\uff1a<a href="./style-n-class.html">style \u548c class</a></p>
+
+  </div>
+  
+</article>
+</div>
+  
+  <footer id="footer">
+  <div class="row clearfix">
+    <div class="ali-logo">
+      <img src="//gw.alicdn.com/tps/TB1Ef93PXXXXXaXXpXXXXXXXXXX-252-126.png" alt="Alibaba">
+    </div>
+    <div class="dropdown select-lang">
+      <a href="javascript:;" class="dropdown-toggle">
+        Language
+        <span class="caret"></span>
+      </a>
+      <ul class="dropdown-menu pick-lang">
+        <li>
+          <a href="/v-0.10/guide/syntax/data-binding.html" data-lang="en">English</a>
+        </li>
+        <li>
+          <a href="/cn/v-0.10/guide/syntax/data-binding.html" data-lang="zh-cn">\u4e2d\u6587</a>
+        </li>
+      </ul>
+    </div>
+  </div>
+  <div class="row">
+    <p><span>Released under </span><a href="">Apache License 2.0</a></p>
+  </div>
+  <div class="row clearfix">
+    <div class="cell"><span>Copyright(c) 2016 </span><a href="https://www.alibaba.com">Alibaba</a></div>
+    <div class="cell"><span>Designed by </span><a href="">\u963f\u91cc\u4e91UED AX</a></div>
+  </div>
+</footer>
+  <div style="display: none;">
+  <script src="//s95.cnzz.com/z_stat.php?id=1261102667&amp;web_id=1261102667" language="JavaScript"></script>
+</div>
+
+  <script src="/js/reqwest.js"></script>
+  <script src="/js/common.js"></script>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/95bb2077/cn/v-0.10/guide/syntax/display-logic.html
----------------------------------------------------------------------
diff --git a/cn/v-0.10/guide/syntax/display-logic.html b/cn/v-0.10/guide/syntax/display-logic.html
new file mode 100644
index 0000000..912b9a6
--- /dev/null
+++ b/cn/v-0.10/guide/syntax/display-logic.html
@@ -0,0 +1,590 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  
+  <title>\u5c55\u793a\u903b\u8f91\u63a7\u5236 | Weex</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+  <meta name="description" content="\u5c55\u793a\u903b\u8f91\u63a7\u5236Weex \u652f\u6301\u901a\u8fc7\u4e24\u79cd\u7279\u6b8a\u7684\u7279\u6027 if \u548c repeat \u786e\u5b9a\u7ec4\u4ef6\u7684\u663e\u793a\u903b\u8f91\uff0c\u8fd9\u4f1a\u4f7f\u5f97\u6574\u4e2a\u754c\u9762\u7684\u5c55\u793a\u903b\u8f91\u63a7\u5236\u66f4\u52a0\u7b80\u5355\u7075\u6d3b\u3002
+if\u901a\u8fc7\u8bbe\u7f6e if \u7279\u6027\u503c\uff0c\u4f60\u53ef\u4ee5\u63a7\u5236\u5f53\u524d\u7ec4\u4ef6\u662f\u5426\u663e\u793a\u3002\u5982\u679c\u503c\u4e3a\u771f\uff0c\u5219\u5f53\u524d\u7ec4\u4ef6\u4f1a\u88ab\u6e32\u67d3\u51fa\u6765\uff0c\u5982\u679c\u503c\u4e3a\u5047\u5219\u4f1a\u88ab\u79fb\u9664\u3002\u4f8b\u5982\uff1a
+&amp;lt;template&amp;gt;  &amp;lt;div&amp;gt;    &amp;lt;text onclick=&quot;toggle&quot;&amp;gt;Toggle Im">
+<meta property="og:type" content="website">
+<meta property="og:title" content="\u5c55\u793a\u903b\u8f91\u63a7\u5236">
+<meta property="og:url" content="https://weex.apache.org/cn/v-0.10/guide/syntax/display-logic.html">
+<meta property="og:site_name" content="Weex">
+<meta property="og:description" content="\u5c55\u793a\u903b\u8f91\u63a7\u5236Weex \u652f\u6301\u901a\u8fc7\u4e24\u79cd\u7279\u6b8a\u7684\u7279\u6027 if \u548c repeat \u786e\u5b9a\u7ec4\u4ef6\u7684\u663e\u793a\u903b\u8f91\uff0c\u8fd9\u4f1a\u4f7f\u5f97\u6574\u4e2a\u754c\u9762\u7684\u5c55\u793a\u903b\u8f91\u63a7\u5236\u66f4\u52a0\u7b80\u5355\u7075\u6d3b\u3002
+if\u901a\u8fc7\u8bbe\u7f6e if \u7279\u6027\u503c\uff0c\u4f60\u53ef\u4ee5\u63a7\u5236\u5f53\u524d\u7ec4\u4ef6\u662f\u5426\u663e\u793a\u3002\u5982\u679c\u503c\u4e3a\u771f\uff0c\u5219\u5f53\u524d\u7ec4\u4ef6\u4f1a\u88ab\u6e32\u67d3\u51fa\u6765\uff0c\u5982\u679c\u503c\u4e3a\u5047\u5219\u4f1a\u88ab\u79fb\u9664\u3002\u4f8b\u5982\uff1a
+&amp;lt;template&amp;gt;  &amp;lt;div&amp;gt;    &amp;lt;text onclick=&quot;toggle&quot;&amp;gt;Toggle Im">
+<meta property="og:updated_time" content="2017-02-24T16:39:42.000Z">
+<meta name="twitter:card" content="summary">
+<meta name="twitter:title" content="\u5c55\u793a\u903b\u8f91\u63a7\u5236">
+<meta name="twitter:description" content="\u5c55\u793a\u903b\u8f91\u63a7\u5236Weex \u652f\u6301\u901a\u8fc7\u4e24\u79cd\u7279\u6b8a\u7684\u7279\u6027 if \u548c repeat \u786e\u5b9a\u7ec4\u4ef6\u7684\u663e\u793a\u903b\u8f91\uff0c\u8fd9\u4f1a\u4f7f\u5f97\u6574\u4e2a\u754c\u9762\u7684\u5c55\u793a\u903b\u8f91\u63a7\u5236\u66f4\u52a0\u7b80\u5355\u7075\u6d3b\u3002
+if\u901a\u8fc7\u8bbe\u7f6e if \u7279\u6027\u503c\uff0c\u4f60\u53ef\u4ee5\u63a7\u5236\u5f53\u524d\u7ec4\u4ef6\u662f\u5426\u663e\u793a\u3002\u5982\u679c\u503c\u4e3a\u771f\uff0c\u5219\u5f53\u524d\u7ec4\u4ef6\u4f1a\u88ab\u6e32\u67d3\u51fa\u6765\uff0c\u5982\u679c\u503c\u4e3a\u5047\u5219\u4f1a\u88ab\u79fb\u9664\u3002\u4f8b\u5982\uff1a
+&amp;lt;template&amp;gt;  &amp;lt;div&amp;gt;    &amp;lt;text onclick=&quot;toggle&quot;&amp;gt;Toggle Im">
+  
+    <link rel="alternate" href="/atom.xml" title="Weex" type="application/atom+xml">
+  
+  
+    <link rel="icon" href="//gw.alicdn.com/tps/TB1XNqxPXXXXXcSXVXXXXXXXXXX-64-63.png">
+  
+  
+    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
+  
+  <link rel="stylesheet" href="/css/style.css">
+  <link rel="stylesheet" href="/css/swiper.min.css">
+</head>
+
+<body id="guide" class="lang-cn">
+  
+  <script>
+    window.PAGE_TYPE = "guide";
+    window.ROOT = "/"
+  </script>
+  <header id="header">
+  <div class="navbar">
+    <a id="logo" href="/cn/">
+      <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+    </a>
+    <div class="main-nav">
+      <ul class="links">
+        <li><a href="/cn/guide">\u6559\u7a0b</a></li>
+        <li><a href="/cn/references">\u624b\u518c</a></li>
+        <li><a href="/cn/faq.html">FAQ</a></li>
+        <li class="dropdown">
+            <a href="javascript:;">\u4e0b\u8f7d</a>
+            <ul class="dropdown-menu subnav">
+              <li>
+                <a href="/cn/playground.html">Playground</a>
+              </li>
+              <li>
+                <a href="https://www.npmjs.com/package/weex-devtool" target="_blank">Devtool</a>
+              </li>
+              <li>
+                <a href="https://www.npmjs.com/package/weexpack" target="_blank">Weexpack</a>
+              </li>
+              <li>
+                <a href="http://dotwe.org" target="_blank">Snippets</a>
+              </li>
+              <li>
+                <a href="https://market.weex-project.io/" target="_blank">Market</a>
+              </li>
+            </ul>
+        </li>
+      </ul>
+      <ul class="info">
+        <li><a href="https://github.com/alibaba/weex/" target="_blank"><span class="btn-github iconfont icon-github"></span></a></li>
+      </ul>
+      <ul class="tools">
+        <li>
+          <div class="search">
+  <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <span class="iconfont icon-search"></span>
+  </form>
+  <div class="results-panel">
+  </div>
+</div>
+        </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/v-0.10/guide/syntax/display-logic.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/display-logic.html" data-lang="zh-cn">\u4e2d\u6587</a>
+              </li>
+            </ul>
+          </div>
+        </li>
+        <!--<li></li>-->
+      </ul>
+    </div>
+  </div>
+  <div id="mobile-nav">
+    <a id="logo" href="/cn/">
+      <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+    </a>
+    <a class="btn-menu"><span class="iconfont icon-nav"></span></a>
+  </div>
+</header>
+  <div id="sidebar" class="">
+  <div class="sidebar-menu">
+    
+      <div class="search">
+  <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <span class="iconfont icon-search"></span>
+  </form>
+  <div class="results-panel">
+  </div>
+</div>
+      
+
+
+<div class="summary">
+  <h2 class="part-title">
+    
+      \u6559\u7a0b
+    
+  </h2>
+  <ul class="doc-summary">
+    
+    
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+   
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link  ">\u4e0a\u624b\u6559\u7a0b</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/develop-on-your-local-machine.html" class="sidebar-link  ">\u5982\u4f55\u5728\u672c\u5730\u5f00\u53d1 Weex \u9875\u9762</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/syntax/index.html" class="sidebar-link  ">\u8bed\u6cd5\u4ecb\u7ecd</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/data-binding.html" class="sidebar-link  ">\u6570\u636e\u7ed1\u5b9a</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/style-n-class.html" class="sidebar-link  ">CSS \u6837\u5f0f\u548c\u7c7b</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/events.html" class="sidebar-link  ">\u4e8b\u4ef6\u5904\u7406</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/display-logic.html" class="sidebar-link current ">\u5c55\u793a\u903b\u8f91\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/render-logic.html" class="sidebar-link  ">\u6e32\u67d3\u8fc7\u7a0b\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/composed-component.html" class="sidebar-link  ">\u7ec4\u4ef6\u5c01\u88c5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/id.html" class="sidebar-link  ">\u627e\u8282\u70b9</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/comm.html" class="sidebar-link  ">\u7ec4\u4ef6\u901a\u4fe1</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/config-n-data.html" class="sidebar-link  ">\u9875\u9762\u914d\u7f6e\u548c\u9875\u9762\u6570\u636e</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/how-to/index.html" class="sidebar-link  ">\u4f7f\u7528 Devtools \u8c03\u8bd5 Weex \u9875\u9762</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/debug-with-html5.html" class="sidebar-link  ">\u5728\u6d4f\u89c8\u5668\u4e2d\u8c03\u8bd5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/require-3rd-party-libs.html" class="sidebar-link  ">\u5982\u4f55\u5f15\u5165\u7b2c\u4e09\u65b9\u5e93</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/transform-code-into-js-bundle.html" class="sidebar-link  ">\u5c06 `.we` \u6e90\u4ee3\u7801\u8f6c\u6362\u6210 JS Bundle</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+    
+    
+  </ul>
+</div>
+    
+    <a class="btn-close-sidebar iconfont  icon-close"></a>
+  </div>
+</div>
+  <div class="article-wrapper page-layout">
+  <div class="doc-nav">
+    
+
+
+<div class="summary">
+  <h2 class="part-title">
+    
+      \u6559\u7a0b
+    
+  </h2>
+  <ul class="doc-summary">
+    
+    
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+      
+      
+        
+      
+    
+   
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link  ">\u4e0a\u624b\u6559\u7a0b</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/develop-on-your-local-machine.html" class="sidebar-link  ">\u5982\u4f55\u5728\u672c\u5730\u5f00\u53d1 Weex \u9875\u9762</a></h3>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/syntax/index.html" class="sidebar-link  ">\u8bed\u6cd5\u4ecb\u7ecd</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/data-binding.html" class="sidebar-link  ">\u6570\u636e\u7ed1\u5b9a</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/style-n-class.html" class="sidebar-link  ">CSS \u6837\u5f0f\u548c\u7c7b</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/events.html" class="sidebar-link  ">\u4e8b\u4ef6\u5904\u7406</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/display-logic.html" class="sidebar-link current ">\u5c55\u793a\u903b\u8f91\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/render-logic.html" class="sidebar-link  ">\u6e32\u67d3\u8fc7\u7a0b\u63a7\u5236</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/composed-component.html" class="sidebar-link  ">\u7ec4\u4ef6\u5c01\u88c5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/id.html" class="sidebar-link  ">\u627e\u8282\u70b9</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/comm.html" class="sidebar-link  ">\u7ec4\u4ef6\u901a\u4fe1</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/syntax/config-n-data.html" class="sidebar-link  ">\u9875\u9762\u914d\u7f6e\u548c\u9875\u9762\u6570\u636e</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+      <li>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/how-to/index.html" class="sidebar-link  ">\u4f7f\u7528 Devtools \u8c03\u8bd5 Weex \u9875\u9762</a></h3>
+        
+          <ul class="chapter">
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/debug-with-html5.html" class="sidebar-link  ">\u5728\u6d4f\u89c8\u5668\u4e2d\u8c03\u8bd5</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/require-3rd-party-libs.html" class="sidebar-link  ">\u5982\u4f55\u5f15\u5165\u7b2c\u4e09\u65b9\u5e93</a>
+              </li>
+            
+              <li>
+                <a href="/cn/v-0.10/guide/how-to/transform-code-into-js-bundle.html" class="sidebar-link  ">\u5c06 `.we` \u6e90\u4ee3\u7801\u8f6c\u6362\u6210 JS Bundle</a>
+              </li>
+            
+          </ul>
+        
+      </li>
+    
+    
+    
+  </ul>
+</div>
+  </div>
+  
+
+<article class="article article-type-guide">
+  <div class="article-entry" itemprop="articleBody">
+    <header class="article-header">
+  
+    
+      <h1 class="article-title" itemprop="name">
+        \u5c55\u793a\u903b\u8f91\u63a7\u5236
+      </h1>
+    
+  
+  <time class="article-date" datetime="2017-02-24T16:39:42.000Z">Updated time: 25/02/2017</time>
+</header>
+    <h1 id="\u5c55\u793a\u903b\u8f91\u63a7\u5236"><a href="#\u5c55\u793a\u903b\u8f91\u63a7\u5236" class="headerlink" title="\u5c55\u793a\u903b\u8f91\u63a7\u5236"></a>\u5c55\u793a\u903b\u8f91\u63a7\u5236</h1><p>Weex \u652f\u6301\u901a\u8fc7\u4e24\u79cd\u7279\u6b8a\u7684\u7279\u6027 <code>if</code> \u548c <code>repeat</code> \u786e\u5b9a\u7ec4\u4ef6\u7684\u663e\u793a\u903b\u8f91\uff0c\u8fd9\u4f1a\u4f7f\u5f97\u6574\u4e2a\u754c\u9762\u7684\u5c55\u793a\u903b\u8f91\u63a7\u5236\u66f4\u52a0\u7b80\u5355\u7075\u6d3b\u3002</p>
+<h2 id="if"><a href="#if" class="headerlink" title="if"></a><code>if</code></h2><p>\u901a\u8fc7\u8bbe\u7f6e <code>if</code> \u7279\u6027\u503c\uff0c\u4f60\u53ef\u4ee5\u63a7\u5236\u5f53\u524d\u7ec4\u4ef6\u662f\u5426\u663e\u793a\u3002\u5982\u679c\u503c\u4e3a\u771f\uff0c\u5219\u5f53\u524d\u7ec4\u4ef6\u4f1a\u88ab\u6e32\u67d3\u51fa\u6765\uff0c\u5982\u679c\u503c\u4e3a\u5047\u5219\u4f1a\u88ab\u79fb\u9664\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">onclick</span>=<span class="string">"toggle"</span>&gt;</span>Toggle Image<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">image</span> <span class="attr">if</span>=<span class="string">"shown"</span> <span class="attr">src</span>=<span class="string">"&#123;&#123;imageUrl&#125;&#125;"</span> <span class="attr">style</span>=<span class="string">"width: 512; height: 512;"</span>&gt;</span><span class="tag">&lt;/<span class="name">image</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span c
 lass="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line"><span class="built_in">module</span>.exports = &#123;</div><div class="line">  <span class="attr">data</span>: &#123;</div><div class="line">    <span class="attr">imageUrl</span>: <span class="string">'https://gtms02.alicdn.com/tps/i2/TB1QHKjMXXXXXadXVXX20ySQVXX-512-512.png'</span>,</div><div class="line">    <span class="attr">shown</span>: <span class="literal">true</span></div><div class="line">  &#125;,</div><div class="line">  <span class="attr">methods</span>: &#123;</div><div class="line">    <span class="attr">toggle</span>: <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</div><div class="line">      <span class="keyword">this</span>.shown = !<span class="keyword">this</span>.shown</div><div
  class="line">    &#125;</div><div class="line">  &#125;</div><div class="line">&#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/e0999a51fa404f48bbae177f1569cd0e" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p><em>\u6ce8\u610f\u4e8b\u9879\uff1a<code>if=&quot;condition&quot;</code> \u548c <code>if=&quot;{{condition}}&quot;</code> \u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u4e24\u8005\u7b49\u4ef7\u4f7f\u7528\u3002</em></p>
+<p><em>\u6ce8\u610f\u4e8b\u9879\uff1a<code>if</code> \u4e0d\u80fd\u7528\u5728 <code>&lt;template&gt;</code> \u7684\u6839\u7ec4\u4ef6\u4e0a\uff0c\u5426\u5219\u5c06\u65e0\u6cd5\u88ab Weex \u6b63\u5e38\u7684\u8bc6\u522b\u548c\u5904\u7406\u3002</em></p>
+<h3 id="if-\u4e0d\u4f1a\u963b\u65ad\u5b50\u5143\u7d20\u7684\u6570\u636e\u66f4\u65b0"><a href="#if-\u4e0d\u4f1a\u963b\u65ad\u5b50\u5143\u7d20\u7684\u6570\u636e\u66f4\u65b0" class="headerlink" title="if \u4e0d\u4f1a\u963b\u65ad\u5b50\u5143\u7d20\u7684\u6570\u636e\u66f4\u65b0"></a><code>if</code> \u4e0d\u4f1a\u963b\u65ad\u5b50\u5143\u7d20\u7684\u6570\u636e\u66f4\u65b0</h3><p>\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50\u5728\u6570\u636e\u66f4\u65b0\u540e <code>item</code> \u6216 <code>item.image</code> \u4e0d\u5b58\u5728\u7684\u60c5\u51b5\u4e0b\u4f1a\u62a5\u9519\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">if</span>=<span class="string">"&#123;&#123;(item &amp;&amp; item.image)&#125;&#125;"</span> <span class="attr">style</span>=<span class="string">"width: 200; height: 200;"</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">image</span> <span class="attr">style</span>=<span class="string">"width: 100; height: 100;"</span> <span class="attr">src</span>=<span class="string">"&#123;&#123;item.image.url&#125;&#125;"</span>&gt;</span><span class="tag">&lt;/<span class="name">image</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div></pre></td></tr></table></figur
 e>
+<p>\u539f\u56e0\u5728\u4e8e Weex \u672c\u8eab\u7684\u673a\u5236\u662f\u6570\u636e\u66f4\u65b0\u5728 DOM \u66f4\u65b0\u4e4b\u524d\uff0c\u56e0\u6b64 <code>if</code> \u6570\u636e\u66f4\u65b0\u4e4b\u540e\uff0c\u4e0d\u652f\u6301\u963b\u65ad\u5176\u5b50\u5143\u7d20\u7684\u6570\u636e\u66f4\u65b0\uff0c\u5373 <code>if</code> \u6570\u636e\u66f4\u65b0\u4e3a <code>false</code> \u4e4b\u540e\uff0c\u5185\u90e8\u7684\u5b50\u5143\u7d20\u4ecd\u7136\u4f1a\u89e6\u53d1\u81ea\u8eab\u7684\u6570\u636e\u66f4\u65b0\uff0c\u627e\u4e0d\u5230\u5bf9\u5e94\u5b57\u6bb5\uff0c\u5bfc\u81f4\u62a5\u9519\uff0c\u53ef\u53c2\u8003\u8fd9\u4e2a <a href="https://github.com/alibaba/weex/issues/1758" target="_blank" rel="external">issue</a>\u3002</p>
+<p>\u56e0\u6b64\uff0c\u6709\u4e24\u79cd\u89e3\u51b3\u65b9\u6848\uff1a</p>
+<ul>
+<li><p>\u4e3a <code>img</code> \u7ec4\u4ef6\u7684 <code>src</code> \u4e5f\u589e\u52a0\u5bb9\u9519\u65b9\u6848\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">if</span>=<span class="string">"&#123;&#123;(item &amp;&amp; item.image)&#125;&#125;"</span> <span class="attr">style</span>=<span class="string">"width: 200; height: 200;"</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">image</span> <span class="attr">style</span>=<span class="string">"width: 100; height: 100;"</span> <span class="attr">src</span>=<span class="string">"&#123;&#123;item &amp;&amp; item.image &amp;&amp; item.image.url&#125;&#125;"</span>&gt;</span><span class="tag">&lt;/<span class="name">image</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></div></pre></td></tr></table></figure>
+</li>
+<li><p>\u5982\u679c\u662f\u5728 <code>repeat</code> \u7684\u5217\u8868\u4e2d\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 <code>track-by</code>\u5f3a\u5236\u4e0d\u590d\u7528\u5b50\u5143\u7d20\u89e3\u51b3\u3002</p>
+</li>
+</ul>
+<h2 id="repeat"><a href="#repeat" class="headerlink" title="repeat"></a><code>repeat</code></h2><p><code>repeat</code> \u7279\u6027\u7528\u4e8e\u91cd\u590d\u6e32\u67d3\u4e00\u7ec4\u76f8\u540c\u7684\u7ec4\u4ef6\u3002\u5b83\u7ed1\u5b9a\u7684\u6570\u636e\u7c7b\u578b\u5fc5\u987b\u4e3a\u6570\u7ec4\uff0c\u6570\u7ec4\u91cc\u7684\u6bcf\u4e00\u9879\u6570\u636e\u53ef\u4ee5\u4f53\u73b0\u5728\u4e0d\u540c\u7684\u7ec4\u4ef6\u7279\u6027\u3001\u6837\u5f0f\u3001\u4e8b\u4ef6\u7ed1\u5b9a\u7b49\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">repeat</span>=<span class="string">"person in list"</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;person.gender&#125;&#125;"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;person.nickname&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line">
 </div><div class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></div><div class="line">  <span class="selector-class">.male</span> &#123; <span class="attribute">background-color</span>: <span class="number">#9999ff</span>; &#125;</div><div class="line">  <span class="selector-class">.female</span> &#123; <span class="attribute">background-color</span>: <span class="number">#ff9999</span>; &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line"><span class="built_in">module</span>.exports = &#123;</div><div class="line">  <span class="attr">data</span>: &#123;</div><div class="line">    <span class="attr">list</span>: [</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'male'</span>, <span
  class="attr">nickname</span>: <span class="string">'Li Lei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'female'</span>, <span class="attr">nickname</span>: <span class="string">'Han Meimei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'male'</span>, <span class="attr">nickname</span>: <span class="string">'Jim Green'</span> &#125;</div><div class="line">    ]</div><div class="line">  &#125;</div><div class="line">&#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/8c87aac2820531090181c32fca41e913" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u6b64\u5916\uff0c<code>repeat</code> \u7279\u6027\u8fd8\u652f\u6301\u7ed1\u5b9a\u6570\u7ec4\u4e2d\u6570\u636e\u9879\u76ee\u7684\u7d22\u5f15\u503c\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">repeat</span>=<span class="string">"(index, person) in list"</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;person.gender&#125;&#125;"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;index&#125;&#125; - &#123;&#123;person.nickname&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template<
 /span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></div><div class="line">  <span class="selector-class">.male</span> &#123; <span class="attribute">background-color</span>: <span class="number">#9999ff</span>; &#125;</div><div class="line">  <span class="selector-class">.female</span> &#123; <span class="attribute">background-color</span>: <span class="number">#ff9999</span>; &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line"><span class="built_in">module</span>.exports = &#123;</div><div class="line">  <span class="attr">data</span>: &#123;</div><div class="line">    <span class="attr">list</span>: [</div><div class="line">      &#123; <span class="attr">gender</span>: 
 <span class="string">'male'</span>, <span class="attr">nickname</span>: <span class="string">'Li Lei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'female'</span>, <span class="attr">nickname</span>: <span class="string">'Han Meimei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'male'</span>, <span class="attr">nickname</span>: <span class="string">'Jim Green'</span> &#125;</div><div class="line">    ]</div><div class="line">  &#125;</div><div class="line">&#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/65d348256ab5c54aa996d3ee6b4ea115" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u6bcf\u4e00\u4e2a\u6635\u79f0\u4e4b\u524d\u90fd\u6709\u5bf9\u5e94\u6570\u7ec4\u9879\u76ee\u7684\u7d22\u5f15\u503c\u3002</p>
+<p><em>\u6ce8\u610f\u4e8b\u9879\uff1a\u540c\u6837\u7684 <code>repeat=&quot;...&quot;</code> \u548c <code>repeat=&quot;{{...}}&quot;</code> \u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u4e24\u8005\u7b49\u4ef7\u4f7f\u7528\u3002</em></p>
+<p><em>\u6ce8\u610f\u4e8b\u9879\uff1a<code>if</code> \u4e0d\u80fd\u7528\u5728 <code>&lt;template&gt;</code> \u7684\u6839\u7ec4\u4ef6\u4e0a\uff0c\u5426\u5219\u5c06\u65e0\u6cd5\u88ab Weex \u6b63\u5e38\u7684\u8bc6\u522b\u548c\u5904\u7406\u3002</em></p>
+<p><strong>\u6ce8\u610f\u4e8b\u9879: \u5f53\u4f60\u4fee\u6539 <code>repeat</code> \u4e2d\u7684\u6570\u7ec4\u65f6\uff0c\u5728\u5199\u6cd5\u4e0a\u4f1a\u53d7\u5230\u4e00\u5b9a\u7684\u9650\u5236\uff0c\u5177\u4f53\u5982\u4e0b\uff1a</strong></p>
+<p><strong>\u76f4\u63a5\u901a\u8fc7\u201c\u89d2\u6807\u201d\u4fee\u6539\u6570\u7ec4\u7684\u67d0\u4e2a\u9879\u76ee (\u5982 <code>this.items[0] = ...</code>) \u662f\u4e0d\u4f1a\u89e6\u53d1\u89c6\u56fe\u81ea\u52a8\u66f4\u65b0\u7684\u3002\u6211\u4eec\u5728\u6570\u7ec4\u7684\u539f\u578b\u4e0a\u63d0\u4f9b\u4e86\u4e00\u4e2a\u989d\u5916\u7684\u65b9\u6cd5\uff1a<code>this.items.$set(index, item)</code> \u6765\u5b8c\u6210\u76f8\u540c\u7684\u4e8b\u60c5\u3002</strong></p>
+<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line"><span class="comment">// \u548c `this.items[0] = ...` \u4f5c\u7528\u76f8\u540c\uff0c\u4f46\u4f1a\u81ea\u52a8\u89e6\u53d1\u89c6\u56fe\u66f4\u65b0</span></div><div class="line"><span class="keyword">this</span>.items.$set(<span class="number">0</span>, &#123; <span class="attr">childMsg</span>: <span class="string">'Changed!'</span>&#125;)</div></pre></td></tr></table></figure>
+<p><strong>\u76f4\u63a5\u901a\u8fc7\u4fee\u6539 <code>length</code> \u6765\u6539\u53d8\u6570\u7ec4\u957f\u5ea6 (\u5982 <code>this.items.length = 0</code>) \u4e5f\u662f\u4e0d\u4f1a\u89e6\u53d1\u89c6\u56fe\u81ea\u52a8\u66f4\u65b0\u7684\u3002\u6211\u4eec\u63a8\u8350\u60a8\u76f4\u63a5\u8d4b\u503c\u4e00\u4e2a\u65b0\u7684\u7a7a\u6570\u7ec4\u628a\u65e7\u7684\u66ff\u6362\u6389\u3002</strong></p>
+<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line"><span class="comment">// \u548c `this.items.length = 0` \u4f5c\u7528\u76f8\u540c\uff0c\u4f46\u4f1a\u81ea\u52a8\u89e6\u53d1\u89c6\u56fe\u66f4\u65b0</span></div><div class="line"><span class="keyword">this</span>.items = []</div></pre></td></tr></table></figure>
+<h3 id="repeat-\u7279\u6027\u4e2d\u7684-index-\u5f62\u53c2"><a href="#repeat-\u7279\u6027\u4e2d\u7684-index-\u5f62\u53c2" class="headerlink" title="repeat \u7279\u6027\u4e2d\u7684 $index \u5f62\u53c2"></a><code>repeat</code> \u7279\u6027\u4e2d\u7684 <code>$index</code> \u5f62\u53c2</h3><p>\u5728 <code>repeat</code> \u7279\u6027\u503c\u4e2d\uff0c\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u7d22\u5f15\u503c\u7684\u5f62\u53c2\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7\u7ed1\u5b9a\u5f62\u53c2 <code>$index</code> \u6765\u5c55\u793a\u6570\u7ec4\u9879\u76ee\u7684\u7d22\u5f15\u503c\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">repeat</span>=<span class="string">"person in list"</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;person.gender&#125;&#125;"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;$index&#125;&#125; - &#123;&#123;person.nickname&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&g
 t;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></div><div class="line">  <span class="selector-class">.male</span> &#123; <span class="attribute">background-color</span>: <span class="number">#9999ff</span>; &#125;</div><div class="line">  <span class="selector-class">.female</span> &#123; <span class="attribute">background-color</span>: <span class="number">#ff9999</span>; &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line"><span class="built_in">module</span>.exports = &#123;</div><div class="line">  <span class="attr">data</span>: &#123;</div><div class="line">    <span class="attr">list</span>: [</div><div class="line">      &#123; <span class="attr">gender</span>: <span cl
 ass="string">'male'</span>, <span class="attr">nickname</span>: <span class="string">'Li Lei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'female'</span>, <span class="attr">nickname</span>: <span class="string">'Han Meimei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">gender</span>: <span class="string">'male'</span>, <span class="attr">nickname</span>: <span class="string">'Jim Green'</span> &#125;</div><div class="line">    ]</div><div class="line">  &#125;</div><div class="line">&#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/65d348256ab5c54aa996d3ee6b4ea115" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u6e32\u67d3\u6548\u679c\u548c\u4e0a\u4e00\u4e2a\u4f8b\u5b50\u5e94\u8be5\u662f\u76f8\u540c\u7684\u3002</p>
+<h3 id="\u5728-repeat-\u4e2d\u4f7f\u7528-track-by-\u7279\u6027\u8ffd\u8e2a\u53d8\u5316"><a href="#\u5728-repeat-\u4e2d\u4f7f\u7528-track-by-\u7279\u6027\u8ffd\u8e2a\u53d8\u5316" class="headerlink" title="\u5728 repeat \u4e2d\u4f7f\u7528 track-by \u7279\u6027\u8ffd\u8e2a\u53d8\u5316"></a>\u5728 <code>repeat</code> \u4e2d\u4f7f\u7528 <code>track-by</code> \u7279\u6027\u8ffd\u8e2a\u53d8\u5316</h3><p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5f53\u66f4\u65b0 <code>repeat</code> \u4e2d\u7ed1\u5b9a\u7684\u6570\u7ec4\u65f6\uff0c\u6240\u6709\u6570\u7ec4\u9879\u76ee\u5173\u8054\u7684\u7ec4\u4ef6\u90fd\u4f1a\u88ab\u91cd\u65b0\u6e32\u67d3\u3002\u5982\u679c\u5176\u4e2d\u90e8\u5206\u7d22\u5f15\u503c\u5bf9\u5e94\u7684\u6570\u636e\u672a\u53d1\u751f\u53d8\u66f4\uff0c\u90a3\u4e48\u6700\u597d\u662f\u8ba9\u8fd9\u4e9b\u7ec4\u4ef6\u5728\u6e32\u67d3\u5c42\u4fdd\u6301\u539f\u6837\uff0c\u4ec5\u66f4\u65b0\u6570\u636e\u6709\u53d8\u5316\u7684\u8282\u70b9\u3002Weex \u63d0\u4f9b\u4e86 <code>track-by</code> \u7279\u6027\u6765\u8f85\u52a9\u5224\u65ad\u54ea\u4e9b\u6570\u7ec4\u9879\u76ee\u53d1\u751f\u4e86\u6539\u53d8\u3002</p>
+<p>\u9996\u5148 <code>track-by</code> \u7279\u6027\u7684\u503c\u5fc5\u987b\u662f\u5728\u6bcf\u4e00\u6761\u6570\u7ec4\u9879\u76ee\u4e2d\u90fd\u6709\u4e14\u503c\u6ca1\u6709\u91cd\u590d\u7684\u4e00\u4e2a\u5b57\u6bb5\u540d\uff0c\u7528\u6765\u533a\u5206\u548c\u8ffd\u8e2a\u6bcf\u4e00\u6761\u6570\u636e\u9879\u589e\u5220\u4e0e\u5426\u6216\u6b21\u5e8f\u53d8\u5316\u4e0e\u5426\u7684\u5173\u952e\u4f9d\u636e\u3002\u6bcf\u5f53\u6570\u7ec4\u53d1\u751f\u53d8\u5316\u4e4b\u540e\uff0c\u65b0\u8001\u6570\u7ec4\u6570\u636e\u4f1a\u6839\u636e <code>track-by</code> \u7279\u6027\u503c\u6240\u4ee3\u8868\u7684\u5b57\u6bb5\u91cd\u65b0\u5339\u914d\uff0c\u7136\u540e\u518d\u51b3\u5b9a\u6e32\u67d3\u5c42\u5e94\u8be5\u65b0\u5efa\u6216\u5220\u9664\u4e00\u4e2a\u7ec4\u4ef6\uff1f\u8fd8\u662f\u79fb\u52a8\u4e00\u4e2a\u7ec4\u4ef6\uff1f\u8fd8\u662f\u8bb2\u7ec4\u4ef6\u4fdd\u6301\u539f\u6765\u7684\u4f4d\u7f6e\u3002\u9ed8\u8ba4\u7684 <code>track-by</code> \u7684\u503c\u5c31\u662f\u6570\u7ec4\u7684\u7d22\u5f15\u503c\u3002\u4f8b\u5982\uff1a</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">repeat</span>=<span class="string">"person in list"</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;person.gender&#125;&#125;"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;$index&#125;&#125; - &#123;&#123;person.id&#125;&#125; - &#123;&#123;person.nickname&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span>&gt;</span>----<span class="tag">&lt;/<span class="name"
 >text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">repeat</span>=<span class="string">"person in list"</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;person.gender&#125;&#125;"</span> <span class="attr">track-by</span>=<span class="string">"id"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;$index&#125;&#125; - &#123;&#123;person.id&#125;&#125; - &#123;&#123;person.nickname&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span>&gt;</span>----<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="comment">&lt;!-- something wrong here: duplicated track-by value --&gt;</span></di
 v><div class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">repeat</span>=<span class="string">"person in list"</span> <span class="attr">class</span>=<span class="string">"&#123;&#123;person.gender&#125;&#125;"</span> <span class="attr">track-by</span>=<span class="string">"nickname"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">text</span>&gt;</span>&#123;&#123;$index&#125;&#125; - &#123;&#123;person.id&#125;&#125; - &#123;&#123;person.nickname&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span clas
 s="css"></span></div><div class="line">  <span class="selector-class">.male</span> &#123; <span class="attribute">background-color</span>: <span class="number">#9999ff</span>; &#125;</div><div class="line">  <span class="selector-class">.female</span> &#123; <span class="attribute">background-color</span>: <span class="number">#ff9999</span>; &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line"><span class="built_in">module</span>.exports = &#123;</div><div class="line">  <span class="attr">data</span>: &#123;</div><div class="line">    <span class="attr">list</span>: [</div><div class="line">      &#123; <span class="attr">id</span>: <span class="number">11</span>, <span class="attr">gender</span>: <span class="string">'male'</span>, <span class="attr">nickname</span>: <span
  class="string">'Li Lei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">id</span>: <span class="number">22</span>, <span class="attr">gender</span>: <span class="string">'female'</span>, <span class="attr">nickname</span>: <span class="string">'Han Meimei'</span> &#125;,</div><div class="line">      &#123; <span class="attr">id</span>: <span class="number">33</span>, <span class="attr">gender</span>: <span class="string">'male'</span>, <span class="attr">nickname</span>: <span class="string">'Jim Green'</span> &#125;</div><div class="line">    ]</div><div class="line">  &#125;,</div><div class="line">  <span class="attr">ready</span>: <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</div><div class="line">    <span class="keyword">this</span>.list.unshift(&#123; <span class="attr">id</span>: <span class="number">44</span>, <span class="attr">gender</span>: <span class="string">'female'</span>, <span clas
 s="attr">nickname</span>: <span class="string">'Han Meimei'</span> &#125;)</div><div class="line">  &#125;</div><div class="line">&#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p><a href="http://dotwe.org/c124bfc21e6d92271356acbea232089b" target="_blank" rel="external">\u4f53\u9a8c\u4e00\u4e0b</a></p>
+<p>\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7b2c\u4e00\u4e2a\u5217\u8868\u7684\u66f4\u65b0\u7b56\u7565\u662f\uff1a</p>
+<ol>
+<li>\u628a\u7b2c\u4e00\u4e2a <code>&lt;text&gt;</code> \u8d4b\u503c\u4e3a <code>Han Meimei</code></li>
+<li>\u7b2c\u4e8c\u4e2a\u8d4b\u503c\u4e3a <code>Li Lei</code></li>
+<li>\u7b2c\u4e09\u4e2a\u8d4b\u503c\u4e3a <code>Han Meimei</code></li>
+<li>\u6700\u540e\u65b0\u5efa\u4e00\u4e2a <code>&lt;text&gt;</code> \u5e76\u8d4b\u503c\u4e3a <code>Jin Green</code></li>
+</ol>
+<p>\u7b2c\u4e8c\u4e2a\u5217\u8868\u7684\u66f4\u65b0\u7b56\u7565\u662f\uff1a</p>
+<ol>
+<li>\u5728\u6700\u524d\u9762\u65b0\u5efa\u4e00\u4e2a <code>&lt;text&gt;</code> \u5e76\u8d4b\u503c\u4e3a <code>Han Meimei</code></li>
+</ol>
+<p>\u7b2c\u4e09\u4e2a\u5217\u8868\u7684\u66f4\u65b0\u4f1a\u9047\u5230\u95ee\u9898\uff0c\u56e0\u4e3a\u6709\u4e24\u4e2a\u6570\u7ec4\u9879\u76ee\u7684 <code>nickname</code> \u503c\u90fd\u662f <code>Han Meimei</code> \u6240\u4ee5\u9020\u6210\u610f\u6599\u4e4b\u5916\u7684\u6e32\u67d3\u7ed3\u679c (\u53ea\u6e32\u67d3\u4e86\u4e09\u4e2a\u6570\u7ec4\u9879\u76ee)\u3002</p>
+<p>\u4e0b\u4e00\u8282\uff1a<a href="./render-logic.html">\u6e32\u67d3\u8fc7\u7a0b\u63a7\u5236</a></p>
+
+  </div>
+  
+</article>
+</div>
+  
+  <footer id="footer">
+  <div class="row clearfix">
+    <div class="ali-logo">
+      <img src="//gw.alicdn.com/tps/TB1Ef93PXXXXXaXXpXXXXXXXXXX-252-126.png" alt="Alibaba">
+    </div>
+    <div class="dropdown select-lang">
+      <a href="javascript:;" class="dropdown-toggle">
+        Language
+        <span class="caret"></span>
+      </a>
+      <ul class="dropdown-menu pick-lang">
+        <li>
+          <a href="/v-0.10/guide/syntax/display-logic.html" data-lang="en">English</a>
+        </li>
+        <li>
+          <a href="/cn/v-0.10/guide/syntax/display-logic.html" data-lang="zh-cn">\u4e2d\u6587</a>
+        </li>
+      </ul>
+    </div>
+  </div>
+  <div class="row">
+    <p><span>Released under </span><a href="">Apache License 2.0</a></p>
+  </div>
+  <div class="row clearfix">
+    <div class="cell"><span>Copyright(c) 2016 </span><a href="https://www.alibaba.com">Alibaba</a></div>
+    <div class="cell"><span>Designed by </span><a href="">\u963f\u91cc\u4e91UED AX</a></div>
+  </div>
+</footer>
+  <div style="display: none;">
+  <script src="//s95.cnzz.com/z_stat.php?id=1261102667&amp;web_id=1261102667" language="JavaScript"></script>
+</div>
+
+  <script src="/js/reqwest.js"></script>
+  <script src="/js/common.js"></script>
+</body>
+</html>