Various problems encountered in VUE and face questions

1. Do you know vue template syntax with which web template engine do? Talk about your understanding of this template engine.

mustache, primarily using {{}} Rendering data.

2. Do you know the principle of v-model of it? Tell me

v-model is a syntactic sugar, the real way binding or rely on v-bind: Bind responsive data. And a trigger input events and pass data (core and key)

3. VUE how to define a global method?

The first: a method to mount the proptotype Vue, the second mixed using a global mixin.

4. how to solve the problem after vue packaged static resources picture of failure?

Find config / index.js configuration file, find the object in the package build assetsPublicPath property, the default value: ' / ' , amended to read: ' ./ ' .

5. how to solve vue dynamic set of problems img src not in force?

Because of src are dynamically added as static resources to deal with, not compiled, so to add require. 
<IMG: the src = " the require ( '@ / Assets / Images / xxx.png') " />

6. how do vue after use SEO optimization for search engines?

Use server-side rendering, vue officially recommended nuxt.js

7. with keep-alive about the life cycle of what? The description of the life cycle of

1 .activated: to enter the page for the first time when the order is triggered hook created-> mounted-> activated
 2 .deactivated: exit the page will trigger when deactivated, when forward or backward again only trigger activated

8. Have you seen vue recommended style guide? You know the list of a few

1 label naming style. E.g. <EL-Button>
 2 . Components style scope attribute.
3 Use V- for recall plus key. You can quickly locate the dom node to update and improve efficiency.
4 . Vuex management using global state priority.

What is the difference 9.Vue1.x and Vue2.x

1 , 2 .0 lifecycle more semantic, increased beforeUpdate, updated, activated, deactivated, deleted attached, detached.
2 , 2 .0 deleted 1.0 comes with a filter.

10. You know the key principles vue do? Talk about your understanding of it

Unique, easy to make diff algorithm update diff algorithms, key faster to find the need to update the dom node.

11.Vue in how to reset the data

. 1 .Object.assign () method: for all the enumerated attribute values are copied from one or more source object to the target object.
2 . The this $ data:. Acquiring data in its current state.
. 3 . The this $ option.data:. Data acquired in the initialization state component.
. 4 .Object.assign ( the this $ Data,. The this $ option.data.);

12.V how to retain it in the template HTML comments ue when rendering templates?

// template tags to add comments attribute 
<Template comments> 
     ...
 </ Template>

 

Guess you like

Origin www.cnblogs.com/MJ-MY/p/11612112.html