表单提交之后,清空input里的数据
作者:互联网
this.$refs.table.resetFields();
//table是表单的名称
例子:
<el-form :rules="rules" ref="formLabelAlign" :label-position="labelPosition" label-width="120px" border :model="formLabelAlign" >
<el-form-item prop='page_name' label="电视台名称">
<el-input v-model="formLabelAlign.page_name" placeholder="网页名称(必填)"></el-input>
</el-form-item>
<el-form-item prop='game_name' label="时段名称">
<el-input v-model="formLabelAlign.game_name" placeholder="游戏名称(必填)"></el-input>
</el-form-item>
<el-form-item prop='game_description' label="节目名称">
<el-input v-model="formLabelAlign.game_description" placeholder="游戏简介(必填)"></el-input>
</el-form-item>
<el-form-item prop='game_remark' label="备注">
<el-input v-model="formLabelAlign.game_remark" placeholder="游戏备注(选填)"></el-input>
</el-form-item>
<el-button class="but" @click="submit">确认提交</el-button>
</el-form>
标签:resetFields,refs,表单,提交,清空,input,table 来源: https://www.cnblogs.com/meiyanstar/p/12867667.html