解决方法:
在设置里面直接贴上代码:

"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
  "js-beautify-html": {
    "wrap_attributes": "auto",
  }
},

 

注: // 对属性进行换行。
// - auto: 仅在超出行长度时才对属性进行换行。
// - force: 对除第一个属性外的其他每个属性进行换行。
// - force-aligned: 对除第一个属性外的其他每个属性进行换行,并保持对齐。
// - force-expand-multiline: 对每个属性进行换行。
// - aligned-multiple: 当超出折行长度时,将属性进行垂直对齐。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-05
  • 2021-09-05
  • 2021-07-28
  • 2021-11-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
相关资源
相似解决方案