vue-wiguet-chatweb 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Chat.vue.d.ts +11 -1
- package/dist/style.css +1 -1
- package/dist/vue-wiguet-chatweb.js +809 -804
- package/dist/vue-wiguet-chatweb.umd.cjs +5 -5
- package/package.json +1 -1
- package/src/components/Chat.vue +5 -6
package/package.json
CHANGED
package/src/components/Chat.vue
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="widget">
|
3
3
|
<div class="header-widget">
|
4
|
-
<
|
5
|
-
<IconClose @click="toggleChat()"/>
|
4
|
+
<h4 class="title-chat">{{ titlePrincipal }}</h4>
|
5
|
+
<IconClose class="pointer" @click="toggleChat()"/>
|
6
6
|
</div>
|
7
7
|
<div class="messages-container" id="messages-container" ref="messagesContainer">
|
8
8
|
<chat-message class="message" v-for="(message, index) in messages" :key="index" :message="message">
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</button>
|
17
17
|
<div class="jl-inputgroup-chat">
|
18
18
|
<input v-model="message" class="jl2-input-chat" required/>
|
19
|
-
<button type="submit">
|
19
|
+
<button type="submit" class="pointer">
|
20
20
|
<IconSend/>
|
21
21
|
</button>
|
22
22
|
</div>
|
@@ -46,6 +46,7 @@ const messages:any = ref([]);
|
|
46
46
|
const virtualHost:any = ref({virtualhost:''});
|
47
47
|
|
48
48
|
const props = defineProps({
|
49
|
+
titlePrincipal:{ type: String,default:'Comunicación en linea para consultas' },
|
49
50
|
toggleChat:{ type: Function, required: true },
|
50
51
|
tokenAuth:{ type: String, required: true },
|
51
52
|
phoneUser:{ type: String, required: true }
|
@@ -122,7 +123,6 @@ const getMessagesByApp = async (param:{resetConnection:boolean}) => {
|
|
122
123
|
});
|
123
124
|
//const messagesData = store.getters.get_messages_chat;
|
124
125
|
const messagesData = getMessages
|
125
|
-
console.log(messagesData)
|
126
126
|
if (messagesData) {
|
127
127
|
|
128
128
|
messages.value = messagesData;
|
@@ -157,7 +157,7 @@ const disconnectMsRabbit = () => {
|
|
157
157
|
|
158
158
|
onMounted(async () => {
|
159
159
|
await getMessagesByApp({resetConnection:false})
|
160
|
-
const virtualHostUniqueUser = `
|
160
|
+
const virtualHostUniqueUser = `widget_chat_${props.phoneUser}`
|
161
161
|
// await store.dispatch('syncVirtualHostCentral',{
|
162
162
|
// token:props.tokenAuth,
|
163
163
|
// data:{
|
@@ -170,7 +170,6 @@ onMounted(async () => {
|
|
170
170
|
virtualHost:virtualHostUniqueUser
|
171
171
|
}
|
172
172
|
})
|
173
|
-
console.log(virtualHost.value)
|
174
173
|
connectMsRabbit()
|
175
174
|
scrollToBottom()
|
176
175
|
});
|