需求中需要有一个弹窗提醒用户哪些单号已经审核过了,后端返回的数据是数组,如下图所示:
这需要把内容用for循环展示到messagebox里,
开干:
this.$msgbox({
title: "提示",
message: (
<div>
单号为
{
data.map((item) => (
<span key={item}>【{item}】</span>
))
}
的数据已经审核过!
</div>
),
confirmButtonText: "确定",
type: "warning",
关闭前的函数
beforeClose: (action, instance, done) => {
this.$refs.tableData.clearSelection();
done();
},
});
效果如图所示:
完成,欢迎各位大佬指教!