vendredi 17 mai 2019

nicely working in chrome but not in IE(internet explorer)

I am new in Vuejs. i have a chat system in vuejs and laravel. when my message is too big it is not working correctly in IE. first it is sending half of the message and then full message. that means for every enter it is sending two message. but code is working well in chrome.

  <textarea v-model="Keijiban" @keydown.enter="send" @click="selectContact(kokyaku1)" placeholder="ここにメッセージを入力してください。"></textarea>



methods: { 
            send(e) {
                e.preventDefault();
                 //alert(this.Keijiban);
                if (this.Keijiban == '') {
                    return;
                }

                this.$emit('send', this.Keijiban);
                this.Keijiban = '';
            },

then message is sent to another component. here is the code from another component

 <MessageComposer :kokyaku1="kokyaku1" @readkorsi="middleman" @send="sendMessage"/>

methods: {
            sendMessage(text) {

                if (!this.kokyaku1) {
                    return;
                }

                axios.post('conversation/send', {
                    contact_id: this.kokyaku1.bango,
                    text: text

                }).then((response) => {
                    this.$emit('new', response.data);
                })
            },



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire