在生产中我可以与甜警报工作,但是当我把现场的时候,我得到这个错误: Uncaught ReferenceError: swal is not defined 我跑npm install sweetalert,并添加以下两行的index.html的负责人: < script src="node_modules/sweetalert/dist/sweetalert.min.js"> < link re
我不知道在哪里以及如何把删除行: Clanovi.remove(this._id);
甜警报 ,我想是这样的: 'click .btn-danger'()
{
swal({
title: "Are you sure?",
text: "You will not be able to recover this imaginary file!",
因此,我使用的是SweetAlert,并且提供了向用户请求添加额外短消息的机会。我遇到的问题是,即使用户点击了“取消”按钮,它仍然会在函数()内发出帖子请求(从下面的例子中删除)。 swal({
title: "Request!",
text: "Add a message to your request if you wish...",
type: "input",