Some think vue-cli project template

Before there is an idea, it is to use vue write a ui. Then it was also not clear in the end how to write.

After a turnover, right, by paying way to find the answer in gitbook above.

Look After finding answers we are developing the project, look at the code writing partner, suddenly exact directory structure can be adjusted in accordance with written ui component library approach. So hands, so the new directory structure.
The most important thing is finally beginning to think from a practical level up code design, architecture design thinking. In my opinion is a kind of directory structure.

After thinking about it regarded experience.

First, it vue scaffolding, the automatically generated project template is based on the actual need to make improvements or redesign. After re-designed to be able to have a more appropriate scalability.

For example, scalable component-based, global components in particular, after a reasonable reschedule directory, you can make global components developed into a component library. Then global vue special properties, such as filters, commands and the like may also be used to separate out opening.

Second, some of the methods can depend on the nature of the inside util, using prototypes and intall vue extension method will hang in the prototype method above.

Third, local assembly, the local command, the local filter is placed inside a separate page or internal components.

Fourth, some dependencies in production environments can use all dll performs packing management, which can greatly reduce development environment when memory needs

Fifth, on mixed, mixed is another form of duplicate solutions

Six components, mixing instructions, a filter, a method can constitute a repeating unit, a method vue prototype can not appear in the instruction or a filter.

A good project template is worth doing a special scaffolding management, after all, this is a cumulative effort to think and work before they get.

Guess you like

Origin www.cnblogs.com/zhensg123/p/11587403.html