wx-minapp / minapp-vscode

WXML Language Support
https://marketplace.visualstudio.com/items?itemName=qiu8310.minapp-vscode
MIT License
261 stars 41 forks source link

wxml代码折叠问题 #81

Open Akiq2016 opened 4 years ago

Akiq2016 commented 4 years ago

.vscode/settings.json 配置

{
  "editor.formatOnSave": true,
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "minapp-vscode.wxmlFormatter": "prettier",
  "minapp-vscode.prettier": {
    "parser": "html",
    "useTabs": false,
    "tabWidth": 2,
    "printWidth": 120,
    "singleQuote": false,
    "jsxBracketSameLine": true
  },
  "files.associations": {
    "*.wxml": "wxml",
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  }
}

问题及预期表现

<!-- xx.html/xx.wxml 展开 -->
<view
    class="hotAct-top"
    style="background-color:{{ hotInit.back_color ? hotInit.back_color : '#fe6647' }}; background: url('{{hotInit.top_img}}') no-repeat top left/ 100% 550rpx;z-index:100"
  >
  <view>一些文字</view>
  <view>一些文字</view>
</view>

<!-- xx.html 折叠 -->
<view>
</view>

<!-- xx.wxml 折叠:预期能与xx.html折叠效果一致 -->
<view
>
  <view>一些文字</view>
  <view>一些文字</view>
</view>
iChenLei commented 3 years ago

@Akiq2016 抱歉,没太明白你的问题,请问现在问题依然存在吗?是否已解决