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: MChat component renderings: IChat component effect diagram: How to installInstall using npmnpm install vue-mchat useImport 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) SummarizeThis 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:
|
<<: Use of marker tags in CSS list model
>>: HTML blockquote tag usage and beautification
Table of contents 2. Comma operator 3. JavaScript...
Add the jvm.options file to the elasticsearch con...
Source of the problem As we all know, all network...
Preface Components are something we use very ofte...
When I first came into contact with docker, I was...
1. ref is copied, the view will be updated If you...
Preface In the process of using MySQL database, i...
My environment: 3 centos7.5 1804 master 192.168.1...
Table of contents 1. Introduction to MHA 1. What ...
1. Basic knowledge (methods of date objects) 😜 ge...
First of all, let me talk to you about my daily l...
Preface: It’s the end of the year, isn’t it time ...
1. Introduction Supervisor is a general process m...
1. Overview The Promise object is a specification...
The META tag is an auxiliary tag in the head area...