1.0.2 • Published 1 year ago
Views
install
You can use Yarn or NPM
npm install vue2-editor-chat
OR
yarn add vue2-editor-chat
Usage
import { EditorChatVue2 } from 'vue2-editor-chat';
import 'vue2-editor-chat/vue2-editor-chat.css';
Props
Name | Type | Default | Description |
---|
limit | Number | 3 | 上传文件数量限制 |
Methods
Name | Params | Description |
---|
clearFiles | | 清除上传文件列表 |
addMessage | | 输入框插入HTML格式内容 |
Events
Name | Params | Description |
---|
sendMessage | message,fileList | 发送消息按钮事件 |
Slots
Name | Params | Description |
---|
header | | 上方工具栏 |
footer | | 下方按钮栏 |
Examples
<template>
<div>
<EditorChatVue2 :limit="3" />
</div>
</template>
<script>
import { EditorChatVue2 } from 'vue2-editor-chat';
import 'vue2-editor-chat/vue2-editor-chat.css';
export default{
components:{
EditorChatVue2
}
}
</script>
<style lang="scss" scoped></style>