-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
用 prettyhtml 格式化 wxml #11
Comments
这个可以考虑! |
现在 WXML 属性多了的话就会一行非常长,写起来不舒服… |
@transtone @infinnie 你要求的功能 NewFuture 实现了,可以参考上面 NewFuture 提交的代码(或者在vscode配置中看最新添加的minapp-vscode开头的配置),我暂时还没写文档 |
prettyHtml 会去掉 image 等标签后面的 /> 中的/,然后微信开发工具会报错认为 <image ... > 没有闭合怎么解决? |
@NewFuture 测试下来发现 prettier 效果还不错,但是配置需要加一个配置 {
"minapp-vscode.wxmlFormatter": "prettier",
"minapp-vscode.prettier": {
"parser": "html"
}
} |
@robgu 是的这个地方没设置默认 我其实用的是 但是这个不支持自闭标签得写成这样 <image></image> |
在使用prettyhtml的时候有一个trick:将 |
什么时候支持一下image和input的闭合问题,现在暂时用template解决,但是这个很不合理。 |
最新版本(1.14.0)解决了 prettyhtml 格式化的问题,和 https://prettyhtml.netlify.com/ 中的格式化效果是一样的 |
有和 vetur 一样,用 prettyhtml 来格式化的打算吗?
The text was updated successfully, but these errors were encountered: