<import src="../../../common/head.wxml" />
<import src="../../../common/foot.wxml" />

<view class="container page" data-weui-theme="{{theme}}">
  <template is="head" data="{{title: 'get/set/clearStorage'}}"/>

  <view class="page-body">
    <view class="page-section">
      <view class="weui-cells weui-cells_after-title">
        <view class="weui-cell weui-cell_input">
          <view class="weui-cell__hd">
            <view class="weui-label">key</view>
          </view>
          <view class="weui-cell__bd">
            <input class="weui-input" type="text" placeholder="请输入key" name="key" value="{{key}}" bindinput="keyChange"></input>
          </view>
        </view>
        <view class="weui-cell weui-cell_input">
          <view class="weui-cell__hd">
            <view class="weui-label">value</view>
          </view>
          <view class="weui-cell__bd">
            <input class="weui-input" type="text" placeholder="请输入value" name="data" value="{{data}}" bindinput="dataChange"></input>
          </view>
        </view>
      </view>
      <view class="btn-area">
        <button type="primary" bindtap="setStorage">存储数据</button>
        <button bindtap="getStorage">读取数据</button>
        <button bindtap="clearStorage">清理数据</button>
      </view>
    </view>
  </view>
  <template is="foot" />
</view>
