1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +08:00
Yamel Senih f45a57178a
Feature/#doc add documentation (#798)
* Add support to x vversion from npm

* Add support to x vversion from npm

* Add support to x vversion from npm

* Add documentation for current repository
2021-04-29 12:23:48 -04:00

1.2 KiB

New

In daily work, the most common is to write modules and business components. When you open a new view or component every time you need to manually create a new .vue, create a <template>, <script>, <style>, or some problem.

So in the new version, based on plop, several basic templates are provided to facilitate the creation of the new view orcomponent.

Execute the following command:

npm run new

plop

As shown in the previous gif, it is easy to generate the basic code snippet I want by simply pressing Enter several times. This is just a demonstration, you can customize the template according to your needs.

For additional template requirements, you can create a custom template by following the plop documentation and going to the plop-templates directory.

In fact, this feature is similar to what snippets do. If you think the configuration is too complicated, you can install a code fragment based on VSCode such as Vue 2 Snippets.