shikeying
2023-04-19 529f48641122af7c0aec185e4283d02e97aa0f89
src/store/modules/app.js
@@ -1,4 +1,5 @@
import Cookies from 'js-cookie'
import SpeechObject from '@/utils/Speech'
const state = {
  sidebar: {
@@ -7,7 +8,10 @@
    hide: false
  },
  device: 'desktop',
  size: Cookies.get('size') || 'medium'
  size: Cookies.get('size') || 'medium',
  // 2023-04-18,语音播报对象
  tts: null
}
const mutations = {
@@ -37,6 +41,9 @@
  },
  SET_SIDEBAR_HIDE: (state, status) => {
    state.sidebar.hide = status
  },
  SET_SPEECH_TTS: (state) => {
    state.tts = new SpeechObject();
  }
}
@@ -55,6 +62,9 @@
  },
  toggleSideBarHide({ commit }, status) {
    commit('SET_SIDEBAR_HIDE', status)
  },
  setSpeechTts({commit}){
    commit('SET_SPEECH_TTS')
  }
}