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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                >[success] # plugins -- Vuex 組件 ~~~ 1.vuex 可以提供一些組件的使用,這個參數可以訂閱一個函數,讓這個函數在所有的mutation結束之后執行。 ~~~ >[danger] ##### 在store 文件下的plugin文件下創建saveInLocal.js ~~~ 1.vuex 改變的內容都是保存在內存中,也就是說當用戶刷新頁面。所有數值等于, 沒有變化,因此我們可以給vuex增加一個配置文件,這個配置文件主要的作用,可 以把內容保存在本地中,避免刷新消失的情況 2. `store.replaceState`-- 替換 store 的根狀態,僅用狀態合并或時光旅行調試,如果 localStorage 中存在說明是一次刷新,將`localStorage` 狀態同步會vuex中 ~~~ ~~~ export default store => { if (localStorage.state) store.replaceState(JSON.parse(localStorage.state)) store.subscribe((mutation, state) => { localStorage.state = JSON.stringify(state) }) } ~~~ >[danger] ##### 在store文件下的index.js 使用 ~~~ import { createStore } from 'vuex' import state from './state' import mutations from './mutations' import actions from './actions' import getters from './getters' import user from './module/user' import saveInLocal from './plugin/saveInLocal' export default createStore({ state, mutations, actions, getters, modules:{ user }, // 使用 plugins:[saveInLocal], }) ~~~
                  <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>

                              哎呀哎呀视频在线观看