VSCode中vue文件的html格式化时,属性标签自动换行的修改

时间:2021-02-19 13:19:51   收藏:0   阅读:476

解决方案

1.前提:"vetur.format.defaultFormatter.html": "js-beautify-html",
2.修改"wrap_attributes"为 "aligned-multiple"

    "vetur.format.defaultFormatter.html": "js-beautify-html", //格式化.vue中html
    "js-beautify-html": {
      "wrap_attributes": "aligned-multiple"
      // "wrap_attributes": "force-expand-multiline" //属性强制换行对齐
      // "wrap_attributes": "force-aligned" //属性强制折行对齐
    },

插件及说明

vetur.format.defaultFormatterOptions 对属性进行换行。

作者:借你趁早
链接:https://juejin.cn/post/6884850654544658446
来源:掘金

原文:https://www.cnblogs.com/asahi-front/p/14415425.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!