0.0.1 • Published 8 months ago
chat-input-next v0.0.1
chat-input-next
基于vue3+vite以及div的contenteditable属性实现的聊天输入框组件
支持
暂时支持图片,视频,文件等插入,支持图片,视频,文件的复制,@逻辑
使用方式
安装
npm i chat-input-next
在组件中使用
import {ChatInputNext} from 'chat-input-next'
import "chat-input-next/dist/style.css"
支持属性
属性名 | 用处 | 例子 | 默认值 |
---|---|---|---|
cusStyle | 用来自定义样式 | {width:'80vw',height:'50vh',border:'1px solid #d3d3d3',maxHeight:'50vh'} | - |
atUserList | 定义@人员的列表 | {name: 'codesigner'},{name: 'react',} | - |
支持事件
方法名 | 用处 | 备注 |
---|---|---|
error | 接收组件报错 | - |
insertFile | 允许插入文件 | 需结合ref使用,传值为File类型 |
实现逻辑
http://gujyang.gitee.io/myblog/2023/09/19/chat-input-next-package/