1***@qq.com
1***@qq.com
  • 发布:2019-07-18 14:48
  • 更新:2019-09-29 22:07
  • 阅读:4941

【报Bug】HB template lang="pug" 不再支持了嘛?

分类:HBuilderX

详细问题描述

更新了HB之后,VUE语环境下,template 用的是pug 但是每次用 格式快捷键,template里的代码 就会变成错乱的

上个版本 2.0.1.20190614 没问题 更新之后出的BUG

[内容]

重现步骤

[步骤]

  1. 新建一个UNI app项目

  2. 工具->预设快捷键方案切换->VS Code

  3. 新建一个VUE文件

    
    <template lang="pug" name="history">  
    .root  
        .cu-tabbar-height  
        .cu-list.menu(style='margin-top:6px' v-for="i in 3")  
            .cu-item  
                .content  
                    text.text-grey 订单号:  
                    text.text-grey.margin-left-xs  201905451845  
    </template>  
    <script>  
    export default {  
    name: 'history',  
    data() {  
        return {};  
    },  
    onLoad(e) {},  
                         methods: {}  
    };  
    </script>  
    <style lang="less">  
    </style>  

使用代码格式快捷键 ALT+SHIFT+F  

[结果]
```javascript  
<template lang="pug" name="history">  
    **.root  
    .cu-tabbar-height  
    .cu-list.menu(style='margin-top:6px' v-for="i in 3")  
    .cu-item  
    .content  
    text.text-grey 订单号:  
    text.text-grey.margin-left-xs  201905451845**  
</template>  

[期望]  
<template lang="pug" name="history">  
    .root  
        .cu-tabbar-height  
        .cu-list.menu(style='margin-top:6px' v-for="i in 3")  
            .cu-item  
                .content  
                    text.text-grey 订单号:  
                    text.text-grey.margin-left-xs  201905451845  
</template>  
<script>  
export default {  
    name: 'history',  
    data() {  
        return {};  
    },  
    onLoad(e) {},  
    methods: {}  
};  
</script>  
<style lang="less">  
</style>  

pug 语法被重新缩进后,根本用不了,希望官方能及时修复这个BUG

IDE运行环境说明

[IDE版本号]
目前最新版

[windows版本号]
WIN 7

联系方式

[QQ]133490326

2019-07-18 14:48 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

安装对应的插件,应该是叫什么 prettier

  • 1***@qq.com (作者)

    大神!真的是你说的,完美的解决了我的问题!太棒了

    2019-09-12 09:47

  • 1***@qq.com

    回复 1***@qq.com: ୧(﹒︠ᴗ﹒︡)୨

    2019-09-25 17:31

DCloud_heavensoft

DCloud_heavensoft

hx的pug支持仅限于着色,其他如代码助手、格式化都没支持。如果重度用pug的话,建议使用其他ide。
欢迎到需求墙投票pug:http://dev.dcloud.net.cn/wish/

该问题目前已经被锁定, 无法添加新回复