|
|
|
@ -648,6 +648,9 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
var _readonly = json.readonly ? 'readonly=""' : '';
|
|
|
|
|
var $block = $('#' + json.id + ' .layui-input-block');
|
|
|
|
|
var $label = $('#' + json.id + ' .layui-form-label');
|
|
|
|
|
if (json.required) {
|
|
|
|
|
$label.append('<span style="color:red;">*</span>');
|
|
|
|
|
}
|
|
|
|
|
$block.empty();
|
|
|
|
|
$label.empty();
|
|
|
|
|
if (json.hideLabel) {
|
|
|
|
@ -884,6 +887,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
selected = false;
|
|
|
|
|
}
|
|
|
|
|
var _disabled = json.disabled ? 'disabled=""' : '';
|
|
|
|
|
var _required = json.required ? 'required' : '';
|
|
|
|
|
var _hideLabel = json.hideLabel ? 'display: none;' : '';
|
|
|
|
|
var _html = '<div id="{0}" class="layui-form-item {2}" data-id="{0}" data-tag="{1}" data-index="{3}">'.format(json.id, json.tag, selected ? 'active' : '', json.index);
|
|
|
|
|
_html += '<label class="layui-form-label" style="width: {1}px;{2}">{0}:</label>'.format(json.label, json.labelWidth, _hideLabel);
|
|
|
|
@ -910,11 +914,15 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
* */
|
|
|
|
|
update: function (json, that) {
|
|
|
|
|
var _disabled = json.disabled ? 'disabled=""' : '';
|
|
|
|
|
var _required = json.required ? 'required' : '';
|
|
|
|
|
var $block = $('#' + json.id + ' .layui-input-block');
|
|
|
|
|
var $label = $('#' + json.id + ' .layui-form-label');
|
|
|
|
|
$block.empty();
|
|
|
|
|
$label.empty();
|
|
|
|
|
$label.css("width", json.labelWidth);
|
|
|
|
|
if (json.required) {
|
|
|
|
|
$label.append('<span style="color:red;">*</span>');
|
|
|
|
|
}
|
|
|
|
|
$label.append(json.label + ":");
|
|
|
|
|
if (json.hideLabel) {
|
|
|
|
|
$label.css("display", "none");
|
|
|
|
@ -1566,9 +1574,16 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
* @param {object} that 实例对象
|
|
|
|
|
* */
|
|
|
|
|
update: function (json, that) {
|
|
|
|
|
console.log(json);
|
|
|
|
|
var _required = json.required ? 'required' : '';
|
|
|
|
|
var $block = $('#' + json.id + ' .layui-input-block');
|
|
|
|
|
var $label = $('#' + json.id + ' .layui-form-label');
|
|
|
|
|
|
|
|
|
|
$label.empty();
|
|
|
|
|
|
|
|
|
|
if (json.required) {
|
|
|
|
|
$label.append('<span style="color:red;">*</span>');
|
|
|
|
|
}
|
|
|
|
|
if (json.hideLabel) {
|
|
|
|
|
$label.css("display", "none");
|
|
|
|
|
$block.css("margin-left", "0px");
|
|
|
|
@ -1577,6 +1592,7 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
$block.css("margin-left", json.labelWidth + 30);
|
|
|
|
|
}
|
|
|
|
|
$label.append(json.label + ":");
|
|
|
|
|
|
|
|
|
|
rate.render({
|
|
|
|
|
elem: '#' + json.tag + json.id,
|
|
|
|
|
value: json.defaultValue,
|
|
|
|
@ -1962,6 +1978,13 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
* @param {object} that 实例对象
|
|
|
|
|
* */
|
|
|
|
|
update: function (json, that) {
|
|
|
|
|
var _required = json.required ? 'required' : '';
|
|
|
|
|
var $label = $('#' + json.id + ' .layui-form-label');
|
|
|
|
|
$label.empty();
|
|
|
|
|
if (json.required) {
|
|
|
|
|
$label.append('<span style="color:red;">*</span>');
|
|
|
|
|
}
|
|
|
|
|
$label.append(json.label + ":");
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
@ -2080,7 +2103,13 @@ layui.config({ base: './ayq/modules/' }).define(["layer", 'flow', "laytpl", "ele
|
|
|
|
|
* @param {object} that 实例对象
|
|
|
|
|
* */
|
|
|
|
|
update: function (json, that) {
|
|
|
|
|
|
|
|
|
|
var _required = json.required ? 'required' : '';
|
|
|
|
|
var $label = $('#' + json.id + ' .layui-form-label');
|
|
|
|
|
$label.empty();
|
|
|
|
|
if (json.required) {
|
|
|
|
|
$label.append('<span style="color:red;">*</span>');
|
|
|
|
|
}
|
|
|
|
|
$label.append(json.label + ":");
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 根据components组件对象获取组件属性
|
|
|
|
|