小编Tha*_*yen的帖子

如何用甜蜜的警报打破界限

我想在 sweet Alert 2 的 swal.text 处断行一些文本。我尝试了 br, \r \n , join(\n\n) 但不适合我!请帮助我解决我的问题。感谢您的帮助:D。这是我的代码

<swal #extractDataDoneSwal
      title="Exported"
      text="Your files have been exported"
      icon="success">
</swal>

if (data == "1") {
  this.exportFile = this.insurerNo.toString() + "_Med.SAT";
  this.loading = false;
  const lines = ['Your files have been exported',this.exportFile];
  this.extractDataDoneSwal.text = lines.join('\n\n');
  this.extractDataDoneSwal.fire();
}
Run Code Online (Sandbox Code Playgroud)

typescript angular sweetalert2

1
推荐指数
1
解决办法
4525
查看次数

标签 统计

angular ×1

sweetalert2 ×1

typescript ×1