剩人
剩人
  • 发布:2019-12-03 08:48
  • 更新:2019-12-03 08:48
  • 阅读:1654

【报Bug】nvue的text在代码格式化后换行导致在ios下文本跟着换行

分类:uni-app

详细问题描述

先看图片:

在自定义图标组件的时候,按惯例代码格式化然后保存。之前好好的图标在ios下突然出现了换行。这个问题我排查了几天才找出问题所在。当text组件的文本如果出现换行,在ios下会跟着换行,其他的安卓和h5都是好的。下面是格式化后出现问题的代码:

<template>  
    <text  
        class="ic"  
        :class="[isActive ? 'active' : '']"  
        :style="mergeStyle"  
        @click="itemClicked(name)"  
        @touchstart="touchStart"  
        @touchmove.stop.prevent="touchMove"  
        @touchend.stop="touchEnd"  
    >  
        {{ iconText }}  
    </text>  
</template>

只要将代码中的文本换行去掉就没问题:

<template>  
    <text  
        class="ic"  
        :class="[isActive ? 'active' : '']"  
        :style="mergeStyle"  
        @click="itemClicked(name)"  
        @touchstart="touchStart"  
        @touchmove.stop.prevent="touchMove"  
        @touchend.stop="touchEnd"  
    >{{ iconText }}</text>  
</template>

IDE运行环境说明

HBuilderX 2.4.4.20191129-alpha

[mac版本号]
10.15.1

[iOS版本号]
在ios6实体机 、ios 6 plus模拟器 上测试都有问题

2019-12-03 08:48 负责人:无 分享
已邀请:

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