http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/d332a30e/cn/references/modules/storage.html
----------------------------------------------------------------------
diff --git a/cn/references/modules/storage.html
b/cn/references/modules/storage.html
deleted file mode 100644
index f1d157f..0000000
--- a/cn/references/modules/storage.html
+++ /dev/null
@@ -1,1452 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
-
- <title>storage | Weex</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1">
- <meta name="description" content="storage æ¬å°åå¨v0.7+
å¤æ³¨ï¼0.7å以ä¸çæ¬å¯ç¨ storage
æ¯ä¸ä¸ªå¨å端æ¯è¾å¸¸ç¨ç模åï¼å¯ä»¥å¯¹æ¬å°æ°æ®è¿è¡åå¨ãä¿®æ¹ãå
é¤ï¼å¹¶ä¸è¯¥æ°æ®æ¯æ°¸ä¹
ä¿åçï¼é¤éæå¨æ¸
é¤æè
代ç æ¸
é¤ãä½æ¯ï¼storage
模åæä¸ä¸ªéå¶å°±æ¯æµè§å¨ç«¯ï¼H5ï¼åªè½åå¨å°äº5Mçæ°æ®ï¼å
ä¸ºå¨ H5/Web 端çå®ç°æ¯éç¨ HTML5 LocalStorage APIãè Android å
iOS è¿åæ¯æ²¡ä»">
-<meta property="og:type" content="website">
-<meta property="og:title" content="storage">
-<meta property="og:url"
content="https://weex-project.io/cn/references/modules/storage.html">
-<meta property="og:site_name" content="Weex">
-<meta property="og:description" content="storage æ¬å°åå¨v0.7+
å¤æ³¨ï¼0.7å以ä¸çæ¬å¯ç¨ storage
æ¯ä¸ä¸ªå¨å端æ¯è¾å¸¸ç¨ç模åï¼å¯ä»¥å¯¹æ¬å°æ°æ®è¿è¡åå¨ãä¿®æ¹ãå
é¤ï¼å¹¶ä¸è¯¥æ°æ®æ¯æ°¸ä¹
ä¿åçï¼é¤éæå¨æ¸
é¤æè
代ç æ¸
é¤ãä½æ¯ï¼storage
模åæä¸ä¸ªéå¶å°±æ¯æµè§å¨ç«¯ï¼H5ï¼åªè½åå¨å°äº5Mçæ°æ®ï¼å
ä¸ºå¨ H5/Web 端çå®ç°æ¯éç¨ HTML5 LocalStorage APIãè Android å
iOS è¿åæ¯æ²¡ä»">
-<meta property="og:updated_time" content="2017-04-28T02:36:21.000Z">
-<meta name="twitter:card" content="summary">
-<meta name="twitter:title" content="storage">
-<meta name="twitter:description" content="storage æ¬å°åå¨v0.7+
å¤æ³¨ï¼0.7å以ä¸çæ¬å¯ç¨ storage
æ¯ä¸ä¸ªå¨å端æ¯è¾å¸¸ç¨ç模åï¼å¯ä»¥å¯¹æ¬å°æ°æ®è¿è¡åå¨ãä¿®æ¹ãå
é¤ï¼å¹¶ä¸è¯¥æ°æ®æ¯æ°¸ä¹
ä¿åçï¼é¤éæå¨æ¸
é¤æè
代ç æ¸
é¤ãä½æ¯ï¼storage
模åæä¸ä¸ªéå¶å°±æ¯æµè§å¨ç«¯ï¼H5ï¼åªè½åå¨å°äº5Mçæ°æ®ï¼å
ä¸ºå¨ H5/Web 端çå®ç°æ¯éç¨ HTML5 LocalStorage APIãè Android å
iOS è¿åæ¯æ²¡ä»">
-
- <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/modules/storage.html"
data-lang="en">English</a>
- </li>
- <li>
- <a href="/cn/references/modules/storage.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="doc-nav-version">
- <select class="versionBtn" stype="/cn/references">
-
- <option value="2v" selected>v2.x</option>
- <option value="1v">v1.x</option>
-
- </select>
-</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/indicator.html"
class="sidebar-link "><indicator></a>
- </li>
-
- <li>
- <a href="/cn/references/components/slider.html"
class="sidebar-link "><slider></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/list.html"
class="sidebar-link "><list></a>
- </li>
-
- <li>
- <a href="/cn/references/components/input.html"
class="sidebar-link "><input></a>
- </li>
-
- <li>
- <a href="/cn/references/components/waterfall.html"
class="sidebar-link "><waterfall></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 current ">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 ">ä½¿ç¨ 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/platform-difference.html" class="sidebar-link ">Weex å
Web å¹³å°çå·®å¼</a></h3>
-
- <ul class="chapter">
-
- <li>
- <a href="/cn/references/migration/index.html"
class="sidebar-link ">è¿ç§»</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>
-
-
- </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="doc-nav-version">
- <select class="versionBtn" stype="/cn/references">
-
- <option value="2v" selected>v2.x</option>
- <option value="1v">v1.x</option>
-
- </select>
-</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/indicator.html"
class="sidebar-link "><indicator></a>
- </li>
-
- <li>
- <a href="/cn/references/components/slider.html"
class="sidebar-link "><slider></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/list.html"
class="sidebar-link "><list></a>
- </li>
-
- <li>
- <a href="/cn/references/components/input.html"
class="sidebar-link "><input></a>
- </li>
-
- <li>
- <a href="/cn/references/components/waterfall.html"
class="sidebar-link "><waterfall></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 current ">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 ">ä½¿ç¨ 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/platform-difference.html" class="sidebar-link ">Weex å
Web å¹³å°çå·®å¼</a></h3>
-
- <ul class="chapter">
-
- <li>
- <a href="/cn/references/migration/index.html"
class="sidebar-link ">è¿ç§»</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>
-
-
- </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">
- storage
- </h1>
-
-
- <time class="article-date" datetime="2017-04-28T02:36:21.000Z">Updated time:
28/04/2017</time>
-</header>
- <h1 id="storage-æ¬å°åå¨"><a href="#storage-æ¬å°åå¨"
class="headerlink" title="storage æ¬å°åå¨"></a><code>storage</code>
æ¬å°åå¨</h1><p><span class="weex-version">v0.7+</span></p>
-<p><strong>å¤æ³¨</strong>ï¼0.7å以ä¸çæ¬å¯ç¨</p>
-<p><code>storage</code>
æ¯ä¸ä¸ªå¨å端æ¯è¾å¸¸ç¨ç模åï¼å¯ä»¥å¯¹æ¬å°æ°æ®è¿è¡åå¨ãä¿®æ¹ãå
é¤ï¼å¹¶ä¸è¯¥æ°æ®æ¯æ°¸ä¹
ä¿åçï¼é¤éæå¨æ¸
é¤æè
代ç æ¸
é¤ãä½æ¯ï¼<code>storage</code>
模åæä¸ä¸ªéå¶å°±æ¯æµè§å¨ç«¯ï¼H5ï¼åªè½åå¨å°äº5Mçæ°æ®ï¼å
ä¸ºå¨ H5/Web 端çå®ç°æ¯éç¨ <code>HTML5 LocalStorage API</code>ãè
Android å iOS è¿åæ¯æ²¡ä»ä¹éå¶çã<br> storage
常ç¨å¨ä¸äºè¢«ç¨æ·ç»å¸¸æ¥è¯¢ï¼ä½æ¯åä¸é¢ç¹æ´æ°çæ°æ®ï¼æ¯å¦æç´¢åå²ãç¨æ·ç订åå表çãæç´¢åå²ä¸è¬æ
åµé½æ¯ä½ä¸ºæ¬å°æ°æ®åå¨çï¼å æ¤ä½¿ç¨ storage
æ¯è¾åéãèç¨æ·è®¢åå表æ¯éè¦æ¬å°åå¨åæå¡ç«¯å¨æ£ç´¢é
åçåºæ¯ãå½ä¸ä¸ªç¨æ·ä¸ååï¼ä¼ç»å¸¸æ¥é
个人ç订åå表ãä½æ¯ï¼è®¢åçå表æ°æ®ä¸æ¯é¢ç¹æ´æ°çï¼å¾å¾åªæå¨æ¶å°è´§åæ¶ï¼ææ´æ°âå·²ç¾æ¶âï¼å
¶ä½å¹³æ¶çç¶ææ¯âå·²åè´§âãå æ¤ï¼å¯ä»¥ä½¿ç¨ storage å
å¨è®¢åå表ï¼å¯ä»¥åå°æå¡å¨çååï¼ä¾å¦åå° SQL
æ¥è¯¢æè
ç¼åçååãå½ç¨æ·æ¥ç订å详æ
çæ¶åï¼åæ´æ°æ°æ®ç¶æã</p>
-<h2 id="API"><a href="#API" class="headerlink"
title="API"></a>API</h2><p><code>storage</code> æä¾äºä¸ç³»åç API
ä¾æ们è°ç¨ãæ们åªéè¦å¼å
¥è¯¥æ¨¡åï¼ç¶åè°ç¨å¯¹åºç API
å³å¯ã</p>
-<h3 id="setItem-key-value-callback"><a href="#setItem-key-value-callback"
class="headerlink" title="setItem(key, value, callback)"></a><code>setItem(key,
value,
callback)</code></h3><p>该æ¹æ³å¯ä»¥éè¿é®å¼å¯¹çå½¢å¼å°æ°æ®åå¨å°æ¬å°ãåæ¶å¯ä»¥éè¿è¯¥æ¹æ³ï¼æ´æ°å·²æçæ°æ®ã</p>
-<h4 id="åæ°"><a href="#åæ°" class="headerlink"
title="åæ°"></a>åæ°</h4><ul>
-<li><code>key {string}</code>ï¼è¦åå¨çé®ï¼ä¸å
许æ¯
<code>""</code> æ <code>null</code></li>
-<li><code>value {string}</code>ï¼è¦åå¨çå¼ï¼ä¸å
许æ¯
<code>""</code> æ <code>null</code></li>
-<li><code>callback {function (e)}</code>ï¼æ§è¡æä½æååçåè°<ul>
-<li><code>e.result</code>ï¼è¡¨ç¤ºè®¾ç½®æ¯å¦æåï¼å¦ææåè¿å
<code>"success"</code></li>
-<li><code>e.data</code>ï¼<code>undefined</code>
表示设置æåï¼<code>invalid_param</code> 表示 key/value 为
<code>""</code> æè
<code>null</code></li>
-</ul>
-</li>
-</ul>
-<p>è¿éï¼å¯¹è¿åå¼åä¸ä¸ªç®åçä»ç»ï¼</p>
-<p><code>e</code> å
å«ä¸¤ä¸ªå±æ§ï¼<code>e.result</code> å
<code>e.data</code>ãå¦æ <code>e.result</code> è¿åå¼æ¯
âsuccessâï¼å说ææåã<code>e.data</code> è¿å
<code>undefined</code> 表示设置æåï¼è¿å <code>invalid_param</code>
表示<code>key/value</code> 为 ââ æè
nullãå æ¤ï¼ä½
å¯ä»¥å¤æ两个è¿åå¤ææ¯å¦æå
¥æåã</p>
-<h3 id="getItem-key-callback"><a href="#getItem-key-callback"
class="headerlink" title="getItem(key, callback)"></a><code>getItem(key,
callback)</code></h3><p>ä¼ å
¥é®åè¿å对åºçé®å¼</p>
-<h4 id="åæ°-1"><a href="#åæ°-1" class="headerlink"
title="åæ°"></a>åæ°</h4><ul>
-<li><code>key {string}</code>ï¼è¦è·åçå¼çå称ï¼ä¸å
许æ¯
<code>""</code> æ <code>null</code></li>
-<li><code>callback {function (e)}</code>ï¼æ§è¡æä½æååçåè°<ul>
-<li><code>e.result</code>ï¼è¡¨ç¤ºè®¾ç½®æ¯å¦æåï¼å¦ææåè¿å
<code>"success"</code></li>
-<li><code>e.data</code>ï¼è·å对åºçé®å¼å符串ï¼å¦æ没ææ¾å°åè¿å
<code>undefined</code></li>
-</ul>
-</li>
-</ul>
-<h3 id="removeItem-key-callback"><a href="#removeItem-key-callback"
class="headerlink" title="removeItem(key, callback)"></a><code>removeItem(key,
callback)</code></h3><p>ä¼ å
¥ä¸ä¸ªé®åå°ä¼å
é¤æ¬å°åå¨ä¸å¯¹åºçé®å¼</p>
-<h4 id="åæ°-2"><a href="#åæ°-2" class="headerlink"
title="åæ°"></a>åæ°</h4><ul>
-<li><code>key {string}</code>ï¼è¦å é¤çå¼çå称ï¼ä¸å
许æ¯
<code>""</code> æ <code>null</code></li>
-<li><code>callback {function (e)}</code>ï¼æ§è¡æä½æååçåè°.<ul>
-<li><code>e.result</code>ï¼è¡¨ç¤ºå é¤æ¯å¦æåï¼å¦ææåè¿å
<code>"success"</code></li>
-<li><code>e.data</code>ï¼<code>undefined</code> 表示å é¤æå</li>
-</ul>
-</li>
-</ul>
-<h3 id="length-callback"><a href="#length-callback" class="headerlink"
title="length(callback)"></a><code>length(callback)</code></h3><p>è¿åæ¬å°åå¨çæ°æ®ä¸ææåå¨é¡¹æ°éçæ´æ°</p>
-<h4 id="åæ°-3"><a href="#åæ°-3" class="headerlink"
title="åæ°"></a>åæ°</h4><ul>
-<li><code>callback {function (e)}</code>ï¼æ§è¡æä½æååçåè°<ul>
-<li><code>e.result</code>ï¼è¡¨ç¤ºè®¾ç½®æ¯å¦æåï¼å¦ææåè¿å
<code>"success"</code></li>
-<li><code>e.data</code>ï¼å½åå·²åå¨é¡¹çæ°é</li>
-</ul>
-</li>
-</ul>
-<h3 id="getAllKeys-callback"><a href="#getAllKeys-callback" class="headerlink"
title="getAllKeys(callback)"></a><code>getAllKeys(callback)</code></h3><p>è¿åä¸ä¸ªå
å«å
¨é¨å·²åå¨é¡¹é®åçæ°ç»</p>
-<h4 id="åæ°-4"><a href="#åæ°-4" class="headerlink"
title="åæ°"></a>åæ°</h4><ul>
-<li><code>callback {function
(e)}</code>ï¼æ§è¡æä½æååçåè°ã<ul>
-<li><code>e.result</code>ï¼è¡¨ç¤ºè®¾ç½®æ¯å¦æåï¼å¦ææåè¿å
<code>"success"</code></li>
-<li><code>e.data</code>ï¼ææé®åç»æçæ°ç»</li>
-</ul>
-</li>
-</ul>
-<h2 id="示ä¾"><a href="#示ä¾" class="headerlink"
title="示ä¾"></a>示ä¾</h2><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
class="attr">class</span>=<span
class="string">"list"</span>></span></div><div class="line"> <span
class="tag"><<span class="name">div</span> <span
class="attr">class</span>=<span class="string">"group
center"</span>></span></div><div class="line"> <span
class="tag"><<span class="name">div</span> <span
class="attr">class</span>=<span class="string">"panel"</span>></span><span
class="tag"><<span class="name">text</span> <span
class="attr">class</span>=<span
class="string">"text"</span>></span>{{state}}<span
class="tag"></<span class="name">text</span>></span><span
class="tag"></<span class="name">div</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">div</span> <span
>class="attr">class</span>=<span
>class="string">"group"</span>></span></div><div class="line"> <span
>class="tag"><<span class="name">div</span> <span
>class="attr">class</span>=<span class="string">"panel"</span>></span><span
>class="tag"><<span class="name">text</span> <span
>class="attr">class</span>=<span class="string">"text"</span> @<span
>class="attr">click</span>=<span
>class="string">"setItem"</span>></span>set<span class="tag"></<span
>class="name">text</span>></span><span class="tag"></<span
>class="name">div</span>></span></div><div class="line"> <span
>class="tag"><<span class="name">div</span> <span
>class="attr">class</span>=<span class="string">"panel"</span>></span><span
>class="tag"><<span class="name">text</span> <span
>class="attr">class</span>=<span class
="string">"text"</span> @<span class="attr">click</span>=<span
class="string">"getItem"</span>></span>get<span class="tag"></<span
class="name">text</span>></span><span class="tag"></<span
class="name">div</span>></span></div><div class="line"> <span
class="tag"><<span class="name">div</span> <span
class="attr">class</span>=<span class="string">"panel"</span>></span><span
class="tag"><<span class="name">text</span> <span
class="attr">class</span>=<span class="string">"text"</span> @<span
class="attr">click</span>=<span
class="string">"removeItem"</span>></span>remove<span class="tag"></<span
class="name">text</span>></span><span class="tag"></<span
class="name">div</span>></span></div><div class="line"> <span
class="tag"><<span class="name">div</span> <span
class="attr">class</span>=<span class="string">"panel"</span>></span><span
class="tag"><<span class="name">text</span> <span
class="attr">class</span>=<span class="string"
>"text"</span> @<span class="attr">click</span>=<span
>class="string">"getAll"</span>></span>all<span class="tag"></<span
>class="name">text</span>></span><span class="tag"></<span
>class="name">div</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">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">const</span> storage = weex.requireModule(<span
>class="string">'storage'</span>)</div><div class="line"> <span
>class="keyword">const</span> modal = weex.requireModule(<span
>class="string">'modal'</span>)</div><div class="line"></div><div
>class="line"> <span class="keyword">export</span> <span class="keyw
ord">default</span> {</div><div class="line"> data () {</div><div
class="line"> <span class="keyword">return</span> {</div><div
class="line"> <span class="attr">keys</span>: <span
class="string">'[]'</span>,</div><div class="line"> <span
class="attr">length</span>: <span class="number">0</span>,</div><div
class="line"> <span class="attr">state</span>: <span
class="string">'----'</span></div><div class="line"> }</div><div
class="line"> },</div><div class="line"> <span
class="attr">methods</span>: {</div><div class="line"> setItem ()
{</div><div class="line"> storage.setItem(<span
class="string">'name'</span>, <span class="string">'Hanks'</span>, event =>
{</div><div class="line"> <span class="keyword">this</span>.state
= <span class="string">'set success'</span></div><div class="line">
<span class="built_in">console</span>.log(<span class="string">'set
success'</span>)</di
v><div class="line"> })</div><div class="line">
},</div><div class="line"> getItem () {</div><div class="line">
storage.getItem(<span class="string">'name'</span>, event =>
{</div><div class="line"> <span
class="built_in">console</span>.log(<span class="string">'get value:'</span>,
event.data)</div><div class="line"> <span
class="keyword">this</span>.state = <span class="string">'value: '</span> +
event.data</div><div class="line"> })</div><div class="line">
},</div><div class="line"> removeItem () {</div><div
class="line"> storage.removeItem(<span class="string">'name'</span>,
event => {</div><div class="line"> <span
class="built_in">console</span>.log(<span class="string">'delete
value:'</span>, event.data)</div><div class="line"> <span
class="keyword">this</span>.state = <span
class="string">'deleted'</span></div><div class="line"> })</div>
<div class="line"> },</div><div class="line"> getAll ()
{</div><div class="line"> storage.getAllKeys(<span
class="function"><span class="params">event</span> =></span>
{</div><div class="line"> <span class="comment">//
modal.toast({ message: event.result })</span></div><div class="line">
<span class="keyword">if</span> (event.result === <span
class="string">'success'</span>) {</div><div class="line">
modal.toast({</div><div class="line"> <span
class="attr">message</span>: <span class="string">'props: '</span> +
event.data.join(<span class="string">', '</span>)</div><div class="line">
})</div><div class="line"> }</div><div class="line">
})</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><div class="li
ne"></div><div class="line"><span class="tag"><<span
class="name">style</span> <span class="attr">scoped</span>></span><span
class="css"></span></div><div class="line"> <span
class="selector-class">.panel</span> {</div><div class="line"> <span
class="attribute">height</span>: <span class="number">100px</span>;</div><div
class="line"> <span class="attribute">flex-direction</span>:
column;</div><div class="line"> <span
class="attribute">justify-content</span>: center;</div><div class="line">
<span class="attribute">border-width</span>: <span
class="number">2px</span>;</div><div class="line"> <span
class="attribute">border-style</span>: solid;</div><div class="line"> <span
class="attribute">border-color</span>: <span class="built_in">rgb</span>(162,
217, 192);</div><div class="line"> <span
class="attribute">background-color</span>: <span
class="built_in">rgba</span>(162, 217, 192, 0.2);</div><div class="line">
}</div><div class="line"> <span clas
s="selector-class">.group</span> {</div><div class="line"> <span
class="attribute">flex-direction</span>: row;</div><div class="line"> <span
class="attribute">justify-content</span>: space-between;</div><div
class="line"> <span class="attribute">width</span>: <span
class="number">650px</span>;</div><div class="line"> <span
class="attribute">margin-left</span>: <span
class="number">50px</span>;</div><div class="line"> <span
class="attribute">margin-top</span>: <span
class="number">50px</span>;</div><div class="line"> <span
class="attribute">margin-bottom</span>: <span
class="number">50px</span>;</div><div class="line"> }</div><div
class="line"> <span class="selector-class">.center</span> {</div><div
class="line"> <span class="attribute">justify-content</span>:
center;</div><div class="line"> }</div><div class="line"> <span
class="selector-class">.text</span> {</div><div class="line"> <span
class="attribute">font-size</span>: <span
class="number">50px</span>;</div><div class="line"> <span
class="attribute">text-align</span>: center;</div><div class="line"> <span
class="attribute">padding-left</span>: <span
class="number">25px</span>;</div><div class="line"> <span
class="attribute">padding-right</span>: <span
class="number">25px</span>;</div><div class="line"> <span
class="attribute">color</span>: <span class="number">#41B883</span>;</div><div
class="line"> }</div><div class="line"> <span
class="selector-class">.small</span> {</div><div class="line"> <span
class="attribute">font-size</span>: <span class="number">32px</span>;</div><div
class="line"> <span class="attribute">padding-left</span>: <span
class="number">35px</span>;</div><div class="line"> <span
class="attribute">padding-right</span>: <span
class="number">35px</span>;</div><div class="line"> <span
class="attribute">color</span>: <span class="number">#41B883</span>;</div><div
class="line"> }</div><div class="li
ne"><span class="tag"></<span
class="name">style</span>></span></div></pre></td></tr></table></figure>
-<p><a href="http://dotwe.org/vue/3fdd3e2d1646ca41199d80c7be799858"
target="_blank" rel="external">try it</a></p>
-<h2 id="å
¶å®åè"><a href="#å
¶å®åè" class="headerlink" title="å
¶å®åè"></a>å
¶å®åè</h2><ul>
-<li><a href="http://www.w3school.com.cn/html5/html_5_webstorage.asp"
target="_blank" rel="external">W3school: html5 localStorage</a></li>
-<li><a
href="https://github.com/apache/incubator-weex/blob/dev/examples/module/storage-demo.we"
target="_blank" rel="external">storage 模åå®æ´ç Demo</a></li>
-</ul>
-
- </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/modules/storage.html" data-lang="en">English</a>
- </li>
- <li>
- <a href="/cn/references/modules/storage.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>