效果

代码
html
<template>
<form>
<input type="text" v-model="inputValue" placeholder="请输入信息"/>
<input type="text" v-model="inputValue1" placeholder="请输入信息"/>
<input type="text" v-model="inputValue2" placeholder="请输入信息" />
<button @click="resetForm">重置表单</button>
</form>
</template>
<script>
export default {
data() {
return {
inputValue: '',
inputValue1: '',
inputValue2: ''
}
},
methods: {
resetForm() {
this.inputValue = '';
this.inputValue1 = '';
this.inputValue2 = '';
}
}
}
</script>