V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Dive into HTML5
http://diveintohtml5.org/
jry
V2EX  ›  HTML

element-ui 中 textarea 换行和空格回显最佳方案?

  •  
  •   jry · 187 天前 · 499 次点击
    这是一个创建于 187 天前的主题,其中的信息可能已经有所发展或是发生改变。

    element-ui 中 textarea 换行和空格如何保存数据库 oracle 中,试了将\n 装换成\n 保存,查询出来后 textarea 回显无法换行,显示的是\n 明文。

    1 条回复    2023-10-24 11:20:25 +08:00
    huizai2022
        1
    huizai2022  
       187 天前
    单纯在 html 中回显给外层 div 设置 white-space:pre-wrap;
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5454 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 08:00 · PVG 16:00 · LAX 01:00 · JFK 04:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.