0.0.15 • Published 11 months ago
chat-input-plus v0.0.15
chat-input-plus
基于chat-input-next进行修改的聊天输入框组件
支持
暂时支持图片,视频,文件等插入,支持图片,视频,文件的复制,@逻辑
原项目地址
https://gitee.com/guJyang/chat-input-next
使用方法
import { ChatInputPlus } from 'chat-input-plus' import "chat-input-plus/dist/style.css"
支持事件增加
方法名 | 说明 | 参数 |
---|---|---|
clearData | 清除内容 | - |
insertContent | 插入内容 | *html: string | HTMLElement, atStr?: string |
displayAtPopover | 返回@列表是否在显示 | - |
exportHtml | 输出内容的html | - |
支持属性增加
属性名 | 说明 | 例子 | 参数 |
---|---|---|---|
atEachMemberDefine | 自定义@列表定义 | { name: 'cutname', id: 'guid', avatar: 'icon'} | 与原参数名一一对应 |
atUserList | @的列表 | [{name: 'codesigner',avatar:'xxxx'},{name: 'react',avatar:'xxxx'}] | 使用原项目定义/any[] |
offset | @列表的偏移 | {x:0,y:0} | {x:number,y:number} |
disable | 禁用 | - | boolen |
onlyText | 只使用文本内容 | - | boolen |
使用自定义atUserList需要与atEachMemberDefine一起使用