Vue interview questions !!!

Source: Internet
Author: User
The company needs to split the project and use the Vue framework at the front end. Questions summarized by the last interview vue

 

1: What is the mvvm framework? What is the difference between it and other frameworks?

Mvvm full name Model View viewmodel, model data model, view layer, viewmodel is linked to both

The difference is that vue is a data-driven, and the view layer rather than node operations are displayed through data. This reduces Dom operations and improves performance.

The following figure shows how to enhance the relationship:

2: What is V-model? How to bind tags to events in vue?

V-model supports bidirectional binding, including V-class, V-for, V-if, V-show, and V-on .. bind event: <input @ click = dolog ()/>

3: how to define a dynamic route for Vue-router? How to obtain the passed dynamic parameters

Add/: ID to the path attribute in the index. js file under the router directory. Use the Params. ID of the router object

4: What is vuex?

In the Vue framework, status management is to take out the shared state of the Organization and manage it in a global Singleton mode. In this way, the status or triggering behavior can be obtained at any time.

5: What is Vue-router?

Vue is used to write a plug-in for routing. Router-link and router-View

6: What is the Vue life cycle?

Here I posted a great explanation of http://www.cnblogs.com/padding1015/p/9159381.html

7: Let's talk about component communication?

The parent transmits data to the child through props

There are two types of sub-components passed to the parent component.

1. The child component changes the props passed by the parent component (you will find that the data is transmitted through the object type parameter in props, and the data content can be changed through the Child component. This method is feasible, but not recommended, because the official definition of prop is one-way binding)

2. Use an empty vue instance as the central event bus through $ on and $ emit sub-Transfers

Use an empty vue instance as the central event Bus

Vue interview questions !!!

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.