The vue-prop parent component transmits values to child components, and the vue-prop component transmits values.
Vue-prop is used when the parent component transmits data to the child component.
For example, the sub-component is
Child. vue
Template: '
We specify a data name in the child component: msg
Write in pa
How does Vue introduce remote JS files? How does vue introduce js files?
Problem
Recently, we have been using Vue to do things and use the dingtalk login scan function. We need to introduce remote js files because the Vue method is different from the previous one, I didn't want to download the file to a local applicati
Cross-origin ajax solution (recommended) during vue-cli development, vue-cliajax
Objective: To access the background interface to obtain data for a project built using vue-cli during development, a cross-origin problem occurs.
Configure the following in config/index. js:
[That is, when an ajax request is made, any request address starting with/api in the address
Web Front-end vue implements Interpolation of text and output of original html and vue Interpolation
Vue. js uses the HTML-based template syntax, allowing developers to explicitly bind the DOM to the data of the underlying Vue instance. All Vue. js templates are legal HTML,
Vue. js is used to simulate the development demo and vue. jsdemo.
I use Vue. js to implement some functions of the circle of friends, to display the circle of friends, comment, and likes.
First, construct a vue instance to bind the changed data in two directions,
I use JSON to forge template data, first display the eff
Quickly solve the problem that vue-cli Cannot initialize the webpack template, vue-cliwebpack
Vue init webpack pro [Failed to download repo] [connect ETIMEDOUT 192.30.20.112]
This error is reported.
Someone said it was a proxy problem. I don't know, but this method is useful.
1. Download the template https://github.com/vuejs-templates/webpack to be initialize
When you create a Vue instance, el you can omit the option if the configuration item is declared template . At this point, Vue.js will extract the HTML content of the anchor element as a template.We can use a single el configuration item to create a Vue instance:var vm = new Vue({el:‘#app‘});In Vue.js, this template is called an HTML template , and template a tem
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.