How to use the @form-create/utils.uniqueId function in @form-create/utils

To help you get started, we’ve selected a few @form-create/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xaboy / form-create / packages / core / src / factory / parser.js View on Github external
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();
    }
github xaboy / form-create / packages / core / src2 / formCreate.js View on Github external
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);
        }
github xaboy / form-create / packages / iview / src / components / upload / index.jsx View on Github external
data() {
        return {
            uploadList: [],
            unique: uniqueId()
        }
    },
    created() {
github xaboy / form-create / packages / iview / src / components / frame / index.jsx View on Github external
data() {
        return {
            modalVm: null,
            fileList: toArray(this.value),
            unique: uniqueId()
        }
    },
    watch: {
github xaboy / form-create / packages / core / src / core / handle.js View on Github external
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);
    }
github xaboy / form-create / packages / iview / src / components / checkbox / index.jsx View on Github external
data() {
        return {
            trueValue: [],
            unique: uniqueId()
        }
    },
    methods: {
github xaboy / form-create / packages / element-ui / src / components / upload / index.jsx View on Github external
data() {
        return {
            uploadList: [],
            unique: uniqueId()
        }
    },
    created() {
github xaboy / form-create / packages / core / src2 / factory / render.js View on Github external
}

            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];
        }

    }
github xaboy / form-create / packages / element-ui / src / components / checkbox / index.jsx View on Github external
data() {
        return {
            trueValue: [],
            unique: uniqueId()
        }
    },
    methods: {