Element-UI 表单回车触发页面刷新问题
可以通过在 <el-form>
上添加@submit.native.prevent
解决
<template>
<div class="card-wrap">
<div class="card">
<el-form :inline="true" :model="search" ref="search" :rules="rules" @submit.native.prevent>
<el-form-item label="手机号: " prop="mobile">
<el-input v-model="search.name" clearable suffix-icon="el-icon-search" placeholder="请输入手机号" @keyup.enter.native="seachEnter"></el-input>
</el-form-item>
</el-form>
</div>
</div>
</template>
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
编辑 (opens new window)
上次更新: 2023/11/28, 15:42:48