这是我调用 Swal 的代码:
window.swal({
title: "Checking...",
text: "Please wait",
imageUrl: "{{ asset('media/photos/loaderspin.gif') }}",
showConfirmButton: false,
allowOutsideClick: false
});
$.ajax({
type: 'POST',
url: '/' + target,
data: {
data: true
},
success: function(response) {
window.swal({
type: 'info',
width: 900,
padding: '3em',
html: response,
showCloseButton: true,
focusConfirm: false,
});
},
error: function(response) {
}
});
基本上,我正在发出一个return view('index', compact('data'));在控制器中执行 a 的 ajax 请求。
我试图在 Swal<script src="my-file.js"></script>内部加载的 html 有一个内部,但它在Swal被触发时不会被加载,所以当我点击内部时不会触发任何事件。
我试过查看文档,但找不到任何内容。我将如何让 swal 加载该文件?
叮当猫咪