8***@qq.com
8***@qq.com
  • 发布:2024-02-28 15:51
  • 更新:2024-02-28 15:58
  • 阅读:221

【报Bug】在uniapp代码编译成微信小程序代码过程中,text标签内的   消失不见,导致空格无法正常渲染

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: windows 10 19045.4046

HBuilderX类型: 正式

HBuilderX版本号: 4.01

第三方开发者工具版本号: 4.01.2024020211-alpha

基础库版本号: 3.3.4

项目创建方式: HBuilderX

示例代码:
<view class="paragraph-topic">  
          <text>{{ paragraph.topic.serialNum }}.</text>  
          <text space="ensp" :decode="true">&nbsp; </text>  
          <text style="text-decoration: underline" space="ensp" :decode="true">&nbsp;&nbsp;&nbsp;</text>  
</view>

操作步骤:

将以下的uniapp代码编译成微信小程序代码

<view class="paragraph-topic">  
          <text>{{ paragraph.topic.serialNum }}.</text>  
          <text space="ensp" :decode="true">&nbsp; </text>  
          <text style="text-decoration: underline" space="ensp" :decode="true">&nbsp;&nbsp;&nbsp;</text>  
</view>

预期结果:

编译后的代码:

<view class="paragraph-topic data-v-847711d4"><text class="data-v-847711d4">{{paragraph.topic.serialNum+"."}}</text><text space="ensp" decode="{{true}}" class="data-v-847711d4">&nbsp; </text><text style="text-decoration:underline;" space="ensp" decode="{{true}}" class="data-v-847711d4">&nbsp; &nbsp; &nbsp; </text></view>

实际结果:
<view class="paragraph-topic data-v-847711d4"><text class="data-v-847711d4">{{paragraph.topic.serialNum+"."}}</text><text space="ensp" decode="{{true}}" class="data-v-847711d4"></text><text style="text-decoration:underline;" space="ensp" decode="{{true}}" class="data-v-847711d4"></text></view>

bug描述:

在uniapp代码编译成微信小程序代码过程中,text标签内的   消失不见,导致空格无法正常渲染

2024-02-28 15:51 负责人:无 分享
已邀请:
Diligent_UI

Diligent_UI - 【插件开发】【专治疑难杂症】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=193663(微信搜索飘逸科技UI小程序直接体验)】【骗子请绕道】问题咨询请加QQ群:120594820,代表作灵感实用工具小程序

可能整个 是专属,小程序不适用吧,使用css隔开也行啊

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

    小程序是支持 &nbsp; 的,css隔开不行,因为需要空格的文本下划线

    2024-02-29 09:00

要回复问题请先登录注册