main
黄海 1 year ago
parent 0f857c4542
commit 32d6fffc84

@ -4148,6 +4148,7 @@ layui.config({base: './ayq/modules/'}).define(["layer", 'flow', "laytpl", "eleme
$('#columnProperty').append(_html);
}
/* 给字段属性绑定事件 实现双向绑定*/
Class.prototype.bindPropertyEvent = function (_json) {
var that = this
@ -4406,7 +4407,6 @@ layui.config({base: './ayq/modules/'}).define(["layer", 'flow', "laytpl", "eleme
});
form.on('radio', function (data) {
console.log(data);
var _json = options.selectItem;
switch (_json.tag) {
case 'radio':
@ -4421,7 +4421,6 @@ layui.config({base: './ayq/modules/'}).define(["layer", 'flow', "laytpl", "eleme
}
_json.options[i].checked = false;
}
console.log(_json);
that.components[_json.tag].update(_json, that);
break;
case 'select':
@ -4440,7 +4439,7 @@ layui.config({base: './ayq/modules/'}).define(["layer", 'flow', "laytpl", "eleme
default:
break;
}
});
})
form.on('checkbox', function (data) {
var _json = options.selectItem;
@ -4515,6 +4514,15 @@ layui.config({base: './ayq/modules/'}).define(["layer", 'flow', "laytpl", "eleme
Class.prototype.render = function () {
var that = this
, options = that.config;
//增加于2024-02-02 黄海
options.data.forEach(function (item, index) {
if (index === 0) {
options.selectItem = item;
}
that.bindPropertyEvent(item);
});
if (options.viewOrDesign) {
var that = this
, options = that.config;
@ -5168,9 +5176,7 @@ layui.config({base: './ayq/modules/'}).define(["layer", 'flow', "laytpl", "eleme
//显示当前的属性
that.components[tag].property(options.selectItem, that);
alert("点击!");
that.bindPropertyEvent(options.selectItem);
//移除 #formDesignerForm .layui-form-item 下所有的 active
$('#formDesignerForm .layui-form-item').removeClass('active');

Loading…
Cancel
Save