Open JerryCjr opened 4 years ago
"minapp-vscode.wxmlFormatter": "prettyHtml",
"minapp-vscode.prettyHtml": {
"useTabs": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": false,
"usePrettier": true,
"wrapAttributes": false,
"sortAttributes": false
}
wxml 内容
<view class='container'>
<view class='test'>
<image></image>
</view>
</view>
如果用这个配置的话 又会莫名其妙在html后面加一个分号
"minapp-vscode.wxmlFormatter": "prettier",
"minapp-vscode.prettier": {
"parser": "html"
},
最合理的还是针对wxml做一个prettier-wxml插件,prettyHtml和prettier都是针对标准HTML做处理的,wxml和标准HTML有不少差别