天天看點

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

idea類,方法注釋

類注釋

打開file->setting->Editor->Filr and Code Templates->Includes->File Header

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

直接在右邊編輯注釋内容,再次建立檔案即可生成類注釋。

類注釋模闆:

/**
 * @Author:     馬雲峰
 * @Description:  ${description}  
 * @Date:    ${DATE} ${TIME}
 */
           

方法注釋

打開file->setting->Editor->Live Templates

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

點選右邊上面那個+号,選擇Template Group,然後彈出一個視窗,随便添加一個名字,OK。

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

找到剛才建立的組名,點選+号,點選Live Template

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

填寫相應内容

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

方法注釋模闆:

/**
* @author:      馬雲峰 
* @Description:  $description$
* @date:        $date$ $time$
*/
           

點選Edit variables

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

填寫相應内容點選Ok

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

點選change 全部勾選。

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

效果:敲出qq自動彈出注釋模闆

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

WebStorm 類注釋

打開file->setting->Editor->Filr and Code Templates

添加類注釋與方法注釋idea類,方法注釋WebStorm 類注釋

需要在vue檔案與JS檔案上加上自己的檔案注釋

添加方法内容與idea一樣。

111