mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
Feature: Send images from widget
This commit is contained in:
committed by
GitHub
parent
e56132c506
commit
6c4e1fdaac
@@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<footer class="footer">
|
||||
<ChatInputWrap :on-send-message="onSendMessage" />
|
||||
<ChatInputWrap
|
||||
:on-send-message="handleSendMessage"
|
||||
:on-send-attachment="handleSendAttachment"
|
||||
/>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from 'vuex';
|
||||
import ChatInputWrap from 'widget/components/ChatInputWrap.vue';
|
||||
|
||||
export default {
|
||||
@@ -16,9 +20,16 @@ export default {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
onSendMessage: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
methods: {
|
||||
...mapActions('conversation', ['sendMessage', 'sendAttachment']),
|
||||
handleSendMessage(content) {
|
||||
this.sendMessage({
|
||||
content,
|
||||
});
|
||||
},
|
||||
handleSendAttachment(attachment) {
|
||||
this.sendAttachment({ attachment });
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user