当前位置:网站首页>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
边栏推荐
- Typora操作技巧说明(一).md
- Us photo cloud editing helps BiliBili upgrade its experience
- ES6之箭头函数细谈
- PyTorch 12. Hook usage
- hql求一个范围内最大值
- Emergency medical communication solution | mesh wireless ad hoc network system
- Discussion on frame construction and technology selection of short video platform
- Int8 quantification and inference of onnx model using TRT
- Machine vision series (02) -- tensorflow2 3 + win10 + GPU installation
- Patrol inspection intercom communication system in power industry
猜你喜欢

可视化常见绘图(一)堆叠图

基于可视化结构的身份证号码校验系统-树莓派实现

电力行业巡检对讲通信系统

Flexible blind patch of ad hoc network | Beifeng oil and gas field survey solution

Intelligent communication solution of Hainan Phoenix Airport

vim+ctags+cscpope开发环境搭建指南

自定义classloader并实现热部署-使用loadClass

利用mysql-binlog恢复数据

Us photo cloud editing helps BiliBili upgrade its experience

The people of Beifeng have been taking action
随机推荐
vim+ctags+cscpope开发环境搭建指南
Pycharm
开发板如何ping通百度
Us photo cloud editing helps BiliBili upgrade its experience
北峰通信助力湛江市消防支队构建PDT无线通信系统
Typora操作技巧说明(一).md
Jiangning hospital DMR system solution
可视化常见绘图(一)堆叠图
小程序wx.previewMedia相关问题解决-日常踩坑
PyTorch 9. optimizer
菜菜的刷题日记 | 蓝桥杯 — 十六进制转八进制(纯手撕版)附进制转换笔记
Hanlp分词器(通过spark)
防汛救灾应急通信系统
免费开源农业物联网云平台(Version:3.0.1)
获取字符格式的当前时间
PyTorch 17. GPU concurrency
VIM使用
可视化常见问题解决方案(七)画图刻度设置解决方案
海康威视面经总结
数据分析学习(一)数据分析和Numpy基础