<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## Storage 定時存儲 將字符串、數組、對象、數字...存儲到本地,設置存儲有效時間。常用于登錄后用戶信息存儲等... ![](https://img.kancloud.cn/46/22/4622b585059b9092c23e90522a4f4783_1259x93.png =600x) ### 代碼示例 ```javascript <template> <div class="page"> <cvu-row :gutter="16"> <cvu-col span="10"><Input v-model="copyText" placeholder="請輸入文本內容" clearable></Input></cvu-col> <cvu-col span="12"> <cvu-button-group> <cvu-button type="primary" @on-click="handleSetItem">設置緩存</cvu-button> <cvu-button type="success" @on-click="handleGetItem">獲取緩存</cvu-button> <cvu-button type="warning" @on-click="handleRemoveItem">刪除緩存</cvu-button> <cvu-button type="danger" @on-click="handleClearItem">清空緩存</cvu-button> </cvu-button-group> </cvu-col> </cvu-row> </div> </template> <script> export default { data() { return { copyText: '' } }, methods: { handleSetItem() { if(!this.copyText) { this.$Message.warning('請輸入文本內容') return } this.$cvuStorage.setItem({ key: 'storageData', value: this.copyText, time: 1 * 60 }) this.$Message.success('設置存儲成功') this.copyText = '' }, handleGetItem() { this.copyText = this.$cvuStorage.getItem({ key: 'storageData' }) this.$Message.success('獲取存儲成功') }, handleRemoveItem() { this.$cvuStorage.removeItem({ key: 'storageData' }) this.$Message.success('刪除存儲成功') this.copyText = '' }, handleClearItem() { this.$cvuStorage.clearItem() this.$Message.success('清空存儲成功') this.copyText = '' } } } </script> <style lang="scss" scoped> .page{ height: 100%; padding: 15px; box-sizing: border-box; h3{ margin: 10px 0; } /deep/.ivu-input{ height: 40px; line-height: 40px; } } </style> ``` ### methods 設置存儲 >[success] `this.$cvuStorage.setItem(options)` - options: - key:數據鍵名 - value:數據內容 (String/Boolean/Number/Array/Object) - time:有效時間,單位:s - type:存儲工具名(localStorage[默認]/sessionStorage) 獲取存儲 >[success] `this.$cvuStorage.getItem(options)` - options: - key:數據鍵名 - type:存儲工具名(localStorage[默認]/sessionStorage) 刪除存儲 >[success] `this.$cvuStorage.removeItem(options)` - options: - key:數據鍵名 - type:存儲工具名(localStorage[默認]/sessionStorage) 清空存儲 >[success] `this.$cvuStorage.clearItem(options)` - options: - type:存儲工具名(localStorage[默認]/sessionStorage)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看