Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>WePY Action NavigatorNew to Visual Studio Code? Get it now.
WePY Action Navigator

WePY Action Navigator

Jsmond2016

|
1 install
| (0) | Free
Go to Store/API definition and hover for dispatchAction and actions.{actionKey} in .wpy files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

WePY Action Navigator

VSCode 扩展:在 .wpy 文件中为 dispatchAction('actionName') 与 this.$store.actions.{actionKey} 提供跳转与 Hover 提示。

功能

  • Go to Definition(Cmd/Ctrl + 点击):在 action 名字符串上 Cmd+点击,可跳转到 Store 层 action 定义及(若有)API 层接口实现(多定义列表)。
  • Hover:悬停在 action 名上时,弹框显示可点击链接 Go to Store、Go to Api(仅当该 action 有对应接口时显示),以及接口名(action type)。

使用

  1. 在项目根目录已包含 src/store、src/services/api 或分包 setup/store、setup/http 时,扩展会自动扫描并建索引。
  2. 新增或修改 Store/API 后若 Hover/跳转未更新:先保存相关 .js,再在命令面板执行 WePY: Rebuild Action Index(wepyActionNav.rebuildIndex)手动刷新索引。
  3. 打开任意 .wpy 文件,在以下位置均可使用:
    • this.$store.dispatchAction('xxx') 的 'xxx' 上
    • this.$store.actions.xxx 的 xxx 上(如 this.$store.actions.getPromotionsByPositionId([...]))
    • Cmd/Ctrl + 点击 → 跳转到 Store/API 定义。
    • 悬停 → 显示「Go to Store」「Go to Api」链接及接口名。

开发

cd wepy-action-nav
pnpm install
pnpm run compile

在 VSCode 中按 F5 从当前仓库启动扩展开发主机进行调试。

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