idea類,方法注釋
類注釋
打開file->setting->Editor->Filr and Code Templates->Includes->File Header

直接在右邊編輯注釋内容,再次建立檔案即可生成類注釋。
類注釋模闆:
/**
* @Author: 馬雲峰
* @Description: ${description}
* @Date: ${DATE} ${TIME}
*/
方法注釋
打開file->setting->Editor->Live Templates
點選右邊上面那個+号,選擇Template Group,然後彈出一個視窗,随便添加一個名字,OK。
找到剛才建立的組名,點選+号,點選Live Template
填寫相應内容
方法注釋模闆:
/**
* @author: 馬雲峰
* @Description: $description$
* @date: $date$ $time$
*/
點選Edit variables
填寫相應内容點選Ok
點選change 全部勾選。
效果:敲出qq自動彈出注釋模闆
WebStorm 類注釋
打開file->setting->Editor->Filr and Code Templates
需要在vue檔案與JS檔案上加上自己的檔案注釋
添加方法内容與idea一樣。