Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ETP-HelperNew to Visual Studio Code? Get it now.
ETP-Helper

ETP-Helper

caixiaogui

|
14 installs
| (0) | Free
vscode plugin
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

前置要求

  1. vscode 版本 >= 1.70.0

创建模块说明

  1. 当同时打开了多个工程时,默认注入的是 vscode 当前激活的编辑的文件所在的工程。
  2. 如果同时打开多个工程,当前 vscode 没有打开相关文件,则不会注入文件。
  3. 当前注入规则依赖以下目录,如果 src 目录下没有 store / route / pages 目录则会抛出错误。
  4. 如果新建模块和 pages / store 中已有模块重复,则会抛出错误。
  5. 默认不创建相关 store。
  6. 修改相关文件依赖以下关键字标识。
  • // 追加 components 勿删此注释
  • // 追加路由 勿删此注释
  • // 追加 middleware 勿删此注释
  • // 追加 reducerPath 勿删此注释
  • // 追加 reducer 勿删此注释
  • // 追加 import reducer 勿删此注释
src
├─App.tsx
├─index.tsx
├─store
|   ├─customBaseQuery.ts
|   ├─index.ts
|   ├─reducers.ts
|   ├─rtkQueryErrorMiddleware.ts
|   ├─common
|   |   ├─index.ts
|   |   ├─service.ts
|   |   ├─slice.ts
|   |   └types.ts
├─route
|   ├─components.ts
|   └routes.tsx
├─pages
|   ├─homePage
|   |    ├─HomePageComponent.tsx
|   |    ├─homePage.style.ts
|   |    └types.ts

自定义快捷输出

选中变量,右键选择 add console 即可自动输出 console 语句,方便调试。

使用说明

  1. command + shift + p 通过 Create Page 命令进行模块创建。
  2. command + shift + p 打开工作区设置。在拓展中找到 ETP-Helper, 可以自定义输入 console 前缀和样式。

TODO:

  • delConsole
  • 快捷键输出模版代码
  • 其他自定义操作
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft