Vue Page
Create separate VUE component, including TS and JS version. also can use in webstrom.
How to use
- right-click on the project folder, select
vue page or vue ts page item in the menu.
- fill in the component name. for example:
hello-world, then press enter key.
this will create a folder named hello-world, and three files in it :
for JS version
- hello-world.js
- hello-world.less
- hello-world.vue
for TS version
- hello-world.html
- hello-world.less
- hello-world.vue
Optional parameters
there are Optional parameters can be placed after the component name:
--flat, This will not create the folder, but the files will still be created.
--nocss, this will not create less file.
--nojs, this will not create js file(only for js version)
--nohtml, this will not create html file(only for ts version)
for example:
hello-world --flat --nocss
Tips: the comment // @vue/Component in the JS file is necessary. Eslint will recognize this object as a VUE component.
| |