Xpress front-end --------- remember the sea before the interview summary

  react inside: the difference between the state and the prop? Why setState is asynchronous? There are several ways by value component?

A: 1.prop used to define an external interface, state records for the internal state. When 2.prop assignment using external components, the assignment of state formation in the interior. 3. components should not change the value prop, but the presence of the state is to allow components to change.

  2.setState asynchronous update state enables concurrent updates assembly possible.

  Information: https://segmentfault.com/a/1190000013040438?utm_source=tag-newest

   3. The value transfer mode components:

   Parent component subassembly to pass the value (by props)

  Parent child transmission (callback)

  Cross-level components by value

  Components of the communication without a nesting relationship

  Reference: https://www.cnblogs.com/dhcn/p/11125448.html

 

  Data vuex inside the store, how to deal with the problem of missing refresh the page?

  You can directly change to local storage, session storage and so on.

  Information: https://www.cnblogs.com/goloving/p/9074574.html

 

  Cmd difference amd norms and norms?

  amd respected dependent nearest specification, cmd specification dependent pre respected.

  Dependence amd module is executed in advance, cmd execution is delayed.

 

  spa application how to do seo?

  Server-side rendering ssr, pre-rendered.

 

  Baidu heavy weight optimization method?

  Links, keywords, website navigation function for a long time can set up a website map.

 

  Ajax briefly describe the process?

  1. create a xmlhttprequest object.

  2.open()

  3.send()

  4. Analyzing the state of the server response.

 

  How interrupt transmission of ajax?

   One is set to automatically disconnect timeout to let ajax,

    Another is to manually stop ajax request, which is the core of the abort method on the XMLHttpRequest object call

 

  vue-router based on what is achieved?

  1.hash   ----------(#hash)

  2. The browser's history

  Information: https://blog.csdn.net/qq_27674439/article/details/99821474

 

  There are several ways to create an object?

  1. literal way

  2. Constructor

  Information: https://www.cnblogs.com/topsyuan/p/11260399.html

 Monitor changes in the object method native? The object has a name attribute, if change is to alert Joe Smith Joe Smith, John Doe will alert if the change is John Doe?

 

 

  Under what circumstances will cause redraw and return?

   Redraw: When updating render tree in an element attributes, and these attributes only affect the appearance of elements of style, does not affect the layout, called redrawn.

  Return: When a portion of the render tree because of the size of the element size, layout, hide and other changes need to be rebuilt, called reflux. When the page is first loaded reflux will occur.

  Differences: reflux will cause redraw, redraw will not necessarily lead to reflux.

 

  How to achieve a div (square) with height and width variation change?

  Use js listening div.style.height, assigned to the div width.

 

  Call and apply the difference?

  1 Call syntax: function name .call (obj, parameter 1, parameter 2, 3 ...... parameter);

  2 Apply syntax: function name .apply (obj, [parameter 1, parameter 2, 3 ...... parameter]);

  This is the same thing two functions, a function which is to set an object of this difference is the syntax of the parameters of the back. call requires the use of a comma-separated list of all parameters, but apply to all parameters are written in an array inside. Note that even if only one parameter, it must be written in an array inside.

 

  The development of mobile end what problems encountered?

   For example: installation plug, issues cross-domain request.

 

  vue why the arrays and objects to listen?

  watch: {} objects can monitor data, data changes, the handler

Objective: watch, although may listen, but only shallow listening, listening only data of the first layer or the second layer, watch not listening. You can set deep: true depth of listening to do.

  Vue two-way data binding.

  

  Common status codes which ones have? What 403 representatives?

  403 server denied access.

  A radio tag you can add a click event in Andrews above?

  can.

  Specific implementation reference: 

Methods (@ click.native.prevent):
 
<el-radio-group v-model="radio2">
  <el-radio @click.native.prevent="clickitem(3)" :label="3"> 备选项</el-radio>
  <el-radio @click.native.prevent="clickitem(6)" :label="6"> 备选项</el-radio>
  <el-radio @click.native.prevent="clickitem(9)" :label="9"> 备选项</el-radio>
</el-radio-group>
           
clickitem (e) { 
     e === this.radio2 ? this.radio2 = '' : this.radio2 = e
 },

 

  What are ways to optimize the animation?

  Optimization of graphic images, sound files, optimize, optimize files and libraries, optimized code.

 

  vue role of keep-alive?

   keep-alive Vue is a built-in component, the component can be included on hold, or avoiding re-rendering.

 

  Several cross-domain solutions?

  Four kinds: 1.jsonp 2.cros 3.domain.xml 4. forward proxy configuration.

 

  get and post requests difference?

  post security better than get, get parameters on the url, post request file, get used to obtain the data, post mainly for submission of data.

 

  What is a memory leak? What action will lead to memory leaks?

  Memory leak means that the program has been dynamically allocated heap memory for some reason the program does not release or not release, resulting in a waste of system memory, causing the program to run slower and even system crashes and other serious consequences.

  Closures caused by improper use

 

  ie w3c box model box model and what is the difference?

  ie box model content section contains padding and border

  w3c box model does not include content.

 

  Talk about some of the work you will do front-end performance optimization?

  Sprite mapping techniques compressed code, combined js and css files multiplexed, lazy loading technique, css in the head, set the browser cache and the like.

 

  The difference webpack fileload with urlload of?

  A: url-loader package the file-loader. url-loader is not dependent on file-loader, for example: we need background pattern introduced with a background image url, we know webpack each module will be packaged with the path so that the url inlet html page, rather than the original css files, pictures will lead to the introduction of failure. The use of file-load, you can parse url introduction of the project, according to our configuration, the picture will be copied to the appropriate path, according to our configuration, modify the file path after the reference package, point to the correct file.

 

  css3 how to achieve a line to animate a rotation around the center point of this?

    A: The use of css3 transform property.

 

  Jquery difference between inside and on the bind?

  Events are binding,

  Differences: event delegates.

 

 There are ways in which objects inherit?

   Inherited prototype chain, or apply a method using the call, the extends inheritance.

  Information: https://www.cnblogs.com/EternalZH/p/10402593.html

  

 How to do a file upload HTTP?

  Information: https://www.cnblogs.com/libin-1/p/5958791.html

 

Guess you like

Origin www.cnblogs.com/hudunyu/p/11769750.html