| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import Vue from "vue"
- import Vuex from "vuex"
- import {
- assign,
- slice,
- isEmpty
- } from 'lodash-es'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- state: {
- list: {}, // 列表以及聊天内容数据
- video: null, // 视频通话数据
- wornlist: {},
- addobj: [],
- kpsurlL: 0,
- worndatabase: [],
- selfRoomInfo: null,
- pendingVideoConnect: false,
- isVideoTalking: false,
- isVideoCallRefused: false,
- },
- mutations: {
- updateVideoInfo(state, payload) {
- state.video = assign({}, payload)
- state.pendingVideoConnect = !isEmpty(payload)
- },
- updateVideoSelfRoomInfo(state, payload) {
- state.selfRoomInfo = assign({}, payload)
- },
- updateMessageList(state, payload) {
- state.list = slice(payload)
- },
- updatePendingVideoConnectStatus(state, flag) {
- state.pendingVideoConnect = flag
- },
- updateTalkingStatus(state, flag) {
- state.isVideoTalking = flag
- },
- updateIsRefusedCall(state, flag) {
- state.isVideoCallRefused = flag
- }
- },
- actions: {},
- getters: {
- list: () => {
- }
- }
- })
- export default store
|