main
kgdxpr 1 year ago
parent 3b9fc68945
commit bdadd41676

@ -4145,6 +4145,8 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
}
}
$('#columnProperty').append(_html);
console.log(json);
this.bindPropertyEvent(json);
}
@ -4405,8 +4407,8 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
}
});
form.on('radio', function (data) {
var _json = options.selectItem;
form.on('radio', function (data) {
var _json = options.selectItem;
switch (_json.tag) {
case 'radio':
var _index = parseInt($("#" + _json.id + " .layui-input-block div.layui-form-radio").index(data.othis[0]));
@ -4510,9 +4512,9 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
}
//渲染视图
Class.prototype.render = function () {
Class.prototype.render = function () {
var that = this
, options = that.config;
, options = that.config;
if (options.viewOrDesign) {
var that = this
, options = that.config;
@ -5092,7 +5094,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
if (options.selectItem.id === item.id) {
that.components[item.tag].render(item, true, elem, that);
//显示当前的属性
that.components[item.tag].property(item, that);
that.components[item.tag].property(item, that);
that.bindPropertyEvent(item);
} else {
that.components[item.tag].render(item, false, elem, that);

@ -29,6 +29,7 @@
layui.config(
{ base: './ayq/modules/' }).use(['layer', 'formDesigner'], function () {
var $ = layui.jquery;
var formDesigner = layui.formDesigner;
var data = [];
@ -43,6 +44,10 @@
dataType: "json",
success: function (res) {
data = JSON.parse(res.form_json);
var render = formDesigner.render({
data: data,
elem: '#formdesigner'
});
}
});
} else {
@ -50,17 +55,15 @@
localStorage.removeItem('form_json');
}
//阻止body的drag冒泡问题
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
var formDesigner = layui.formDesigner;
var render = formDesigner.render({
data: data,
elem: '#formdesigner'
});
});
});
function GetQueryString(name, istop) {
@ -72,10 +75,6 @@
return null;
}
document.onkeydown = function (e) {
console.log(e);
}
</script>
</body>

Loading…
Cancel
Save