change router struct
This commit is contained in:
@@ -97,11 +97,9 @@ templ profileCss() {
|
||||
|
||||
templ profileJs(ctx context.Context) {
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'iconPicker', 'xmSelect'], function () {
|
||||
layui.use(['form', 'jquery'], function () {
|
||||
let form = layui.form;
|
||||
let $ = layui.jquery;
|
||||
let iconPicker = layui.iconPicker;
|
||||
|
||||
|
||||
// 表单提交
|
||||
form.on('submit(save)', function (data) {
|
||||
|
||||
@@ -262,7 +262,7 @@ func profileJs(ctx context.Context) templ.Component {
|
||||
templ_7745c5c3_Var11 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<script>\n layui.use(['form', 'jquery', 'iconPicker', 'xmSelect'], function () {\n let form = layui.form;\n let $ = layui.jquery;\n let iconPicker = layui.iconPicker;\n\n\n // 表单提交\n form.on('submit(save)', function (data) {\n $.ajax({\n url: '/system/user/save',\n type: 'post',\n dataType: 'json',\n data: data.field,\n success: function (result) {\n if (result.success) {\n layer.msg(result.msg, { icon: 1, time: 1000 });\n window.location.reload();\n } else {\n layer.msg(result.msg, { icon: 2 })\n }\n }\n });\n\n return false;\n });\n });\n </script>")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<script>\n layui.use(['form', 'jquery'], function () {\n let form = layui.form;\n let $ = layui.jquery;\n\n // 表单提交\n form.on('submit(save)', function (data) {\n $.ajax({\n url: '/system/user/save',\n type: 'post',\n dataType: 'json',\n data: data.field,\n success: function (result) {\n if (result.success) {\n layer.msg(result.msg, { icon: 1, time: 1000 });\n window.location.reload();\n } else {\n layer.msg(result.msg, { icon: 2 })\n }\n }\n });\n\n return false;\n });\n });\n </script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user