Matchmaker
先上GayHub地址:Matchmaker。歡迎前去 star 或是提 issue 哈。
這是一款專為微信小程序開發(fā)的插件,目前可在 IntelliJ IDEA 中使用。它可以幫你完成重復機械無趣麻煩的綁定方法的過程,自動的將需要新建的方法注入到 js 文件中去晨汹。
PS:其實我本來的目的是做一個能在 WebStorm 里面使用的插件的,但是沒想到做出來之后反而沒辦法在 WebStorm 用贷盲,只能在 IntelliJ IDEA 里用淘这,如果有哥們兒知道怎么搞的話請告知一下,感激不盡巩剖。
GIF展示
這是在 IntelliJ IDEA 中插件的展示效果

裝載插件
不知道為什么铝穷,我把插件上傳到 JetBrains Plugins Repository 之后它就一直處于 Wait for approve 的階段,截止目前都是如此佳魔,也就是說現(xiàn)在要用的話就只能下載 jar 包然后裝載本地插件了曙聂,jar 包在這里。
作用
我們都知道鞠鲜,在開發(fā)微信小程序的時候宁脊,wxml 和 js 之間如果要有事件響應的話,是要先在 wxml 用 bind***/catch***
標簽綁定一個方法贤姆,然后在 js 里面一個一個去把 wxml 里面定義的方法寫出來的榆苞。
這個寫空方法的過程其實很無聊,就跟 Android 里面的 findViewById 一樣霞捡。想一下如果一個比較復雜的頁面有十幾個甚至幾十個綁定的方法坐漏,那寫起來多尷尬。這個插件就是用來把 wxml 里面聲明的方法直接注入到 js 里面的碧信,自動生成代碼赊琳,讓我們可以把時間和精力花在更有技術含量的地方。
用法
用法非常的簡單音婶,直接在 JS 代碼點擊右鍵慨畸,然后 Generate -> Match make 就可以了莱坎。當然你可以為這個功能設置一個快捷鍵衣式,讓它更加方便。
開源協(xié)議
Copyright 2014-2016 lypeer.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
再上 GayHub 地址:Matchmaker。歡迎前去 star 或是提 issue 哈碴卧。