0.0.1 • Published 8 months ago

chat-input-next v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

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/