What is Virtual DOM in Vue. js 2.0 ?, Vue. jsdom
What is Virtual DOM?
Previously, React and Ember began to use virtual DOM technology to speed up page updates. If you want to know how it works, you must first recognize these concepts:
1. Updating DOM is very expensive.
When we use Javascript to modify our page, the browser has done some work to find the DOM node for modification, for example:
document.getEl
Detailed description of the proxyTable cross-domain problem summary in the vue-cli project, vue-cliproxytable
What is cross-origin?
The same-origin policy specifies that the two URLs are considered cross-origin if there is any difference between the Protocol, domain name, and port.
What are the cross-origin solutions?
1. JSONP is short for JSON with padding (filling JSON or parameter JSON.
The principle of
Vue implements forward and backward refresh without refreshing effect, and vue performs backward refresh
Recently, vue is used to create a mobile project. We hope to achieve the effect of refreshing forward and backward without refreshing. That is, the loaded interface can be cached (the returned interface does not need to be reloaded), and the closed interface c
Add Baidu statistics code to a single-page vue application (for test purposes) and vue code
In this way, the ingress file is inserted globally, and each page is available. This involves a problem, Vue. the js Project is a single-page application. Every time a user browses a website, the page will not be refreshed when accessing the inner page, which means that B
Talking about reusing requests based on axios in Vue-cli, vue-cliaxios
This article introduces how to reuse requests based on axios encapsulation in Vue-cli and shares them with you as follows:
Install
You only need to install one axios.
npm install axios --save
Interface proxy settings
To ensure that requests can be sent normally, we usually need to configure an
Based on the implementation method of clicking the external component in Vue to close the component, vue component
Vue defines the global click function. The parameter is the click callback function.
Vue. prototype. globalClick = function (callback) {// global click $ (document). click (callback );}
Monitor global c
1, build a vue-cli to build a project(1) Installation vue-cliNPM Install Vue-cli-g(2) Vue init webpack project nameSelect Settings as needed(3) NPM InstallInstall the configuration (be aware that the current location is in the project if the configuration is installed, otherwise it will be error: Configuration file Pac
Vue-resource1.CNPM Install Vue-resource--save2. Import Vueresource from ' Vue-resource ' in Main.js3. Vue.use (Vueresource) in Main.js4. Use this in the component $http. Get (URL). Then ((response) =>{}, (Err) =>{})"app"> "Htmlvalue"> Vue Vue-resource sending an HTTP request
Extremely scary, when using the Vue-simple-upload plugin to do file upload, encountered always access to the background of the interface.I thought I use plug-ins have problems, various changes, because unfamiliar, false change several times.Emmmm~~ originally is my action parameter to the lowercase post, start console error, gave so obvious hint,I can't believe I don't understand.OK, first step, downloadNPM Install
Vue. js beginner-DIY mobile terminal Input Keyboard, vue. js beginner diy keyboard
In the process of project development, we need users to input something, but we are not willing to allow users to enter anything at will. Therefore, we may choose to use a custom input method, to restrict user input, let's take a simple example to see how to set input methods on mobile Web pages. Here we still use our old fr
Vue. js forms control binding required every day, vue. js Form Control
Basic usage
You can use the v-model command to create two-way data binding on the Form Control Element. It automatically selects the correct method to update elements based on the control type. Despite the magic, v-model is just a syntactic sugar. It updates data in user input events and handles some extreme examples in particular.
Text
Vue implements two-way data binding and vue binding
Vue implements two-way data binding. The details are as follows:
How does Vue implement bidirectional data binding? The answer is front-end data hijacking. Through the Object. defineProperty () method, this method can be used to set the getter and setter functions. In
How to add mp3 audio files to vue, and how to add mp3 audio to vue
Sometimes we need to add an audio file to the vue, but when we directly place the audio file under the assets Directory, we will find that it cannot be played normally. Below are two common configuration methods:
Method 1: place the audio file in the static directory and call the file as follows:
Vue. directive () usage and instance details, vue. directive details
Official Website instance:
Https://cn.vuejs.org/v2/api/#Vue-directive
Https://cn.vuejs.org/v2/guide/custom-directive.html
The instruction definition function provides several hook functions (optional ):
Bind: it is called only once. It is called when the command is bound to an element for the fi
Use the echarts method in Vue, and use echarts for vue
The previous article introduces how to use ECharts in webpack. You can click here to view details.
1. Use NPM for installation (Global Introduction)
Run the following command:
npm install echarts--save
Introduce the echarts Module
Introduce the echarts module in main. js of the Vue project, that is, write the
Vue uses Enumeration type to implement detailed steps in HTML drop-down box, vue drop-down box
The drop-down box contains the Value in option and the option to be displayed. Generally, the Value is used in the background, rather than the option displayed on the foreground.
Step 1: Compile the enumerated types required by the drop-down box
StatusEnum. java
public enum StatusEnum { RED, YELLOW, GREEN}
Step 2:
To solve the problem that the routing page cannot be displayed normally when vue-router is built, vue-routerbuild
Use vue cli to create a webpack Project
Add vue-router and then use the route to introduce a new component. The route and link are written in this way.
const router = new VueRouter({ mode: 'history', base:
Detailed description of project-related configuration files extracted during vue-cli packaging, vue-cli configuration file
When using vue-cli for development, you often need to dynamically configure some settings, such as the request address of the interface (axios. defaults. baseURL), these settings may need to be set after the project compilation, so in
Vue. js nested loop, if judgment, dynamically deleted instance, vue. js nested
Vue. js is currently a popular JavaScript MVVM library, which is built based on data-driven and componentized ideas. Compared with Angular. js, Vue. js provides APIs that are simpler and easier to understand.
App.html
Differences between v
Solve the problem that the DOM operation on the vue page does not take effect. The dom operation on the vue page takes effect.
Symptom:
The Element UI is used to render a tree structure. The operation button is displayed when you move the mouse over each node. The effect is as follows:
The error section is as follows:
After adding a node, move it to the vicinity of the new node (in the figure, move it
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.