Use of $Bus in Vue

Separate the Bus into one file Bus.js import Vue from 'vue'; let Bus = new Vue(); export default Bus; Create two brothers C2.vue <template> <view> <h1>c2</h1> </view> </template> <script> // Introducing Bus import Bus from '@/util/Bus'; export default { // In the life cycle after loadi ...

Posted on Wed, 19 Feb 2020 09:40:49 -0500 by yasir_memon

Use of v-bind instruction

1, v-bind instruction 1. usage Dynamically bind one or more properties or a component prop to an expression Other types of values, such as arrays or objects, are supported when Binding class or style attributes When binding a prop, the prop must be declared in the subcomponent. You can use modifier ...

Posted on Wed, 19 Feb 2020 05:44:26 -0500 by Merdok

Basic skills of Vue [VI. user defined instructions, filters, slots, animation]

1. Custom instruction 1.1 defining instructions Function: help us to operate on some native DOM. For example, as soon as the page enters the input box, it will get the focus; for example, when the focus leaves the input box, it will start to verify. Define custom instructions: Global registrat ...

Posted on Tue, 18 Feb 2020 05:13:30 -0500 by batman

Principle and implementation of optimizer for learning Vue source code

In my last blog, I analyzed the principle and implementation of the template compiler in Vue (if you are interested, please go to: The principle of template compiler for learning Vue source code )If Vue is regarded as a sports car and template compiler is regarded as the chassis of sports car, then ...

Posted on Tue, 18 Feb 2020 02:11:55 -0500 by tracy

Design patterns in JavaScript (summary)

Please leave a note before reprinting this original article concept Design pattern is a set of re used, most people know, classified, code design experience summary. There are routines in everything. Design patterns are common routines in code writing. Some of them are used in our daily life. Let' ...

Posted on Mon, 17 Feb 2020 23:31:24 -0500 by vadercole

On the deployment of two vue projects in Nginx

This article explains how to deploy two vue projects on a nginx, and the difference between root and alias. routing problem First, assume the main domain name is www.yuming.com. The subdomain to be bound is www.yuming.com/two The following figure first shows the nginx configuration of a project. api i ...

Posted on Mon, 17 Feb 2020 22:06:08 -0500 by briglia23

MintUI components and Mui

MintUI components Github storage addressOfficial document of mint UI Install the Mint UI npm install --save mint-ui Import all MintUI components: import MintUI from 'mint-ui' Import style sheet: you can omit the node ﹣ modules layer directory import 'mint-ui/lib/style.css' Use MintUI in vue: r ...

Posted on Mon, 17 Feb 2020 00:09:20 -0500 by fireMind

Interpretation of Vue cli scaffold: behind npm run build

Interpretation of Vue cli scaffold (2): behind npm run build Next: Interpretation of Vue cli scaffold (1): behind npm run dev If you haven't read my last article, please take a look at it first! After more than a year, I feel like the article I wrote before, and I always say I want to update the next ...

Posted on Sun, 16 Feb 2020 01:41:05 -0500 by Funbruk

Vue instance lifecycle

1, Life cycle All Vue applications pass Vue example (ViewModel) to complete, Vue needs a series of initialization actions to create an instance, such as setting data listening, compiling templates, attaching the instance to the DOM and updating the DOM when the data changes. Of course, creating an instance is just life cycle P ...

Posted on Sat, 15 Feb 2020 13:56:00 -0500 by bmx316

Vue encapsulates tree menu components

csdn is finally updated. Ha, ok, get to the point The core idea of tree structure like this is: recursion. If you know how to use recursion, the encapsulation of this example function is very simple Implementation steps: props set: Data data structure defaults to [] Custom template: Not customizable Monitoring status chang ...

Posted on Thu, 13 Feb 2020 12:04:20 -0500 by trailerparkboy