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

代码补全列表
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
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 .
| |