| | |
| | | import Cookies from 'js-cookie' |
| | | import SpeechObject from '@/utils/Speech' |
| | | |
| | | const state = { |
| | | sidebar: { |
| | |
| | | hide: false |
| | | }, |
| | | device: 'desktop', |
| | | size: Cookies.get('size') || 'medium' |
| | | size: Cookies.get('size') || 'medium', |
| | | |
| | | // 2023-04-18,语音播报对象 |
| | | tts: null |
| | | } |
| | | |
| | | const mutations = { |
| | |
| | | }, |
| | | SET_SIDEBAR_HIDE: (state, status) => { |
| | | state.sidebar.hide = status |
| | | }, |
| | | SET_SPEECH_TTS: (state) => { |
| | | state.tts = new SpeechObject(); |
| | | } |
| | | } |
| | | |
| | |
| | | }, |
| | | toggleSideBarHide({ commit }, status) { |
| | | commit('SET_SIDEBAR_HIDE', status) |
| | | }, |
| | | setSpeechTts({commit}){ |
| | | commit('SET_SPEECH_TTS') |
| | | } |
| | | } |
| | | |