Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>WPT SnippetsNew to Visual Studio Code? Get it now.

WPT Snippets

gesm

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

WPT Snippets

vscode 代码补全插件,帮助你急速编写业务代码

install

代码补全列表

WPT.

  • showPage => WPT.showPage('$1');"
  • redirect => WPT.redirect('$1');"
  • nowTime => WPT.nowTime"
  • API => const API = WPT.Util.handleApi({ ... "
  • getData => WPT.getData(API.$1, {}, (res) => { ... "

WPT.Modal.

  • tips => WPT.Modal.tips(${1:res.msg});
  • alert => WPT.Modal.alert(${1:res.msg});
  • open => WPT.Modal.open(${1:<Components />}, ${2:options});
  • close => WPT.Modal.close();

WPT.Util.

  • handleApi => WPT.Util.handleApi({ ...
  • query => WPT.Util.query();
  • formatDate => WPT.Util.formatDate('${1:y-m-d H:i:s}', ${2:timestamp});

TODO

  • 着重结合WPT文档进行补全
  • 引入组件库wptd的补全

欢迎意见和pr

关于 vscode snippets

This is the source code for Snippet Guide.

VS Code API

Contribution Points

  • contributes.snippets

Running the Sample

  • Run the Run Extension target in the Debug View
  • When you type log in a JavaScript file, you would see the snippet Print to console.
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2019 Microsoft