效果
文章來源地址http://www.zghlxwxcb.cn/news/detail-708583.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>
文章來源:http://www.zghlxwxcb.cn/news/detail-708583.html
到了這里,關于uni-app:重置表單數據的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!