Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(handle, rule, id) {
this.rule = rule;
this.vData = new VData;
this.vNode = new VNode();
this.id = id;
this.watch = [];
this.originType = rule.type;
this.type = toString(rule.type).toLocaleLowerCase();
this.isDef = true;
this.el = undefined;
if (!rule.field) {
this.field = '_def_' + uniqueId();
this.isDef = false;
} else {
this.field = rule.field;
}
this.name = rule.name;
this.unique = 'fc_' + id;
this.key = 'key_' + id;
this.refName = '__' + this.field + this.id;
this.formItemRefName = 'fi' + this.refName;
this.update(handle);
this.init();
}
constructor(rules, options = {}) {
this.fRender = undefined;
this.fCreateApi = undefined;
this.$parent = undefined;
this.id = uniqueId();
this.validate = {};
this.__init(rules, options);
initStyle();
this.$tick = debounce((fn) => fn(), 150);
}
data() {
return {
uploadList: [],
unique: uniqueId()
}
},
created() {
data() {
return {
modalVm: null,
fileList: toArray(this.value),
unique: uniqueId()
}
},
watch: {
createParser(rule) {
const id = this.id + '' + uniqueId(), parsers = this.fc.parsers, type = toString(rule.type).toLocaleLowerCase();
const Parser = (parsers[type]) ? parsers[type] : BaseParser;
return new Parser(this, rule, id);
}
data() {
return {
trueValue: [],
unique: uniqueId()
}
},
methods: {
data() {
return {
uploadList: [],
unique: uniqueId()
}
},
created() {
}
if (isUndef(rule.vm)) rule.vm = new Vue;
let vn = Vue.compile(rule.template, {}).render.call(rule.vm);
if (vn.data === undefined) vn.data = {};
extend(vn.data, rule);
vn.key = key;
return [vn];
} else if (!noValue) {
return form.makeComponent(this.handler.render);
} else {
rule.ref = refName;
if (isUndef(rule.key))
rule.key = 'def' + uniqueId();
let vn = this.vNode.make(type, {...rule}, this.childrenParse(form));
vn.key = key;
return [vn];
}
}
data() {
return {
trueValue: [],
unique: uniqueId()
}
},
methods: {