vue assignment method by introducing components deconstruction

The introduction of a number of other components in the assembly when the code will become very bloated, this time can be deconstructed es6 assignment method

 

Index.js write a file in components in

 

You want to export component introduced in the js file

 

 

 

 

Then re-assignment can be deconstructed by the assembly in a way to introduce (to enter the file index.js)

 

 

 

 

Do not forget to register

 

 

 

Then you can use

 

 

 

Guess you like

Origin www.cnblogs.com/huchong-bk/p/11925956.html