How to use the @form-create/utils.isString 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 / core / handle.js View on Github external
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 {
github xaboy / form-create / packages / core / src2 / formCreate.js View on Github external
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();
github xaboy / form-create / packages / element-ui / src / factory / render.js View on Github external
function isAttr(name, value) {
    return (!upperCaseReg.test(name) && (isString(value) || isNumber(value)))
}
github xaboy / form-create / packages / element-ui / src / core / form.js View on Github external
export function isAttr(name, value) {
    return (!upperCaseReg.test(name) && (isString(value) || isType(value, 'Number')))
}
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 / src2 / factory / render.js View on Github external
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];
github xaboy / form-create / packages / core / src / core / render.js View on Github external
this.orgChildren[parser.id].forEach(child => {
            if (children.indexOf(child) === -1 && !isString(child) && child.__fc__) {
                this.$handle.removeField(child.__fc__);
            }
        });
github xaboy / form-create / packages / core / src / factory / maker.js View on Github external
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;
    }
}