Vue framework article

The advantages of vue

  • Lightweight framework: Focused only on the view layer, is a collection of views that build data, only tens of KB in size;

  • Easy to learn: Chinese developed, Chinese documents, there is no language barrier, easy to understand and learn;

  • Two-way data binding: Preserves Angular features and makes data manipulation easier;

  • Componentization: React retains the advantages of encapsulation and reuse of HTML, and has unique advantages in building single-page applications.

  • Separation of view, data and structure: it makes it easier to change the data, without the need to modify the logical code, and only need to operate the data to complete the relevant operations;

  • Virtual DOM: DOM manipulation is very performance consuming. The native DOM manipulation node is no longer used, which greatly liberates DOM manipulation. However, the specific DOM operation is just changed in another way.

  • Faster operation: Compared with React, vUE also operates virtual DOM. In terms of performance, vue has a big advantage.

In this paper, from the perspective of the previous interviewers, some important features and principles of the Vue framework are sorted out and summarized in the form of questions, in order to help the authors and readers to measure their mastery of Vue.

It is hoped that after reading this article, readers will have some inspiration to think, and have a certain understanding of their mastery of Vue. They will make up for the omissions and have a better mastery of Vue.

If you think this article is helpful, please remember to like three lian Oh, thank you very much!

Summary of Vue interview questions

Vue – cli project

  • What technologies are involved in the VUE-CLI project, and what are their roles?
  • What are the common NPM commands used in vuE-CLI projects?
  • Name the use of folders and files in vue-CLI project
  • The index.js file in config folder is used to configure the engineering development environment and production environment
  • Please tell us more about the configuration in package.json

Vue core knowledge points

  • Understanding that Vue is a set of progressive frameworks
  • What are the two cores of vue.js?
  • What is the difference between V-IF and V-show
  • Vue is a common modifier
  • Can V-ON listen for multiple methods?
  • The function of the key value in vUE
  • Vue – CLI Project Upgrade vUE version
  • How are event objects used in VUE events?
  • The use of $nextTick
  • Why does data have to be a function in a Vue component
  • Priority of V-for and V-IF
  • The vUE neutron component calls the parent component’s method
  • The role of the keep-alive component in vUE
  • How to write reusable components in VUE?
  • What is the VUE lifecycle?
  • What are the VUE lifecycle hook functions?
  • How does VUE listen for keys in keyboard events?
  • Method that triggers view updates when vUE updates an array
  • Considerations for object change detection in VUE
  • Solve the initialization page flash problem of non-engineering projects
  • The list generated by V-for implements active switchover
  • Use in components of v-Model syntax sugar
  • Custom filters in vUE
  • Vue and other single-page applications and their advantages and disadvantages
  • What are the calculated properties of vUE?
  • Vue-cli provides several scaffolding templates
  • How does a VUE parent component pass data to its children?
  • How to disable the scroll bar after vue popup?
  • Calculate the difference between caching and method calls for attributes
  • Vue-use of custom commands in the CLI

vue-router

  • How does vue-Router respond to route parameter changes?
  • Complete vue-Router navigation parsing process
  • What kind of navigation hooks does vue-Router have?
  • Vue-router Transmits parameters in several ways
  • Vue-router dynamic route matching
  • How does vue-router define nested router routes?
  • Components and their properties
  • Vue-router Implements lazy route loading (dynamic route loading)
  • Vue-router Indicates the two modes of routing
  • History Route mode and background configuration

vuex

  • What is Vuex?
  • Use the core concepts of VUex
  • Vuex application in VUE-CLI
  • Using vuex in vUE, change the value of state
  • Vuex Actions Asynchronously changes the status

The HTTP request

  • What are Promise objects?
  • What is the difference between Axios, FETCH and Ajax?
  • What are the same origin policy and cross-domain issues of JS?
  • How to solve cross-domain problems?
  • What is axios about?

The UI style

  • .vue component’s scoped property
  • How do I make CSS work only in the current component?
  • Vue-ui component library commonly used in the CLI
  • How to adapt to mobile? “Classic”
  • Media query on the mobile terminal
  • Vue content is centered vertically and horizontally
  • Vue-cli method of introducing pictures
  • Common style problems on mobile
  • Text beyond hiding

Commonly used functions

  • How to implement TAB switching in VUE?
  • Keep-alive implements TAB component caching in Vue
  • Slide pages from right to left in VUE
  • How do parent and child components call methods to each other in VUE?
  • Use of the VUE central event bus

MVVM design pattern

  • MVC, MVP, and MVVM patterns
  • The difference between MVC, MVP and MVVM
  • The realization principle of MVVM
  • Object. DefineProperty () method
  • Classes and objects defined in ES6
  • Document fragments in JS
  • Deconstruction assignment
  • Array.from
  • Array.reduce
  • Use of recursion
  • Obj. Keys () and Obj. DefineProperty
  • Publish and subscribe
  • Vue project optimization, shorten the loading time of the first screen

Further develop

  • This section describes how to run the vue development command NPM run dev
  • Server-side rendering of VUE
  • Write an NPM installation package from zero
  • Vue-a loader commonly used in the CLI
  • The characteristics of the webpack

Space is limited, need the full PDF of friends [Click here toCan receive front-end 85 Vue interview questions and analysis.

conclusion

In this paper, from the perspective of the previous interviewers, some important features and principles of the Vue framework are sorted out and summarized in the form of questions, in order to help the authors and readers to measure their mastery of Vue. Hope to read this article you have help, have inspiration, if there is not enough, welcome to criticize the exchange!

Hard to sort out for a long time, but also hope to manually praise encouragement ~