Skip to content

Form Component with model props throws error  #519

Open
@shishiyong

Description

@shishiyong

vue : 3.0.0
element-plus:1.0.2

code:

function renderFrom(h) {

const { formConfCopy } = this;
return (
    <el-row gutter={formConfCopy.gutter}>
      <el-form
        size={formConfCopy.size}
        label-position={formConfCopy.labelPosition}
        disabled={formConfCopy.disabled}
        label-width={`${formConfCopy.labelWidth}px`}
        ref={formConfCopy.formRef}
        props={{ model: this[formConfCopy.formModel] }}
        rules={this[formConfCopy.formRules]}
      >
        {renderFormItem.call(this, h, formConfCopy.fields)}
        {formConfCopy.formBtns && formBtns.call(this, h)}
      </el-form>
    </el-row>
);
}

props={{ model: this[formConfCopy.formModel] }} It doesn't work

just warning
[Element Warn][Form]model is required for validate to work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions