Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>quickAddNew to Visual Studio Code? Get it now.
quickAdd

quickAdd

loock

|
44 installs
| (0) | Free
基于代码模版快速添加文件/文件夹
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

quickadd README

基于 ejs 模版快速添加文件

使用步骤

  1. vscode 命令面板执行 “【快速添加】生成本地模板”,会在项目问价夹目录中生成模版代码
template
|____compHook
| |____index.tsx.ejs
| |____typings.d.ts
| |____${name}.tsx.ejs
| |______tests__
| | |____use${name}.test.ts.ejs
| | |____${name}.test.tsx.ejs
| |____use${name}.ts.ejs
| |____style.less.ejs
|____component
| |____index.tsx.ejs
| |____typings.d.ts
| |____${name}.tsx.ejs
| |______tests__
| | |____${name}.test.tsx.ejs
| |____style.less.ejs
|____service
| |____${name}.ts
| |____${name}.js
  1. 在 package.json 文件中添加如下字段
{
  "quickAdd": {
    "templateDir": "template"
  }
}
  1. 根据当前业务修改代码模版

  2. 在资源目录选中文件或者文件夹,右击,“【快速添加】快速添加...”

  3. 根据提示输入组件名称和模板

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft