我知道可以使用
{
"vetur.format.defaultFormatter.html": "js-beautify-html"
}
来格式化html代码,但是通常情况下组件的指令、props、事件会有很多,如何让这个插件定义一些配置来达到属性换行书写,如下:
<i-control-layout
ref="controls"
:btnCol="3"
:toolbar="treeToolbar"
moreBtnType="default"
></i-control-layout>
vuejs的官方插件有个叫
eslint-plugin-vue
,搭配eslint使用所以eslint配置文件(.eslintrc.js)如下: