Solution
first way
- Put the submit button
</el-form>
outside the label. code show as below:
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
...省略...
</el-form>
<BaseButton :name="提交" @callback="submitForm"></ BaseButton>
BaseButton is a button component encapsulated by myself
second way
- Add
type="button"
attributes. Prevent</el-form>
clicks to jump to the page.
<button type="button"></button>