This issue recommends a minimalist chat box component based on Vue and ElementUI – JwChat.
JwChat is an IM component developed with reference to AVue and element-ui, which only needs a label to present the communication interface. The communication interface includes common chat functions: sending text, voice, expression, picture, video, file, group, quick reply, etc.
Features
- Simplified process : Simple and intuitive operation process
- Clear and clear : the language is clear and the meaning is clear, so that users can quickly understand and make decisions
- Help users identify : The interface is simple and straightforward, so that users can quickly identify rather than recall, reducing the memory burden of users
- User decision : According to the scenario can give the user operation suggestions or security tips, but can not replace the user to make decisions
- Results controllable : The user is free to perform actions, including undo, rollback, and termination of the current operation
Installation
- Install
Install using yarn:
yarn add jwchat
Install using npm:
npm i jwchat
Students with poor network in China can use cnpm installation:
cnpm i jwchat -S
- Use
1. Because this component is based on element-ui development. First we need to introduce element-ui
npm install element-ui
2. Introduce components into main.js
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
import JwChat from 'jwchat';
/* Versions before 0.2.041 need to introduce css */
// import 'jwchat/lib/JwChat.css';
Vue.use(JwChat)
3. Introduce
into *.vue
<JwChat-index
:taleList="list"
@enter="bindEnter"
v-model="inputMsg"
:showRightBox='true'
scrollType="noscroll"
/>
Component
- Basic components Chat
- chat component interface
- Right column – imitation QQ group
- Quick reply component
- User component
- empty component
You can read more on your own.