操作提示框——DataGrid系列
1 <script> 2 //初始化 3 $(function () { 4 alterSuccess("成功"); 5 //alterError("失败"); 6 7 8 //confirmDev("您确定要删除吗") 9 //.done((r) => { 10 // if (r) { 11 // console.log("是"); 12 // } 13 // else { 14 // console.log("否"); 15 // } 16 //}); 17 18 //alertDev("你来晚了"); 19 20 }); 21 22 //消息提示 23 function notifyDev(msg, msgType, speed) { 24 speed = speed || 3000 25 DevExpress.ui.notify({ 26 message: msg, 27 width: 400, 28 position: { at: "top center", collision: "fit", boundaryOffset: "0 20" } 29 }, msgType, speed); 30 } 31 //弹框提示 32 function alertDev(msg, title) { 33 title = title || "提示"; 34 DevExpress.ui.dialog.alert(msg, title); 35 } 36 //弹框确认 37 function confirmDev(msg, title) { 38 title = title || "提示"; 39 return DevExpress.ui.dialog.confirm(msg, title); 40 } 41 42 function alterSuccess(msg, speed) { 43 speed = speed || 3000 44 notifyDev(msg, "success", speed); 45 } 46 47 function alterError(msg, speed) { 48 speed = speed || 3000 49 notifyDev(msg, "error", speed); 50 } 51 52 </script>