A QQ chat room based on vue.js

A QQ chat room based on vue.js

Introduction

This is a chat room component library developed based on vue.js, which provides basic encapsulation while maximizing scalability.

The following is a demonstration of the effect:

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

MChat component renderings:

insert image description here

insert image description here

IChat component effect diagram:

insert image description here

insert image description here

insert image description here

insert image description here

How to install

Install using npm

npm install vue-mchat

use

Import in main.js

# npm download method // enter css
import 'MChat/lib/MChat.css'
//Import component import MChat from 'MChat'
//Use vue to load components Vue.use(MChat)
#

How to carry out secondary development

Option 1:

Simply copy the pacages folder to the project you need, and introduce vue-mchat in main.js:

import App from './App.vue'
import MChat from '../packages/index'

Vue.use(MChat)

Option 2:

Developed on the basis of vue-mchat, it is packaged into a js library and introduced:

Execute in the vue-mchat directory:

npm run lib

You can get the lib file which contains the compiled file library of MChat. Copy the entire lib file into the project and introduce it in main.js:

import '../lib/MChat.css'
import MChat from '../lib/MChat.umd'

Vue.use(MChat)

Summarize

This article ends here. I hope it can be helpful to you. I also hope you can pay more attention to more content on 123WORDPRESS.COM!

You may also be interested in:
  • Implementation of QQ WeChat chat room function in Java
  • js code to realize multi-person chat room
  • Node.js+express+socket realizes online real-time multi-person chat room
  • js to write a simple chat room function
  • Node.js websocket uses socket.io library to implement real-time chat room
  • Node.js makes a simple chat room
  • Playing with NODE.JS (IV) - Code for building a simple chat room

<<:  Use of marker tags in CSS list model

>>:  HTML blockquote tag usage and beautification

Recommend

Summary of uncommon js operation operators

Table of contents 2. Comma operator 3. JavaScript...

Solution to ES memory overflow when starting docker

Add the jvm.options file to the elasticsearch con...

Summary of pitfalls in importing ova files into vmware

Source of the problem As we all know, all network...

How to import, register and use components in batches in Vue

Preface Components are something we use very ofte...

How to connect to docker server using ssh

When I first came into contact with docker, I was...

A brief analysis of the difference between ref and toRef in Vue3

1. ref is copied, the view will be updated If you...

Sharing of the fast recovery solution for Mysql large SQL files

Preface In the process of using MySQL database, i...

Centos builds chrony time synchronization server process diagram

My environment: 3 centos7.5 1804 master 192.168.1...

JavaScript built-in date and time formatting time example code

1. Basic knowledge (methods of date objects) 😜 ge...

mysql8.0.11 winx64 manual installation and configuration tutorial

First of all, let me talk to you about my daily l...

It's the end of the year, is your MySQL password safe?

Preface: It’s the end of the year, isn’t it time ...

Key points for writing content of HTML web page META tags

The META tag is an auxiliary tag in the head area...