syczuan
syczuan
  • 发布:2023-05-25 19:43
  • 更新:2023-05-25 23:51
  • 阅读:370

【报Bug】plus.nativeUI.toast自定义ToastStyles,type为richtext时ios无法显示图片

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Windows 11 专业版 22H2

HBuilderX类型: 正式

HBuilderX版本号: 3.7.9

手机系统: iOS

手机系统版本号: iOS 16

手机厂商: 苹果

手机机型: iphone12

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:


plus.nativeUI.toast(  
      `<img style="padding:20px" src="/static/image/status-icon/success.png" width="32px" height="32px"></img><font color="#0075ec">登录成功</font>`,  
      {  
        align: "center",  
        verticalAlign: "center",  
        background: "rgba(0,0,0,0.8)",  
        icon: "/static/image/status-icon/success.png",  
        iconWidth: "32px",  
        iconHeight: "32px",  
        style: "block",  
        duration: "short",  
        type: "richtext",  
      }  
    );

预期结果:

ios和安卓下使用plus.nativeUI.toast自定义ToastStyles时,type为"richtext"时图片能正常显示

实际结果:

ios下无法显示图片,安卓正常

bug描述:

plus.nativeUI.toast自定义ToastStyles,type为richtext时,设置icon属性或者直接富文本中写img标签,引入static中的图片, ios上无法显示,安卓下icon属性和img标签都能正常显示

2023-05-25 19:43 负责人:无 分享
已邀请:
FullStack

FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866

plus.nativeUI.toast(  
                `<img style="padding:20px" src="../../static/logo.png" width="32px" height="32px"></img><font color="#0075ec">登录成功</font>`, {  
                    align: "center",  
                    verticalAlign: "center",  
                    background: "rgba(0,0,0,0.8)",  
                    icon: "../../static/logo.png",  
                    iconWidth: "32px",  
                    iconHeight: "32px",  
                    style: "block",  
                    duration: "short",  
                    type: "richtext",  
                }  
            );

hbx 3.8.2  能正常显示

注意nvue 图片路径为:../../static/logo.png

要回复问题请先登录注册