Solve the problem that the element-ui form form will refresh the entire page after pressing Enter

Problem Description:

When the input input box in the form triggers the keyboard to enter, the page will be refreshed

reason:

Because the form form regards this event as an operation to submit the form

solution:

Write an attribute in el-form:

<el-form v-bind="formProps" @submit.native.prevent ref="form">
<el-input></el-input>
</el-form>

Guess you like

Origin blog.csdn.net/u014165391/article/details/125665764