Selaa lähdekoodia

chat inputmixin

baichun 5 vuotta sitten
vanhempi
commit
33f719c721
2 muutettua tiedostoa jossa 5 lisäystä ja 19 poistoa
  1. 4 18
      _src/components/chatRoom/inputArea.vue
  2. 1 1
      _src/mixins/chat.js

+ 4 - 18
_src/components/chatRoom/inputArea.vue

@@ -48,7 +48,7 @@
 import Emoji from '@/components/emoji'
 import chatAt from '@/components/chatAt'
 // import { Message } from 'element-ui'
-// import { mapState, mapMutations, mapActions } from 'vuex'
+import { mapState } from 'vuex'
 import { chatAtMixin, chatInputMixin } from '@/mixins'
 import { inputMixin } from '@/mixins/chat'
 // import ImageMin from '@/util/imageMin.js'
@@ -66,23 +66,9 @@ export default {
       this.inputMsg = ''
     }
   },
-  // computed: {
-  //   ...mapState(['group', 'userId']),
-  //   ...mapState({
-  //     chatInputFocus: state => state.group.chatInputFocus,
-  //     blockList: state => state.group.blockList
-  //   }),
-  //   isPrivate () {
-  //     return this.$store.getters.isPrivate
-  //   }
-  // },
-  // data () {
-  //   return {
-  //     emojiShow: false,
-  //     inputMsg: '',
-  //     atInd: 0
-  //   }
-  // },
+  computed: {
+    ...mapState(['curSession'])
+  },
   mounted () {
     document.addEventListener('paste', this.initPaste)
     document.addEventListener('drop', this.initDrop)

+ 1 - 1
_src/mixins/chat.js

@@ -279,7 +279,7 @@ export const chatMixin = {
 // 聊天输入框mixin
 export const inputMixin = {
   computed: {
-    ...mapState(['group', 'userId', 'curSession']),
+    ...mapState(['group', 'userId']),
     ...mapState({
       chatInputFocus: state => state.group.chatInputFocus,
       blockList: state => state.group.blockList