做了半年的微信小程序,由于感觉微信开发者工具非常不好用,所以贴出在下使用webstorm和vscode开发的教程给大家参考一下。
注意:代码只能提示只有js文件
工具:电脑一台、webstorm、vscode
1.首先FileType下Cascading Style Sheet 添加*.wxss

2.FileType下HTML 添加*.wxml

3.打开vscode,搜索下图中的插件安装。其中有一个插件是可以生成一个wx.d.ts的语法文件的,由于装插件的时候是全部一起装的,没有留意是哪个,不过个人感觉是小程序助手。


使用vscode开发的童鞋这样就可以开心的使用vscode来码代码了
至于webstorm的童鞋,只要打开你当前vscode打开的项目目录,或者直接把typings文件夹复制到你开发的项目目录下,就可以了。

网友评论