gpt4 book ai didi

javascript - 如何在花括号内的表达式周围放置强标签?

转载 作者:行者123 更新时间:2023-12-02 22:13:39 26 4
gpt4 key购买 nike

<DialogTitle>
<p>
Are you sure you want to delete{" "}{project ? project.title : "this project"}?
</p>
</DialogTitle>

我一直在尝试这个解决方案,但没有结果:

`<strong>` `{project? project.title: "this project"}` `</strong>` but it didn't work.

最佳答案

试试这个:

<DialogTitle>
<p>
{"Are you sure you want to delete "}<strong>{project ? project.title : "this project"}</strong>
</p>
<DialogTitle>
<小时/>

Here's a Working Sample Demo for your ref.

关于javascript - 如何在花括号内的表达式周围放置强标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59469711/

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