Repository: incubator-weex-site
Updated Branches:
  refs/heads/master 365f3f1f7 -> e8f38a296


* [doc] Update text.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/commit/c1ce9a48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/tree/c1ce9a48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex-site/diff/c1ce9a48

Branch: refs/heads/master
Commit: c1ce9a484b61d40f1deffe6fb419024f2a80cf78
Parents: 7136962
Author: york.sy <[email protected]>
Authored: Thu Jan 18 22:34:39 2018 +0800
Committer: york.sy <[email protected]>
Committed: Thu Jan 18 22:34:39 2018 +0800

----------------------------------------------------------------------
 source/cn/references/components/text.md | 132 ++++-----------------------
 source/references/components/text.md    | 112 +++--------------------
 2 files changed, 30 insertions(+), 214 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/c1ce9a48/source/cn/references/components/text.md
----------------------------------------------------------------------
diff --git a/source/cn/references/components/text.md 
b/source/cn/references/components/text.md
index 8e49780..f4762ca 100644
--- a/source/cn/references/components/text.md
+++ b/source/cn/references/components/text.md
@@ -6,132 +6,38 @@ order: 8.13
 version: 2.1
 ---
 
-# &lt;text&gt;
-
 `<text>` 是 Weex 内置的组件,用来将文本按照指定的æ 
·å¼æ¸²æŸ“出来。`<text>` 只能包含文本值,你可以使用 `{% raw 
%}{{}}{% endraw %}` 标记插入变量值作为文本内容。
 
-## 子组件
-
-此组件不支持子组件。
+> **注意:** `<text>` 
里直接写文本头尾空白会被过滤,如果需要保留头尾空白,暂时只能通过数据绑定写头尾空æ
 ¼ã€‚
 
-## 特性
+> **注意:** `<text>`不支持子组件。
 
-- `value {string}`: 组件的值,与 `<text>` 标签中的文本内
容相同。
+## 属性
+* `value {string}`: 组件的值,与 `<text>` 标签中的文本内
容相同。
 
 ## 样式
-
-- `lines {number}`: 指定文本行数。默认值是 `0` 
代表不限制行数。
-- text styles: 查看 [文本样式](../text-style.html)
-
-  - 支持 `color` 样式.
-  - 支持 `font-size` 样式. 
iOS默认值:`32`,Android:不同设备不同,H5 默认值:`32`.
-  - 支持 `font-style` 样式.
-  - 支持 `font-weight` 样式.
-  - 支持 `text-align` 样式.
-  - 支持 `text-decoration` 样式.
-  - 支持 `text-overflow` 样式.
-  - 支持 `line-height`样式<sup class="wx-v">0.6.1+</sup>
-  - 不支持 `flex-direction`, `justify-content`, `align-items` 
这些为子节点设置的属性,并且`<text>`没有子节点。
-
-- 通用样式:支持所有通用样式
-
-  - 盒模型
-  - `flexbox` 布局
-  - `position`
-  - `opacity`
-  - `background-color`
-
-  查看 [组件通用样式](../common-style.html)
+* 支持 **[通用样式](../../wiki/common-styles.html)。**
+* `lines {number}`: 指定文本行数。默认值是 `0`, 
代表不限制行数。
+* 支持 **[文本样式](../wiki/text-style.html)。**
+  * 支持 `color` 样式.
+  * 支持 `font-size` 样式,默认值为`32`.
+  * 支持 `font-style` 样式.
+  * 支持 `font-weight` 样式.
+  * 支持 `text-align` 样式.
+  * 支持 `text-decoration` 样式.
+  * 支持 `text-overflow` 样式.
+  * 支持 `line-height`样式<sup class="wx-v">0.6.1+</sup>
 
 ## 事件
+支持 **[通用事件](../../wiki/common-events.html)**.
 
-- 通用事件
-  支持所有通用事件:
-
-  - `click`
-  - `longpress`
-  - `appear`
-  - `disappear`
-
-  查看 [通用事件](../common-event.html)
-
-## 约束
-
-1. `<text>` 
里直接写文本头尾空白会被过滤,如果需要保留头尾空白,暂时只能通过数据绑定写头尾空æ
 ¼ã€‚
-
-## iconfont
-
+## 自定义字体
 `支持版本:v0.12.0`
 
 支持ttf和woff字体格式的自定义字体, 可以通过调用 `dom` 
module 里面的 [addRule](../modules/dom.html#addRule)方法, 
构建自定义的`font-family`使用, addRule 建议在 `beforeCreate` 或者
更早时调用
 
-```html
-<template>
-    <div style='flex-direction:row;margin-top:50px'>
-        <text 
style='font-family:iconfont4;font-size:50;color:green'>&#xe614;&#xe612;&#xe613;</text>
-        <text 
style='font-family:iconfont4;font-size:50;'>&#xe614;&#xe612;&#xe613;&#xe61d;&#xe714;</text>
-        <text 
style='font-family:iconfont4;font-size:60;color:blue'>&#xe711;</text>
-        <text 
style='font-family:iconfont4;font-size:60;color:green'>&#xe71c;&#xe60b;</text>
-    </div>
-</template>
-<script>
-    module.exports = {
-        beforeCreate: function() {
-
-        var domModule = weex.requireModule('dom');
-        //目前支持ttf、woff文件,不支持svg、eot类型,moreItem at 
http://www.iconfont.cn/
-
-        domModule.addRule('fontFace', {
-            'fontFamily': "iconfont2",
-            'src': "url('http://at.alicdn.com/t/font_1469606063_76593.ttf')"
-        });
-    }
-}
-</script>
-```
-
-[try it](http://dotwe.org/vue/95b2c6716f37066d5f44c5c75c979394)
-
 ## 示例
-
-```html
-<template>
-  <div class="wrapper">
-    <div class="panel">
-      <text class="text" lines="3">Weex 
是一套简单易用的跨平台开发方案,能以 Web 
的开发体验构建高性能、可扩展的原生应用。Vue 
是一个轻量并且功能强大的渐进式前端框架。</text>
-    </div>
-    <div class="panel">
-      <text class="text" lines="3">Weex is an cross-platform development 
solution that builds high-performance, scalable native applications with a Web 
development experience. Vue is a lightweight and powerful progressive front-end 
framework. </text>
-    </div>
-  </div>
-</template>
-
-
-<style scoped>
-  .wrapper {
-    flex-direction: column;
-    justify-content: center;
-  }
-  .panel {
-    width: 600px;
-    margin-left: 75px;
-    border-width: 2px;
-    border-style: solid;
-    border-color: #BBB;
-    padding-top: 15px;
-    padding-bottom: 15px;
-    padding-left: 15px;
-    padding-right: 15px;
-    margin-bottom: 30px;
-  }
-  .text {
-    lines: 3;
-    color: #666666;
-    font-size: 32px;
-  }
-</style>
-```
-
-[try it](http://dotwe.org/vue/154e20171d350a081fba7878c53cf7d2)
+* 
[`<text>`的基本用法](http://dotwe.org/vue/9ac60ccb4d1aacbdbd608dd7107ad105)
+* 
[自定义字体的使用方法](http://dotwe.org/vue/1cac4b398df5bb65ed21e83deceead1c)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/c1ce9a48/source/references/components/text.md
----------------------------------------------------------------------
diff --git a/source/references/components/text.md 
b/source/references/components/text.md
index 468db44..ec41932 100644
--- a/source/references/components/text.md
+++ b/source/references/components/text.md
@@ -6,30 +6,20 @@ order: 8.12
 version: 2.1
 ---
 
-# &lt;text&gt;
-
 The weex builtin component 'text' is used to render text with specified 
style rule. <text> tag can contain text value only. You can use variable 
interpolation in the text content with the mark `{% raw %}{{}}{% endraw %}`.
 
-## Child Components
-
-This component supports no child components.
+> **Note:** This component supports no child components.
 
 ## Attributes
-
 * value(string): text value of this component. This is equal to the content 
of 'text'.
 
-### example
-
-```
-var textComponent = this.$el("textid");
-this.text = textComponent.attr.value;
-```
+      var textComponent = this.$el("textid");
+      this.text = textComponent.attr.value;
 
 ## Styles
-
+* Support [common styles for components](../wiki/common-style.html)
 * lines: specify the text lines. Default value is `0` for unlimited.
-* text styles: check out [text styles](../text-style.html)
-
+* Support [text styles](../wiki/text-style.html)
   * support 'color' style.
   * support 'font-size' style. iOS: default vlaue `32`. Android: platform 
specify. HTML5: default value `32`.
   * support 'font-style' style.
@@ -38,95 +28,15 @@ this.text = textComponent.attr.value;
   * support 'text-decoration' style.
   * support 'text-overflow' style.
   * support 'line-height'(available from v0.6.1) style.
-  * not support 'flex-direction, 'justify-content', 'align-items' which is 
active for child nodes, and text has no child nodes.
-
-### common styles
-check out [common styles for components](../common-style.html)
-
-* support flexbox related styles.
-* support box model related styles.
-* support 'position' related styles.
-* support 'opacity', 'background-color' etc.
 
 ## Events
+Support [common events](../common-event.html)
 
-### common events
-check out [common events](../common-event.html)
-
-* support 'click' event.
-* support 'appear' / 'disappear' event.
-
-## iconfont
-
+## Custom Typeface
 `support:v0.12.0`
 
-support `ttf` and `woff` font format to custom your text, call 
[addRule](../modules/dom.html#addRule) in dom module to build your own 
`font-family`, we suggest that you call `addRule` in `beforeCreate`
-
-```html
-<template>
-    <div style='flex-direction:row;margin-top:50px'>
-        <text 
style='font-family:iconfont4;font-size:50;color:green'>&#xe614;&#xe612;&#xe613;</text>
-        <text 
style='font-family:iconfont4;font-size:50;'>&#xe614;&#xe612;&#xe613;&#xe61d;&#xe714;</text>
-        <text 
style='font-family:iconfont4;font-size:60;color:blue'>&#xe711;</text>
-        <text 
style='font-family:iconfont4;font-size:60;color:green'>&#xe71c;&#xe60b;</text>
-    </div>
-</template>
-<script>
-    module.exports = {
-        beforeCreate: function() {
-
-        var domModule = weex.requireModule('dom');
-        //support ttf、woff file,svg、eot can not be supported ,moreItem 
at http://www.iconfont.cn/
-
-        domModule.addRule('fontFace', {
-            'fontFamily': "iconfont2",
-            'src': "url('http://at.alicdn.com/t/font_1469606063_76593.ttf')"
-        });
-    }
-}
-</script>
-```
-
-[try it](http://dotwe.org/vue/95b2c6716f37066d5f44c5c75c979394)
-
-## Example
-
-```html
-<template>
-  <div class="wrapper">
-    <div class="panel">
-      <text class="text" lines="3">Weex 
是一套简单易用的跨平台开发方案,能以 Web 
的开发体验构建高性能、可扩展的原生应用。Vue 
是一个轻量并且功能强大的渐进式前端框架。</text>
-    </div>
-    <div class="panel">
-      <text class="text" lines="3">Weex is an cross-platform development 
solution that builds high-performance, scalable native applications with a Web 
development experience. Vue is a lightweight and powerful progressive front-end 
framework. </text>
-    </div>
-  </div>
-</template>
-
-
-<style scoped>
-  .wrapper {
-    flex-direction: column;
-    justify-content: center;
-  }
-  .panel {
-    width: 600px;
-    margin-left: 75px;
-    border-width: 2px;
-    border-style: solid;
-    border-color: #BBB;
-    padding-top: 15px;
-    padding-bottom: 15px;
-    padding-left: 15px;
-    padding-right: 15px;
-    margin-bottom: 30px;
-  }
-  .text {
-    lines: 3;
-    color: #666666;
-    font-size: 32px;
-  }
-</style>
-```
+support `ttf` and `woff` font format to custom your text, call 
[addRule](../modules/dom.html#addRule) in dom module to build your own 
`font-family`, we suggest that you call `addRule` in `beforeCreate`.
 
-[try it](http://dotwe.org/vue/154e20171d350a081fba7878c53cf7d2)
+## Examples
+* [Basic usage for 
`<text>`](http://dotwe.org/vue/9ac60ccb4d1aacbdbd608dd7107ad105).
+* [Usage for custom 
typeface](http://dotwe.org/vue/1cac4b398df5bb65ed21e83deceead1c).
\ No newline at end of file

Reply via email to