http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/f3d58bd0/cn/references/unit.html ---------------------------------------------------------------------- diff --git a/cn/references/unit.html b/cn/references/unit.html deleted file mode 100644 index d8eb6c4..0000000 --- a/cn/references/unit.html +++ /dev/null @@ -1,1390 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - - <title>CSS åä½ | Weex</title> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> - <meta name="description" content="CSS åä½CSS color åä½æ¯æ以ä¸åæ³ï¼ .classA &#123; /* 3-chars hex */ color: #0f0; /* 6-chars hex */ color: #00ff00; /* rgba */ color: rgb(255, 0, 0); /* rgba */ color: rgba(255, 0, 0, 0.5); /* transpar"> -<meta property="og:type" content="website"> -<meta property="og:title" content="CSS åä½"> -<meta property="og:url" content="https://weex-project.io/cn/references/unit.html"> -<meta property="og:site_name" content="Weex"> -<meta property="og:description" content="CSS åä½CSS color åä½æ¯æ以ä¸åæ³ï¼ .classA &#123; /* 3-chars hex */ color: #0f0; /* 6-chars hex */ color: #00ff00; /* rgba */ color: rgb(255, 0, 0); /* rgba */ color: rgba(255, 0, 0, 0.5); /* transpar"> -<meta property="og:updated_time" content="2017-04-28T02:36:21.000Z"> -<meta name="twitter:card" content="summary"> -<meta name="twitter:title" content="CSS åä½"> -<meta name="twitter:description" content="CSS åä½CSS color åä½æ¯æ以ä¸åæ³ï¼ .classA &#123; /* 3-chars hex */ color: #0f0; /* 6-chars hex */ color: #00ff00; /* rgba */ color: rgb(255, 0, 0); /* rgba */ color: rgba(255, 0, 0, 0.5); /* transpar"> - - <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="references" class="lang-cn"> - - <script> - window.PAGE_TYPE = "references"; - 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">æç¨</a></li> - <li><a href="/cn/references">æå</a></li> - <li class="dropdown"> - <a href="javascript:;">åè</a> - <ul class="dropdown-menu subnav"> - <li> - <a href="/cn/faq.html">FAQ</a> - </li> - <li> - <a href="/cn/releasenote.html">çæ¬è¯´æ</a> - </li> - </ul> - </li> - <li class="dropdown"> - <a href="javascript:;">å·¥å ·åæå¡</a> - <ul class="dropdown-menu subnav"> - <li> - <a href="/cn/playground.html">Playground</a> - </li> - <li> - <a href="/cn/guide/tools/toolkit.html">Weex-toolkit</a> - </li> - <li> - <a href="http://dotwe.org" target="_blank">Code Snippets</a> - </li> - <li> - <a href="https://market.dotwe.org" target="_blank">Market</a> - </li> - </ul> - </li> - </ul> - <ul class="info"> - <li><a href="https://github.com/apache/incubator-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"> <!-- æç´¢æ¡ç¸å ³ --> - <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="/references/unit.html" data-lang="en">English</a> - </li> - <li> - <a href="/cn/references/unit.html" data-lang="zh-cn">ä¸æ</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"> <!-- æç´¢æ¡ç¸å ³ --> - <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"> - - æå - - </h2> - <ul class="doc-summary"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <li> - <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">éç¨ç¹æ§</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a> - </li> - - <li> - <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a> - </li> - - <li> - <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a> - </li> - - <li> - <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a> - </li> - - <li> - <a href="/cn/references/common-style.html" class="sidebar-link ">éç¨æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/text-style.html" class="sidebar-link ">ææ¬æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/color-names.html" class="sidebar-link ">é¢è²å称å表</a> - </li> - - <li> - <a href="/cn/references/gesture.html" class="sidebar-link ">æå¿</a> - </li> - - <li> - <a href="/cn/references/path.html" class="sidebar-link ">Path (è±)</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">å 建ç»ä»¶</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/components/a.html" class="sidebar-link "><a></a> - </li> - - <li> - <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a> - </li> - - <li> - <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a> - </li> - - <li> - <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a> - </li> - - <li> - <a href="/cn/references/components/text.html" class="sidebar-link "><text></a> - </li> - - <li> - <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a> - </li> - - <li> - <a href="/cn/references/components/video.html" class="sidebar-link "><video></a> - </li> - - <li> - <a href="/cn/references/components/web.html" class="sidebar-link "><web></a> - </li> - - <li> - <a href="/cn/references/components/div.html" class="sidebar-link "><div></a> - </li> - - <li> - <a href="/cn/references/components/image.html" class="sidebar-link "><image></a> - </li> - - <li> - <a href="/cn/references/components/input.html" class="sidebar-link "><input></a> - </li> - - <li> - <a href="/cn/references/components/list.html" class="sidebar-link "><list></a> - </li> - - <li> - <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a> - </li> - - <li> - <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a> - </li> - - <li> - <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a> - </li> - - <li> - <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">å 建模å</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a> - </li> - - <li> - <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a> - </li> - - <li> - <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a> - </li> - - <li> - <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a> - </li> - - <li> - <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a> - </li> - - <li> - <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a> - </li> - - <li> - <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a> - </li> - - <li> - <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a> - </li> - - <li> - <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a> - </li> - - <li> - <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a> - </li> - - <li> - <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link current ">CSS åä½</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">éç¨äºä»¶</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex å®ä¾åé</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web æ å</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x å¨ Weex å Web ä¸çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link ">ä½¿ç¨ Vuex å vue-router</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link ">é«é¶ç¥è¯</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link ">iOS æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">æå± JS framework</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">éæ Devtools å° Android</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">éæ Devtools å° iOS</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">è¿ç§»</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex å Web å¹³å°çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">å¦ä½å°åæ Weex 项ç®æ¹é æ Vue çæ¬</a> - </li> - - <li> - <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex å Vue 2.x çè¯æ³å·®å¼</a> - </li> - - </ul> - - </li> - - - - <li> - <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">æ§è¯æ³ææ¡£</a></h3> - </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"> - - æå - - </h2> - <ul class="doc-summary"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <li> - <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">éç¨ç¹æ§</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a> - </li> - - <li> - <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a> - </li> - - <li> - <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a> - </li> - - <li> - <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a> - </li> - - <li> - <a href="/cn/references/common-style.html" class="sidebar-link ">éç¨æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/text-style.html" class="sidebar-link ">ææ¬æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/color-names.html" class="sidebar-link ">é¢è²å称å表</a> - </li> - - <li> - <a href="/cn/references/gesture.html" class="sidebar-link ">æå¿</a> - </li> - - <li> - <a href="/cn/references/path.html" class="sidebar-link ">Path (è±)</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">å 建ç»ä»¶</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/components/a.html" class="sidebar-link "><a></a> - </li> - - <li> - <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a> - </li> - - <li> - <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a> - </li> - - <li> - <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a> - </li> - - <li> - <a href="/cn/references/components/text.html" class="sidebar-link "><text></a> - </li> - - <li> - <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a> - </li> - - <li> - <a href="/cn/references/components/video.html" class="sidebar-link "><video></a> - </li> - - <li> - <a href="/cn/references/components/web.html" class="sidebar-link "><web></a> - </li> - - <li> - <a href="/cn/references/components/div.html" class="sidebar-link "><div></a> - </li> - - <li> - <a href="/cn/references/components/image.html" class="sidebar-link "><image></a> - </li> - - <li> - <a href="/cn/references/components/input.html" class="sidebar-link "><input></a> - </li> - - <li> - <a href="/cn/references/components/list.html" class="sidebar-link "><list></a> - </li> - - <li> - <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a> - </li> - - <li> - <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a> - </li> - - <li> - <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a> - </li> - - <li> - <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">å 建模å</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a> - </li> - - <li> - <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a> - </li> - - <li> - <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a> - </li> - - <li> - <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a> - </li> - - <li> - <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a> - </li> - - <li> - <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a> - </li> - - <li> - <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a> - </li> - - <li> - <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a> - </li> - - <li> - <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a> - </li> - - <li> - <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a> - </li> - - <li> - <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link current ">CSS åä½</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">éç¨äºä»¶</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex å®ä¾åé</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web æ å</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x å¨ Weex å Web ä¸çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link ">ä½¿ç¨ Vuex å vue-router</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link ">é«é¶ç¥è¯</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link ">iOS æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">æå± JS framework</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">éæ Devtools å° Android</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">éæ Devtools å° iOS</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">è¿ç§»</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex å Web å¹³å°çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">å¦ä½å°åæ Weex 项ç®æ¹é æ Vue çæ¬</a> - </li> - - <li> - <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex å Vue 2.x çè¯æ³å·®å¼</a> - </li> - - </ul> - - </li> - - - - <li> - <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">æ§è¯æ³ææ¡£</a></h3> - </li> - - </ul> -</div> - </div> - - -<article class="article article-type-references"> - <div class="article-entry" itemprop="articleBody"> - <header class="article-header"> - - - <h1 class="article-title" itemprop="name"> - CSS åä½ - </h1> - - - <time class="article-date" datetime="2017-04-28T02:36:21.000Z">Updated time: 28/04/2017</time> -</header> - <h1 id="CSS-åä½"><a href="#CSS-åä½" class="headerlink" title="CSS åä½"></a>CSS åä½</h1><h2 id="CSS-color-åä½"><a href="#CSS-color-åä½" class="headerlink" title="CSS color åä½"></a>CSS <code>color</code> åä½</h2><p>æ¯æ以ä¸åæ³ï¼</p> -<figure class="highlight css"><table><tr><td class="code"><pre><div class="line"><span class="selector-class">.classA</span> {</div><div class="line"> <span class="comment">/* 3-chars hex */</span></div><div class="line"> <span class="attribute">color</span>: <span class="number">#0f0</span>;</div><div class="line"> <span class="comment">/* 6-chars hex */</span></div><div class="line"> <span class="attribute">color</span>: <span class="number">#00ff00</span>;</div><div class="line"> <span class="comment">/* rgba */</span></div><div class="line"> <span class="attribute">color</span>: <span class="built_in">rgb</span>(255, 0, 0);</div><div class="line"> <span class="comment">/* rgba */</span></div><div class="line"> <span class="attribute">color</span>: <span class="built_in">rgba</span>(255, 0, 0, 0.5);</div><div class="line"> <span class="comment">/* transparent */</span></div><div class="line"> <span class="attribute">color</span>: transparent;</div><div class="line" > <span class="comment">/* Basic color keywords */</span></div><div > class="line"> <span class="attribute">color</span>: orange;</div><div > class="line"> <span class="comment">/* Extended color keywords > */</span></div><div class="line"> <span class="attribute">color</span>: > darkgray;</div><div > class="line">}</div></pre></td></tr></table></figure> -<h3 id="注æ"><a href="#注æ" class="headerlink" title="注æ"></a>注æ</h3><ul> -<li><p>ä¸æ¯æ <code>hsl()</code>, <code>hsla()</code>, <code>currentColor</code>, 8个å符çåå è¿å¶é¢è²ã</p> -</li> -<li><p><code>rgb(a,b,c)</code> æ <code>rgba(a,b,c,d)</code> çæ§è½æ¯å ¶ä»é¢è²æ ¼å¼å·®å¾å¤ï¼è¯·éæ©åéçé¢è²æ ¼å¼ã</p> -</li> -</ul> -<p>é¢è²å称å¯æ¥ç <a href="./color-names.html">é¢è²å称å表</a>.</p> -<h2 id="CSS-length-åä½"><a href="#CSS-length-åä½" class="headerlink" title="CSS length åä½"></a>CSS <code>length</code> åä½</h2><p>å¨ Weex ä¸ï¼æ们åªæ¯æ <code>px</code> é¿åº¦åä½ã并ä¸å®å°å¨ JavaScript è¿è¡æ¶åæ¬æºæ¸²æå¨ä¸è§£æ为æ°åç±»åã</p> -<p>ä¸é¢è¿äºä¸åçåæ³ï¼è§£æçç»æå®å ¨ç¸åã</p> -<figure class="highlight css"><table><tr><td class="code"><pre><div class="line"><span class="selector-class">.classA</span> { <span class="attribute">font-size</span>: <span class="number">48px</span>; <span class="attribute">line-height</span>: <span class="number">64px</span>; }</div></pre></td></tr></table></figure> -<p>ä¸æ¯æ类似 <code>em</code>ï¼<code>rem</code>ï¼<code>pt</code> è¿æ ·ç CSS æ åä¸çå ¶ä»é¿åº¦åä½ã</p> -<h2 id="CSS-number-åä½"><a href="#CSS-number-åä½" class="headerlink" title="CSS number åä½"></a>CSS <code>number</code> åä½</h2><p>ä» ä» ä¸ä¸ªæ°åãç¨äº <a href="./common-style.html"><code>opacity</code></a>ï¼<a href="./text-style.html"><code>lines</code></a>çã</p> -<p>ææ¶å¼å¿ é¡»æ¯æ´æ°ï¼ä¾å¦ï¼<code>lines</code>ã</p> -<h2 id="CSS-percentage-åä½-æä¸æ¯æ"><a href="#CSS-percentage-åä½-æä¸æ¯æ" class="headerlink" title="CSS percentage åä½ (æä¸æ¯æ)"></a>CSS <code>percentage</code> åä½ (æä¸æ¯æ)</h2><p>表示ç¾åæ¯å¼ï¼å¦â50ï¼ âï¼â66.7ï¼ âçã</p> -<p>å®æ¯ CSS æ åçä¸é¨åï¼ä½ Weex æä¸æ¯æã</p> - - </div> - -</article> -</div> - - <footer id="footer"> - <div class="row clearfix"> - <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="/references/unit.html" data-lang="en">English</a> - </li> - <li> - <a href="/cn/references/unit.html" data-lang="zh-cn">ä¸æ</a> - </li> - </ul> - </div> - </div> - <div class="disclaimer"> - <div><img src="//gw.alicdn.com/tfs/TB1pTBZQFXXXXX9XXXXXXXXXXXX-794-280.png" width="200px" alt="Apache Incubator"></div> - <div><span class="title">Disclaimer:</span> Apache Weex is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</div> - <br/> - </div> - <hr> - <div class="row"> - <p> <img src="//gw.alicdn.com/tfs/TB1bg8SQFXXXXcHXXXXXXXXXXXX-85-170.png" height="50px" alt="Apache"><span>Copyright(c) 2017 The Apache Software Foundation. Licensed under the </span> <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a></p> - </div> - <div class="row clearfix"> - <div></div> - </div> -</footer> - <div style="display: none;"> - <script src="//s95.cnzz.com/z_stat.php?id=1261496509&web_id=1261496509" 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/f3d58bd0/cn/references/vue/difference-of-vuex.html ---------------------------------------------------------------------- diff --git a/cn/references/vue/difference-of-vuex.html b/cn/references/vue/difference-of-vuex.html deleted file mode 100644 index fa7ffb6..0000000 --- a/cn/references/vue/difference-of-vuex.html +++ /dev/null @@ -1,1400 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - - <title>ä½¿ç¨ Vuex å vue-router | Weex</title> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> - <meta name="description" content="ä½¿ç¨ Vuex å vue-routerVue.js ä¹æè¾å¤å¨è¾¹ææ¯äº§åï¼å¦ Vuex å vue-router çï¼è¿äºåºä¹å¯ä»¥å¨ Weex ä¸å¾å¥½çå·¥ä½ã æ们åºäº Weex å Vue å¼åäºä¸ä¸ªçå®æ´é¡¹ç® weex-hackernews ï¼å¨é¡¹ç®ä¸ä½¿ç¨äº Vuex å vue-router ï¼è½å¤å®ç°åä¸ä»½ä»£ç ï¼å¨ iOSãAndroidãWeb ä¸é½è½å®æ´å°å·¥ä½ã ä½¿ç¨ Vuex"> -<meta property="og:type" content="website"> -<meta property="og:title" content="ä½¿ç¨ Vuex å vue-router"> -<meta property="og:url" content="https://weex-project.io/cn/references/vue/difference-of-vuex.html"> -<meta property="og:site_name" content="Weex"> -<meta property="og:description" content="ä½¿ç¨ Vuex å vue-routerVue.js ä¹æè¾å¤å¨è¾¹ææ¯äº§åï¼å¦ Vuex å vue-router çï¼è¿äºåºä¹å¯ä»¥å¨ Weex ä¸å¾å¥½çå·¥ä½ã æ们åºäº Weex å Vue å¼åäºä¸ä¸ªçå®æ´é¡¹ç® weex-hackernews ï¼å¨é¡¹ç®ä¸ä½¿ç¨äº Vuex å vue-router ï¼è½å¤å®ç°åä¸ä»½ä»£ç ï¼å¨ iOSãAndroidãWeb ä¸é½è½å®æ´å°å·¥ä½ã ä½¿ç¨ Vuex"> -<meta property="og:image" content="https://vuex.vuejs.org/zh-cn/images/vuex.png"> -<meta property="og:updated_time" content="2017-04-28T02:36:21.000Z"> -<meta name="twitter:card" content="summary"> -<meta name="twitter:title" content="ä½¿ç¨ Vuex å vue-router"> -<meta name="twitter:description" content="ä½¿ç¨ Vuex å vue-routerVue.js ä¹æè¾å¤å¨è¾¹ææ¯äº§åï¼å¦ Vuex å vue-router çï¼è¿äºåºä¹å¯ä»¥å¨ Weex ä¸å¾å¥½çå·¥ä½ã æ们åºäº Weex å Vue å¼åäºä¸ä¸ªçå®æ´é¡¹ç® weex-hackernews ï¼å¨é¡¹ç®ä¸ä½¿ç¨äº Vuex å vue-router ï¼è½å¤å®ç°åä¸ä»½ä»£ç ï¼å¨ iOSãAndroidãWeb ä¸é½è½å®æ´å°å·¥ä½ã ä½¿ç¨ Vuex"> -<meta name="twitter:image" content="https://vuex.vuejs.org/zh-cn/images/vuex.png"> - - <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="references" class="lang-cn"> - - <script> - window.PAGE_TYPE = "references"; - 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">æç¨</a></li> - <li><a href="/cn/references">æå</a></li> - <li class="dropdown"> - <a href="javascript:;">åè</a> - <ul class="dropdown-menu subnav"> - <li> - <a href="/cn/faq.html">FAQ</a> - </li> - <li> - <a href="/cn/releasenote.html">çæ¬è¯´æ</a> - </li> - </ul> - </li> - <li class="dropdown"> - <a href="javascript:;">å·¥å ·åæå¡</a> - <ul class="dropdown-menu subnav"> - <li> - <a href="/cn/playground.html">Playground</a> - </li> - <li> - <a href="/cn/guide/tools/toolkit.html">Weex-toolkit</a> - </li> - <li> - <a href="http://dotwe.org" target="_blank">Code Snippets</a> - </li> - <li> - <a href="https://market.dotwe.org" target="_blank">Market</a> - </li> - </ul> - </li> - </ul> - <ul class="info"> - <li><a href="https://github.com/apache/incubator-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"> <!-- æç´¢æ¡ç¸å ³ --> - <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="/references/vue/difference-of-vuex.html" data-lang="en">English</a> - </li> - <li> - <a href="/cn/references/vue/difference-of-vuex.html" data-lang="zh-cn">ä¸æ</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"> <!-- æç´¢æ¡ç¸å ³ --> - <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"> - - æå - - </h2> - <ul class="doc-summary"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <li> - <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">éç¨ç¹æ§</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a> - </li> - - <li> - <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a> - </li> - - <li> - <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a> - </li> - - <li> - <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a> - </li> - - <li> - <a href="/cn/references/common-style.html" class="sidebar-link ">éç¨æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/text-style.html" class="sidebar-link ">ææ¬æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/color-names.html" class="sidebar-link ">é¢è²å称å表</a> - </li> - - <li> - <a href="/cn/references/gesture.html" class="sidebar-link ">æå¿</a> - </li> - - <li> - <a href="/cn/references/path.html" class="sidebar-link ">Path (è±)</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">å 建ç»ä»¶</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/components/a.html" class="sidebar-link "><a></a> - </li> - - <li> - <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a> - </li> - - <li> - <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a> - </li> - - <li> - <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a> - </li> - - <li> - <a href="/cn/references/components/text.html" class="sidebar-link "><text></a> - </li> - - <li> - <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a> - </li> - - <li> - <a href="/cn/references/components/video.html" class="sidebar-link "><video></a> - </li> - - <li> - <a href="/cn/references/components/web.html" class="sidebar-link "><web></a> - </li> - - <li> - <a href="/cn/references/components/div.html" class="sidebar-link "><div></a> - </li> - - <li> - <a href="/cn/references/components/image.html" class="sidebar-link "><image></a> - </li> - - <li> - <a href="/cn/references/components/input.html" class="sidebar-link "><input></a> - </li> - - <li> - <a href="/cn/references/components/list.html" class="sidebar-link "><list></a> - </li> - - <li> - <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a> - </li> - - <li> - <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a> - </li> - - <li> - <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a> - </li> - - <li> - <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">å 建模å</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a> - </li> - - <li> - <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a> - </li> - - <li> - <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a> - </li> - - <li> - <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a> - </li> - - <li> - <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a> - </li> - - <li> - <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a> - </li> - - <li> - <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a> - </li> - - <li> - <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a> - </li> - - <li> - <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a> - </li> - - <li> - <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a> - </li> - - <li> - <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link ">CSS åä½</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">éç¨äºä»¶</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex å®ä¾åé</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web æ å</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x å¨ Weex å Web ä¸çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link current ">ä½¿ç¨ Vuex å vue-router</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link ">é«é¶ç¥è¯</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link ">iOS æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">æå± JS framework</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">éæ Devtools å° Android</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">éæ Devtools å° iOS</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">è¿ç§»</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex å Web å¹³å°çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">å¦ä½å°åæ Weex 项ç®æ¹é æ Vue çæ¬</a> - </li> - - <li> - <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex å Vue 2.x çè¯æ³å·®å¼</a> - </li> - - </ul> - - </li> - - - - <li> - <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">æ§è¯æ³ææ¡£</a></h3> - </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"> - - æå - - </h2> - <ul class="doc-summary"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <li> - <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">éç¨ç¹æ§</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a> - </li> - - <li> - <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a> - </li> - - <li> - <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a> - </li> - - <li> - <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a> - </li> - - <li> - <a href="/cn/references/common-style.html" class="sidebar-link ">éç¨æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/text-style.html" class="sidebar-link ">ææ¬æ ·å¼</a> - </li> - - <li> - <a href="/cn/references/color-names.html" class="sidebar-link ">é¢è²å称å表</a> - </li> - - <li> - <a href="/cn/references/gesture.html" class="sidebar-link ">æå¿</a> - </li> - - <li> - <a href="/cn/references/path.html" class="sidebar-link ">Path (è±)</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">å 建ç»ä»¶</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/components/a.html" class="sidebar-link "><a></a> - </li> - - <li> - <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a> - </li> - - <li> - <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a> - </li> - - <li> - <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a> - </li> - - <li> - <a href="/cn/references/components/text.html" class="sidebar-link "><text></a> - </li> - - <li> - <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a> - </li> - - <li> - <a href="/cn/references/components/video.html" class="sidebar-link "><video></a> - </li> - - <li> - <a href="/cn/references/components/web.html" class="sidebar-link "><web></a> - </li> - - <li> - <a href="/cn/references/components/div.html" class="sidebar-link "><div></a> - </li> - - <li> - <a href="/cn/references/components/image.html" class="sidebar-link "><image></a> - </li> - - <li> - <a href="/cn/references/components/input.html" class="sidebar-link "><input></a> - </li> - - <li> - <a href="/cn/references/components/list.html" class="sidebar-link "><list></a> - </li> - - <li> - <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a> - </li> - - <li> - <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a> - </li> - - <li> - <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a> - </li> - - <li> - <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">å 建模å</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a> - </li> - - <li> - <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a> - </li> - - <li> - <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a> - </li> - - <li> - <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a> - </li> - - <li> - <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a> - </li> - - <li> - <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a> - </li> - - <li> - <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a> - </li> - - <li> - <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a> - </li> - - <li> - <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a> - </li> - - <li> - <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a> - </li> - - <li> - <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link ">CSS åä½</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">éç¨äºä»¶</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex å®ä¾åé</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web æ å</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x å¨ Weex å Web ä¸çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link current ">ä½¿ç¨ Vuex å vue-router</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link ">é«é¶ç¥è¯</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link ">iOS æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 æ©å±</a> - </li> - - <li> - <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">æå± JS framework</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">éæ Devtools å° Android</a> - </li> - - <li> - <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">éæ Devtools å° iOS</a> - </li> - - </ul> - - </li> - - <li> - <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">è¿ç§»</a></h3> - - <ul class="chapter"> - - <li> - <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex å Web å¹³å°çå·®å¼</a> - </li> - - <li> - <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">å¦ä½å°åæ Weex 项ç®æ¹é æ Vue çæ¬</a> - </li> - - <li> - <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex å Vue 2.x çè¯æ³å·®å¼</a> - </li> - - </ul> - - </li> - - - - <li> - <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">æ§è¯æ³ææ¡£</a></h3> - </li> - - </ul> -</div> - </div> - - -<article class="article article-type-references"> - <div class="article-entry" itemprop="articleBody"> - <header class="article-header"> - - - <h1 class="article-title" itemprop="name"> - ä½¿ç¨ Vuex å vue-router - </h1> - - - <time class="article-date" datetime="2017-04-28T02:36:21.000Z">Updated time: 28/04/2017</time> -</header> - <h1 id="使ç¨-Vuex-å-vue-router"><a href="#使ç¨-Vuex-å-vue-router" class="headerlink" title="ä½¿ç¨ Vuex å vue-router"></a>ä½¿ç¨ Vuex å vue-router</h1><p>Vue.js ä¹æè¾å¤å¨è¾¹ææ¯äº§åï¼å¦ <a href="https://github.com/vuejs/vuex" target="_blank" rel="external">Vuex</a> å <a href="https://github.com/vuejs/vue-router" target="_blank" rel="external">vue-router</a> çï¼è¿äºåºä¹å¯ä»¥å¨ Weex ä¸å¾å¥½çå·¥ä½ã</p> -<blockquote> -<p>æ们åºäº Weex å Vue å¼åäºä¸ä¸ªçå®æ´é¡¹ç® <a href="https://github.com/weexteam/weex-hackernews" target="_blank" rel="external">weex-hackernews</a> ï¼å¨é¡¹ç®ä¸ä½¿ç¨äº Vuex å vue-router ï¼è½å¤å®ç°åä¸ä»½ä»£ç ï¼å¨ iOSãAndroidãWeb ä¸é½è½å®æ´å°å·¥ä½ã</p> -</blockquote> -<h2 id="使ç¨-Vuex"><a href="#使ç¨-Vuex" class="headerlink" title="ä½¿ç¨ Vuex"></a>ä½¿ç¨ Vuex</h2><p><img src="//vuex.vuejs.org/zh-cn/images/vuex.png" alt="Vuex"></p> -<p>Vuex æ¯ä¸ä¸ªä¸ä¸º Vue.js åºç¨ç¨åºå¼åçç¶æ管çå·¥å ·åºï¼å¯ä»¥å©ç¨ Vue.js çç»ç²åº¦æ°æ®ååºæºå¶æ¥è¿è¡é«æçç¶ææ´æ°ãå®éç¨éä¸å¼åå¨ç®¡çåºç¨çææç»ä»¶çç¶æï¼å¹¶ä»¥ç¸åºçè§åä¿è¯ç¶æ以ä¸ç§å¯é¢æµçæ¹å¼åçååã</p> -<p>ç±äºå¨ Vuex æ¬èº«å°±æ¯å¹³å°æ å ³çï¼æè¾å¼ºç移æ¤è½åï¼å®å ¨å¯ä»¥å¨ Weex ä¸æ£å¸¸å°ä½¿ç¨ Vuex ï¼é è¯»å ¶<a href="https://vuex.vuejs.org/zh-cn/" target="_blank" rel="external">å®æ¹ææ¡£</a>å¯ä»¥äºè§£è¯¦ç»ç使ç¨æ¹æ³ã</p> -<p>Vuex ä¹éæå°äºå ¶å®æ¹è°è¯å·¥å · <a href="https://github.com/vuejs/vue-devtools" target="_blank" rel="external">devtools extension</a>ä¸ï¼æä¾äºè¯¸å¦ time-travel è°è¯ãç¶æå¿«ç §å¯¼å ¥å¯¼åºçé«çº§è°è¯åè½ãè¿äºå·¥å ·å¨ Web å¹³å°ä¸å¯ä»¥ä¸å¦æ¢å¾å°å·¥ä½ã</p> -<h2 id="使ç¨-vue-router"><a href="#使ç¨-vue-router" class="headerlink" title="ä½¿ç¨ vue-router"></a>ä½¿ç¨ vue-router</h2><p>vue-router æ¯ä¸ä¸º Vue.js å¼åç便äºå®ç°å页åºç¨çå·¥å ·åºï¼è½å¤ä»¥å£°æå¼çæ¹æ³ç¼å页é¢ç导èªå跳转信æ¯ã</p> -<p>ç±äº Weex çè¿è¡ç¯å¢ä¸åªæ¯æµè§å¨ï¼é常æ¯ä»¥ç§»å¨ç«¯åçç¯å¢ä¸ºä¸»ï¼ç¶èå¨ Android å iOS ä¸é½æ²¡ææµè§å¨ç History APIï¼ä¹ä¸åå¨ DOMï¼å æ¤å¦ææ³å¨ Weex ç¯å¢ä¸ä½¿ç¨ vue-router ï¼æäºåè½åå°äºéå¶ï¼ä½¿ç¨æ¶åºè¯¥æ³¨æã</p> -<h3 id="è·¯ç±æ¨¡å¼"><a href="#è·¯ç±æ¨¡å¼" class="headerlink" title="è·¯ç±æ¨¡å¼"></a>è·¯ç±æ¨¡å¼</h3><p>vue-router æä¾äºä¸ç§è¿è¡æ¨¡å¼ï¼</p> -<ul> -<li><code>hash</code>: ä½¿ç¨ URL hash å¼æ¥ä½è·¯ç±ãé»è®¤æ¨¡å¼ã</li> -<li><code>history</code>: ä¾èµ HTML5 History API åæå¡å¨é ç½®ãæ¥ç <a href="https://router.vuejs.org/zh-cn/essentials/history-mode.html" target="_blank" rel="external">HTML5 History 模å¼</a>ã</li> -<li><code>abstract</code>: æ¯æææ JavaScript è¿è¡ç¯å¢ï¼å¦ Node.js æå¡å¨ç«¯ã</li> -</ul> -<p>é ç½®æ¹æ³æ¯å¨å®ä¹è·¯ç±æ¶ï¼ä¼ é <code>mode</code> å±æ§ï¼</p> -<figure class="highlight js"><table><tr><td class="code"><pre><div class="line"><span class="keyword">new</span> Router({</div><div class="line"> <span class="attr">mode</span>: <span class="string">'abstract'</span>,</div><div class="line"> <span class="comment">// ...</span></div><div class="line">})</div></pre></td></tr></table></figure> -<p>ä»ä¸ç§æ¨¡å¼çä»ç»ä¸ä¹å¯ä»¥çåºæ¥ï¼Weex ç¯å¢ä¸åªæ¯æä½¿ç¨ abstract 模å¼ãä¸è¿ï¼vue-router èªèº«ä¼å¯¹ç¯å¢åæ ¡éªï¼<strong>å¦æåç°æ²¡ææµè§å¨ç APIï¼vue-router ä¼èªå¨å¼ºå¶è¿å ¥ abstract 模å¼</strong>ï¼æ以å¨ä½¿ç¨æ¶åªè¦ä¸å <code>mode</code> é ç½®å³å¯ãé»è®¤ vue-router ä¼å¨æµè§å¨ç¯å¢ä¸ä½¿ç¨ hash 模å¼ï¼å¨ç§»å¨ç«¯åçç¯å¢ä¸ä½¿ç¨ abstract 模å¼ã</p> -<h3 id="ç¼ç¨å¼å¯¼èª"><a href="#ç¼ç¨å¼å¯¼èª" class="headerlink" title="ç¼ç¨å¼å¯¼èª"></a>ç¼ç¨å¼å¯¼èª</h3><p>vue-router ä¸ä½¿ç¨ <code><router-link></code> å建导èªé¾æ¥ï¼ä¸è¿å¨å ¶ä¸ä½¿ç¨äºåºäº DOM äºä»¶çä¸äºç¹æ§ï¼å¨ Weex åçç¯å¢ä¸å¹¶ä¸è½å¾å¥½çå·¥ä½ãå¨ Weex ä¸ï¼ä½ å¿ é¡»ä½¿ç¨<a href="https://router.vuejs.org/zh-cn/essentials/navigation.html" target="_blank" rel="external">ç¼ç¨å¼å¯¼èª</a>æ¥ç¼å页é¢è·³è½¬é»è¾ã</p> -<p>ç¼ç¨å¼å¯¼èªå ¶å®å°±æ¯éè¿ä¸»å¨è°ç¨ router å®ä¾ä¸ç <code>push</code> æ¹æ³å®ç°è·³è½¬ã</p> -<p>ä½¿ç¨ <code><router-link></code> ç代ç 示ä¾ï¼</p> -<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="comment"><!-- åªè½å¨ Web ä¸ä½¿ç¨ï¼Native ç¯å¢ä¸æ¯æï¼ --></span></div><div class="line"><span class="tag"><<span class="name">template</span>></span></div><div class="line"> <span class="tag"><<span class="name">div</span>></span></div><div class="line"> <span class="tag"><<span class="name">router-link</span> <span class="attr">to</span>=<span class="string">"profile"</span>></span></div><div class="line"> <span class="tag"><<span class="name">text</span>></span>Profile<span class="tag"></<span class="name">text</span>></span></div><div class="line"> <span class="tag"></<span class="name">router-link</span>></span></div><div class="line"> <span class="tag"></<span class="name">div</span>></span></div><div class="line"><span class="tag"></<span class="name">template</span>></span></div></pre></td></tr></table></ figure> -<p>å¨ Weex ä¸ï¼éè¦åæè¿ä¸ªæ ·åï¼</p> -<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag"><<span class="name">template</span>></span></div><div class="line"> <span class="tag"><<span class="name">div</span>></span></div><div class="line"> <span class="tag"><<span class="name">text</span> @<span class="attr">click</span>=<span class="string">"jump"</span>></span>Profile<span class="tag"></<span class="name">text</span>></span></div><div class="line"> <span class="tag"></<span class="name">div</span>></span></div><div class="line"><span class="tag"></<span class="name">template</span>></span></div><div class="line"></div><div class="line"><span class="tag"><<span class="name">script</span>></span><span class="javascript"></span></div><div class="line"> <span class="keyword">import</span> router <span class="keyword">from</span> <span class="string">'./path/to/router'</span></div><div class="line"> <span class="keyword">export< /span> <span class="keyword">default</span> {</div><div class="line"> <span class="attr">methods</span>: {</div><div class="line"> jump () {</div><div class="line"> router.push(<span class="string">'profile'</span>)</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"><span class="tag"></<span class="name">script</span>></span></div></pre></td></tr></table></figure> - - </div> - -</article> -</div> - - <footer id="footer"> - <div class="row clearfix"> - <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="/references/vue/difference-of-vuex.html" data-lang="en">English</a> - </li> - <li> - <a href="/cn/references/vue/difference-of-vuex.html" data-lang="zh-cn">ä¸æ</a> - </li> - </ul> - </div> - </div> - <div class="disclaimer"> - <div><img src="//gw.alicdn.com/tfs/TB1pTBZQFXXXXX9XXXXXXXXXXXX-794-280.png" width="200px" alt="Apache Incubator"></div> - <div><span class="title">Disclaimer:</span> Apache Weex is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</div> - <br/> - </div> - <hr> - <div class="row"> - <p> <img src="//gw.alicdn.com/tfs/TB1bg8SQFXXXXcHXXXXXXXXXXXX-85-170.png" height="50px" alt="Apache"><span>Copyright(c) 2017 The Apache Software Foundation. Licensed under the </span> <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a></p> - </div> - <div class="row clearfix"> - <div></div> - </div> -</footer> - <div style="display: none;"> - <script src="//s95.cnzz.com/z_stat.php?id=1261496509&web_id=1261496509" language="JavaScript"></script> -</div> - - <script src="/js/reqwest.js"></script> - <script src="/js/common.js"></script> -</body> -</html>