在线编辑保存时增加询问

This commit is contained in:
晚风拂柳颜 2023-06-09 16:26:04 +08:00
parent 1f36630a34
commit 00c56759e5
3 changed files with 52 additions and 35 deletions

View File

@ -1 +1 @@
3.9.43beta6
3.9.43beta7

View File

@ -213,6 +213,11 @@ function f(){
});
//监听提交
form.on('submit(saveBtn)', function (data) {
layer.confirm('确认保存?', {
title: "操作提示",
icon: 0,
btn: ['确定']
} ,function(index){
let txt = editor.getValue();
// console.log(txt);
let postData = {
@ -232,6 +237,9 @@ function f(){
layer.msg(ret.msg);
}
});
layer.close(index);
});
return false;
});

View File

@ -123,6 +123,11 @@
});
//监听提交
form.on('submit(saveBtn)', function (data) {
layer.confirm('确认保存?', {
title: "操作提示",
icon: 0,
btn: ['确定']
} ,function(index){
let txt = $('#script_code').val();
// console.log(txt);
let postData = {
@ -142,6 +147,10 @@
layer.msg(ret.msg);
}
});
layer.close(index);
});
return false;
});