wxml-vscode
wxml-vscode copied to clipboard
出现一个很奇怪的现象
1.同样的代码在不同文件中格式化后的样子不一样
2.而且有时需要按两次保存才能正确格式化。
正确的
代码如下
<!-- pages/index/inquiry/inquiry-picture.wxml -->
<view class="container" hover-class="none" hover-stop-propagation="false">
<view class="select" hover-class="none" hover-stop-propagation="false">
<text>选择宠物</text>
<image src="/images/user/more.png" mode="aspectFit" />
</view>
<view class="symptom" hover-class="none" hover-stop-propagation="false">
<text>症状:</text>
<textarea value="{{symptom}}" placeholder="请输入症状描述" maxlength="150" auto-focus="true" />
</view>
<view class="picture" hover-class="none" hover-stop-propagation="false">
<text>图片</text>
<view class="pic-area" hover-class="none" hover-stop-propagation="false">
<view class="picture-view" wx:for="{{images}}" wx:key="index" data-selectIndex="{{index}}" hover-class="none" hover-stop-propagation="false">
<image class="cover" src="{{item}}" mode="aspectFit" bind:tap="upload"></image>
<image class="close" src="/images/close.png" wx:if="{{item.substring(0,4) == 'http'}}" mode="aspectFit" bind:tap="close"></image>
</view>
</view>
</view>
</view>