yorick
yorick
  • 发布:2021-11-03 09:57
  • 更新:2021-11-03 19:30
  • 阅读:1223

#插件讨论# 【 mp-html 富文本组件【全端支持,可编辑】 - Jyf 】显示异常

分类:uni-app

附件有demo可以复现,或者使用以下html可以复现
以下为html内容(在反馈页面[https://jin-yufeng.gitee.io/mp-html/#/question/feedback]贴上可以正常显示图片等内容,但是uni-app里无法正常显示):

<style>.ssd-module-wrap{position:relative;margin:0 auto;width:750px;text-align:left;background-color:#fff}.ssd-module-wrap .ssd-module,.ssd-module-wrap .ssd-module-heading{width:750px;position:relative;overflow:hidden}.ssd-module-wrap .ssd-module{background-repeat:no-repeat;background-position:left top;background-size:100% 100%}.ssd-module-wrap .ssd-module-heading{background-repeat:no-repeat;background-position:left center;background-size:100% 100%}.ssd-module-wrap .ssd-module-heading .ssd-module-heading-layout{display:inline-block}.ssd-module-wrap .ssd-module-heading .ssd-widget-heading-ch{float:left;display:inline-block;margin:0 6px 0 15px;height:100%}.ssd-module-wrap .ssd-module-heading .ssd-widget-heading-en{float:left;display:inline-block;margin:0 15px 0 6px;height:100%}.ssd-module-wrap .ssd-widget-pic,.ssd-module-wrap .ssd-widget-text,.ssd-module-wrap .ssd-widget-line,.ssd-module-wrap .ssd-widget-rectangle,.ssd-module-wrap .ssd-widget-circle,.ssd-module-wrap .ssd-widget-triangle,.ssd-module-wrap .ssd-widget-table{position:absolute;overflow:hidden}.ssd-module-wrap .ssd-widget-rectangle{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.ssd-module-wrap .ssd-widget-table table{width:100%;height:100%}.ssd-module-wrap .ssd-widget-table td{position:relative;white-space:pre-line;word-break:break-all}.ssd-module-wrap .ssd-widget-pic img{display:block;width:100%;height:100%}.ssd-module-wrap .ssd-widget-text{line-height:1.5;word-break:break-all}.ssd-module-wrap .ssd-widget-text span{display:block;overflow:hidden;width:100%;height:100%;padding:0;margin:0;word-break:break-all;word-wrap:break-word;white-space:normal}.ssd-module-wrap .ssd-widget-link{position:absolute;left:0;top:0;width:100%;height:100%;background:transparent;z-index:100}.ssd-module-wrap .ssd-cell-text{position:absolute;top:0;left:0;right:0;width:100%;height:100%;overflow:auto}.ssd-module-wrap .M154320266248310{width:750px; background-color:transparent; background-image:url(//img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png); height:30px; text-align:left}.ssd-module-wrap .W154320266248311{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:14px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .W154320266248312{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:12px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .M15432025055991{width:750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t29713/62/691861596/108925/297e039e/5bfb66d6N7c08d25d.jpg); height:976px}.ssd-module-wrap .M15432026812621{width:750px; background-color:transparent; background-image:url(//img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png); height:30px; text-align:left}.ssd-module-wrap .W15432026812622{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:14px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .W15432026812633{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:12px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .M15432025473142{width:750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t29716/72/677661618/78545/a4950522/5bfb66d6Nb21054cb.jpg); height:994px}.ssd-module-wrap .M15432026866844{width:750px; background-color:transparent; background-image:url(//img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png); height:30px; text-align:left}.ssd-module-wrap .W15432026866845{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:14px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .W15432026866846{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:12px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .M15432025639223{width:750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t30130/226/710976874/181178/422fa931/5bfb66d6Nf97943c5.jpg); height:682px}.ssd-module-wrap .M15432025764204{width:750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t29047/44/689524108/190795/27d2034c/5bfb66d6N0c7baf07.jpg); height:981px}.ssd-module-wrap .M15432025908765{width:750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t27694/171/2183527414/188700/874820d6/5bfb66d7N6e386d20.jpg); height:990px}.ssd-module-wrap .M15432026043806{width:750px; background-color:#f2f2f2; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t29761/74/688289080/202811/14c929a3/5bfb66d7N7273c9b6.jpg); height:1025px}.ssd-module-wrap .M15432026178227{width:750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t29041/42/685054709/95735/fb63fe6/5bfb66d6N37fe93a7.jpg); height:954px}.ssd-module-wrap .M15432026953417{width:750px; background-color:transparent; background-image:url(//img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png); height:30px; text-align:left}.ssd-module-wrap .W15432026953418{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:14px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .W15432026953419{background-color:transparent; color:#ffffff; font-weight:normal; letter-spacing:0px; text-decoration:none; font-size:12px; line-height:30px; font-family:microsoft yahei; font-style:normal; height:30px}.ssd-module-wrap .M15432026288458{width:750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t27454/157/2182645104/83029/b1f02ce4/5bfb66d6N0126cfa5.jpg); height:933px}.ssd-module-wrap .M15432026425529{width:750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t26896/83/2167334617/172692/66263948/5bfb66d7N8a76f4ef.jpg); height:811px}</style><div cssurl='//sku-market-gw.jd.com/css/pc/4721701.css?t=1627560192914'></div><div id='zbViewModulesH'  value='8466'></div><input id='zbViewModulesHeight' type='hidden' value='8466'/><div skudesign="100010"></div><div class="ssd-module-wrap" >    <div class="ssd-module ssd-module-heading M154320266248310" id="detail-tag-id-601"  name="detail-tag-id-601" text="产品特色"><div class="ssd-module-heading-layout"><span class="ssd-widget-heading-ch W154320266248311" >产品特色</span><span class="ssd-widget-heading-en W154320266248312" >Selling Point</span></div></div><div class="ssd-module M15432025055991 animate-M15432025055991" data-id="M15432025055991">        </div><div class="ssd-module ssd-module-heading M15432026812621" id="detail-tag-id-600"  name="detail-tag-id-600" text="产品信息"><div class="ssd-module-heading-layout"><span class="ssd-widget-heading-ch W15432026812622" >产品信息</span><span class="ssd-widget-heading-en W15432026812633" >Product Information</span></div></div><div class="ssd-module M15432025473142 animate-M15432025473142" data-id="M15432025473142">        </div><div class="ssd-module ssd-module-heading M15432026866844" id="detail-tag-id-603"  name="detail-tag-id-603" text="产品功能"><div class="ssd-module-heading-layout"><span class="ssd-widget-heading-ch W15432026866845" >产品功能</span><span class="ssd-widget-heading-en W15432026866846" >Product Function</span></div></div><div class="ssd-module M15432025639223 animate-M15432025639223" data-id="M15432025639223">        </div><div class="ssd-module M15432025764204 animate-M15432025764204" data-id="M15432025764204">        </div><div class="ssd-module M15432025908765 animate-M15432025908765" data-id="M15432025908765">        </div><div class="ssd-module M15432026043806 animate-M15432026043806" data-id="M15432026043806">        </div><div class="ssd-module M15432026178227 animate-M15432026178227" data-id="M15432026178227">        </div><div class="ssd-module ssd-module-heading M15432026953417" id="detail-tag-id-604"  name="detail-tag-id-604" text="产品细节"><div class="ssd-module-heading-layout"><span class="ssd-widget-heading-ch W15432026953418" >产品细节</span><span class="ssd-widget-heading-en W15432026953419" >Product Details</span></div></div><div class="ssd-module M15432026288458 animate-M15432026288458" data-id="M15432026288458">        </div><div class="ssd-module M15432026425529 animate-M15432026425529" data-id="M15432026425529">        </div></div><!-- 2019-06-25 03:35:28 -->
2021-11-03 09:57 负责人:无 分享
已邀请:
Jyf

Jyf

默认不解析和匹配 style 标签,使用 style 标签需要添加 style 扩展,大致方法如下,具体参考 文档

  1. mp-html/tools/config.jsplugins 栏中添加 style
  2. mp-html 目录下执行 npm install
  3. mp-html 目录下执行 npm run build:uni-app
  • yorick (作者)

    好的 非常感谢

    2021-11-04 13:56

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