当前位置:网站首页>Applet newline character \ nfailure problem resolution - Daily pit stepping
Applet newline character \ nfailure problem resolution - Daily pit stepping
2022-04-23 07:36:00 【flym_】
stay html Can be used directly in br Line break , But the applet wxml Use in br> Invalid , Can be replaced by \n
Be careful : Be sure to pay attention to ,text in \n To take effect ,view Write directly inside \n no way
// Example
<text> At least 5 A word \n Please say more about your feelings </text>
problem :
The data returned by the server contains \n Line break escape , Place data in text In the label , Found escape character invalid
reason :
The data sent by the server is encoded data , Click... In the debugging tool network see Response, Server returned \n In fact, after coding, it becomes ’\\n’ ,markdown The same problem has arisen , Writing \\n when , The browser also displays \n, You can try and see .
resolvent :
The data obtained from the database data.replace(/\n/g,’\n’) take \\n Replace with \n,text Tags can identify line breaks .
版权声明
本文为[flym_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230617476373.html
边栏推荐
猜你喜欢

免费开源智能充电桩物联网SAAS云平台

USO technology was invited to share the technical framework and challenges of AI synthetic virtual characters at lvson2020 conference

菜菜的刷题日记 | 蓝桥杯 — 十六进制转八进制(纯手撕版)附进制转换笔记

Machine vision series (02) -- tensorflow2 3 + win10 + GPU installation

Int8 quantification and inference of onnx model using TRT

可视化常见问题解决方案(七)画图刻度设置解决方案

可视化之路(十二)Collection类详解

Take you to travel in space, and American photography technology provides comprehensive technical support for aerospace creative applet

Source Insight 4.0常见问题

江宁医院DMR系统解决方案
随机推荐
自组网灵活补盲|北峰油气田勘测解决方案
学习资料
可视化常见问题解决方案(八)数学公式
Transformer的pytorch实现
地铁无线对讲系统
Int8 quantification and inference of onnx model using TRT
Pycharm
推导式与正则式
How to improve the service efficiency of the hotel without blind spots and long endurance | public and Private Integrated walkie talkie?
PyTorch 14. Module class
null和undefined的区别
Lead the industry trend with intelligent production! American camera intelligent video production platform unveiled at 2021 world Ultra HD Video Industry Development Conference
Metro wireless intercom system
浅谈BFC(块格式化上下文)
vim+ctags+cscpope开发环境搭建指南
The difference between null and undefined
技术小白的第一篇(表达自己)
Machine vision series (02) -- tensorflow2 3 + win10 + GPU installation
可视化常见绘图(四)柱状图
记录阿里云服务器挖矿程序处理