<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] ## storage - 用于緩存數據 ## 示例 background/index.ts ``` import { Storage } from "@plasmohq/storage" const storage = new Storage() storage.watch({ "serial-number": (c) => { console.log("new value",c.newValue) }, make: (c) => { console.log("new value make",c.newValue) } }) ``` <details> <summary>popup.vue</summary> ``` <template> <div> <h2 class="text-center"> Welcome to your <a href="https://www.plasmo.com" target="_blank">Plasmo</a> Extension! </h2> <div class="container"> <button @click="decrement">-</button> <p> <b>{{ count }}</b> </p> <button @click="increment">+</button> </div> </div> <p v-if="action" class="action text-center"> {{ action }} </p> <a href="https://www.plasmo.com" target="_blank">123</a> </template> <script > import { Storage } from "@plasmohq/storage" const storage = new Storage() export default { data() { return { action: null, count:0, } }, mounted(){ storage.get("serial-number").then(res=> { this.count =res; }) }, methods: { increment() { this.count++ storage.set("serial-number", this.count) this.action="add" }, decrement() { this.count-- storage.set("serial-number", this.count) }, } } </script> <style> .container { min-width: 470px; display: flex; align-items: center; justify-content: center; gap: 47px; } .text-center { text-align: center; } .action { color: #470; font-weight: bold; } </style> ``` </details> <br/>
                  <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>

                              哎呀哎呀视频在线观看