Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rules.map((_rule) => {
if (child && isString(_rule)) return;
if (!_rule.type)
return console.error('未定义生成规则的 type 字段' + errMsg());
let parser;
if (_rule.__fc__) {
parser = _rule.__fc__;
if (parser.vm !== this.vm && !parser.deleted)
return console.error(`${_rule.type}规则正在其他的 中使用` + errMsg());
parser.update(this);
let rule = parser.rule;
this.parseOn(rule);
this.parseProps(rule);
} else {
rules.map((_rule, index) => {
if (child && isString(_rule)) return;
if (!_rule.type)
return console.error('未定义生成规则的 type 字段' + errMsg());
let rule = getRule(_rule), handler;
if (_rule.__handler__) {
handler = _rule.__handler__;
if (handler.vm !== this.vm && !handler.deleted)
return console.error(`第${index + 1}条规则正在其他的 中使用` + errMsg());
handler.vm = this.vm;
handler.render.vm = this.vm;
handler.render.vNode.setVm(this.vm);
handler.refresh();
function isAttr(name, value) {
return (!upperCaseReg.test(name) && (isString(value) || isNumber(value)))
}
export function isAttr(name, value) {
return (!upperCaseReg.test(name) && (isString(value) || isType(value, 'Number')))
}
function parseVData(data) {
if (isString(data))
data = {domProps: {innerHTML: data}};
else if (data && isFunction(data.get))
data = data.get();
return data;
}
vn = children.map((child) => {
if (isString(child))
return [child];
if (child.__handler__) {
return child.__handler__.render.cacheParse(form, true);
}
$de(() => vm._fComponent.reload());
});
this.handler.orgChildren = [...children];
this.orgChildren[parser.id].forEach(child => {
if (children.indexOf(child) === -1 && !isString(child) && child.__fc__) {
this.$handle.removeField(child.__fc__);
}
});
function parse(rule, toMaker = false) {
if (isString(rule)) rule = parseJson(rule);
if (rule instanceof Creator) return toMaker ? rule : rule.getRule();
if (isPlainObject(rule)) {
const maker = ruleToMaker(rule);
return toMaker ? maker : maker.getRule();
} else if (!Array.isArray(rule)) return rule;
else {
const rules = rule.map(r => parse(r, toMaker));
Object.defineProperties(rules, {
find: enumerable(findField),
model: enumerable(model)
});
return rules;
}
}