1.0.4 • Published 10 months ago
@primeton-ui/chat-window v1.0.4
聊天窗口组件
install
npm install @primeton-ui/chat-window
Usage
<template lang="html">
<div>
<ChatWindow :chat-history="chatHistory"/>
</div>
</template>
<script>
import {ChatWindow} from '@primeton-ui/chat-window'
export default {
components: { ChatWindow },
data() {
return {
chatHistory: [
{
loading: false,
content: 'test',
createTime: '2023-06-25',
isUser: 0 },
{
loading: false,
content: 'test1',
createTime: '2023-06-25',
isUser: 1 },
]
}
}
}
</script>
Props
height: {
default: '500px'
},
width: {
default: '600px'
},
permission: {
default: () => {
return {
sendQuestion: true,
}
}
},
openContext: {
default: true,
},
disableInput: {
default: false,
},
inputReadonly: {
default: false,
},
chatHistory: {
default: () => [],
type: Array
},
loadingAnswer: {
default: false
},
sendQuestionBody: {
type: Function
},
copyHanlder: {
type: Function
},
showReAnswer: {
default: true
},
copyType: {
default: 'clipBoard', // clipBoard,function
}