我们可以修改有角js甜蜜警报添加自定义按钮和html吗?基于下面的示例html。是否可以将html代码集成到swal alert ?.香港专业教育学院尝试了不同的东西来整合它,但似乎没有奏效。任何想法都将对您有所帮助。
SweetAlert.swal({
title: "Are you sure?",
text: "Your will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",confirmButtonText: "Yes, delete it!",
cancelButtonText: "No, cancel plx!",
closeOnConfirm: false,
closeOnCancel: false },
function(isConfirm){
if (isConfirm) {
SweetAlert.swal("Deleted!", "Your imaginary file has been deleted.", "success");
} else {
SweetAlert.swal("Cancelled", "Your imaginary file is safe :)", "error");
}
});
#html
<div>
<button class="btn btn-medium font-bold"
socialshare
socialshare-provider="facebook"
socialshare-type="share"
socialshare-via="145634995501895"
socialshare-media="http://720kb.net/assets/img/720kb-fb.png"
socialshare-quote="720kb Angular-Social-Share"
socialshare-hashtags="#720kb"
socialshare-title="720KB"
socialshare-mobileiframe = "true"
socialshare-caption="720kb is enough"
socialshare-url="http://720kb.net"
socialshare-popup-height="300"
socialshare-popup-width="400"
socialshare-trigger="click">
<i class="fa fa-facebook"></i> Share on Facebook (share dialog)
</button>
</div>
<div class="separator30"></div>
<div>
<button class="btn btn-medium font-bold"
socialshare
socialshare-provider="facebook"
socialshare-type="send"
socialshare-via="145634995501895"
socialshare-url="http://720kb.net"
socialshare-redirect-uri="http://localhost"
socialshare-popup-height="300"
socialshare-popup-width="400"
socialshare-trigger="click">
<i class="fa fa-facebook"></i> Share on Facebook (send dialog)
</button>