From 357d7fac6b03088443dd8d270b6d7c588f02e991 Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Mon, 5 Feb 2024 08:12:11 +0800 Subject: [PATCH] 'commit' --- .../view/tb/form/ayq/modules/formDesigner.js | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/WebRoot/view/tb/form/ayq/modules/formDesigner.js b/WebRoot/view/tb/form/ayq/modules/formDesigner.js index 734f3b74..5276c333 100644 --- a/WebRoot/view/tb/form/ayq/modules/formDesigner.js +++ b/WebRoot/view/tb/form/ayq/modules/formDesigner.js @@ -4407,6 +4407,14 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele }); form.on('radio', function (data) { + + var thisName = $(this).attr("name"); + options.data.forEach(function (item, index) { + if (item.id === thisName) { + options.selectItem = item; + } + }); + var _json = options.selectItem; switch (_json.tag) { case 'radio': @@ -4421,7 +4429,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele } _json.options[i].checked = false; } - that.components[_json.tag].update(_json,that); + that.components[_json.tag].update(_json, that); break; case 'select': case 'carousel': @@ -4434,7 +4442,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele } _json.options[i].checked = false; } - that.components[_json.tag].update(_json,that); + that.components[_json.tag].update(_json, that); break; default: break; @@ -4516,7 +4524,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele Class.prototype.render = function () { var that = this , options = that.config; - + options.data.forEach(function (item, index) { if (index === 0) { options.selectItem = item; @@ -5177,11 +5185,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele //显示当前的属性 that.components[tag].property(options.selectItem, that); - that.bindPropertyEvent(options.selectItem); -<<<<<<< HEAD -======= - ->>>>>>> 45a8873c05d0736b15112606aae1da04aa320be5 + that.bindPropertyEvent(); //移除 #formDesignerForm .layui-form-item 下所有的 active $('#formDesignerForm .layui-form-item').removeClass('active'); //给当前元素增加class