gpt4 book ai didi

xml - Odoo Qweb t 值字符串中的新行

转载 作者:行者123 更新时间:2023-12-01 00:18:08 25 4
gpt4 key购买 nike

我试图实现在字符串结果中有一个新行(回车),但到目前为止,我没有得到这个工作。

这个例子只是忽略了'\n'。

<t t-set="foo" t-value="foo_A+'\n'+foo_B"/>

最佳答案

  • \n 正在工作
  • 将 CSS "white-space: pre-wrap"添加到包含此字符串值的元素
  • 关于xml - Odoo Qweb t 值字符串中的新行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50852578/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com