How to use the @form-create/utils.isFunction 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 / iview / src / core / form.js View on Github external
'click': () => {
                        const fApi = this.$handle.fCreateApi;
                        isFunction(submitBtn.click)
                            ? submitBtn.click(fApi)
                            : fApi.submit();
                    }
                }
github xaboy / form-create / packages / iview / src / _form.js View on Github external
'click': () => {
                        const fApi = this.fc.fCreateApi;
                        isFunction(submitBtn.click)
                            ? submitBtn.click(fApi)
                            : fApi.submit();
                    }
                }
github xaboy / form-create / packages / core / src / core / render.js View on Github external
renderTemplate(parser) {
        const {id, rule, key} = parser;
        if (Vue.compile === undefined) {
            console.error('使用的 Vue 版本不支持 compile' + errMsg());
            return [];
        }

        if (!this.renderList[id]) {
            let vm = rule.vm;
            if (isUndef(rule.vm))
                vm = new Vue;
            else if (isFunction(rule.vm))
                vm = rule.vm(this.$handle.getInjectData(rule));

            this.renderList[id] = {
                vm,
                template: Vue.compile(rule.template)
            };

        }

        const {vm, template} = this.renderList[id];

        setTemplateProps(vm, parser, this.$handle.fCreateApi);

        vm.$off('input');
        vm.$on('input', (value) => {
            this.onInput(parser, value);
github xaboy / form-create / packages / element-ui / src / fApi.js View on Github external
this.validate(() => {
                let formData = this.formData();
                if (isFunction(successFn))
                    successFn(formData, this);
                else
                    fc.options.onSubmit && fc.options.onSubmit(formData);
            }, () => failFn && failFn());
        },
github xaboy / form-create / packages / core / src2 / factory / render.js View on Github external
sync(event) {
        if (isFunction(event))
            this.$tickEvent.push(event);
        this.clearCache();
        this.vm._sync();
    }
github xaboy / form-create / packages / core / src / factory / vNode.js View on Github external
function parseVData(data) {
    if (isString(data))
        data = {domProps: {innerHTML: data}};
    else if (data && isFunction(data.get))
        data = data.get();

    return data;
}
github xaboy / form-create / packages / core / src / core / handle.js View on Github external
export function getRule(rule) {
    if (isFunction(rule.getRule))
        return rule.getRule();
    else
        return rule;
}
github xaboy / form-create / packages / core / src / core / handle.js View on Github external
Object.keys(on).forEach(k => {
                if (isFunction(on[k]))
                    on[k] = this.inject(rule, on[k])
            });
        return on;