topic description
Click on the resetForm form should be reset, but there is no
sources of topics and their own ideas
related codes
/ / Please paste the code text below (do not replace the code with pictures)
< div class= "selectWrap" >
<el-form :model = "form" ref="dataForm">
<div class="clearfix">
<div class="select-item selectDIV ershisan">
<el-form-item prop="reset">
<el-button @click="resetForm" class="dagongji"></el-button>
</el-form-item>
<!--<a @click="resetForm" class="dagongji"></a>-->
<el-form-item prop="selectarea">
<el-select class="bashisan" @change="search" style="width: 100%" v-model="form.area" :popper-append-to-body="false" collapse-tags clearable multiple filterable placeholder="">
<el-option v-for="item of adminUserAreas" :key="item.areaId" :label="item.regionName" :value="item.areaId"></el-option>
</el-select>
</el-form-item>
</div>
<!--<div @click = searchdb >quanguo</div>-->
<div v-if="!isHome" class="select-item">
<el-select
@change="search"
style="width: 100%"
filterable
clearable
:popper-append-to-body="false"
v-model="form.examClasses"
placeholder=""
multiple collapse-tags>
<el-option v-for="item in examClasses" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div v-if="!isHome" class="select-item">
<el-input v-model="form.classname" placeholder="">
<i @click="search" slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
</div>
<div class="select-item dateDIV">
<el-date-picker
@clear="search"
@change="dateChange"
v-model="form.date"
type="daterange"
value-format="timestamp"
range-separator="" style="width: 100%" start-placeholder="" end-placeholder="">
</el-date-picker>
</div>
<div v-if="isHome" class="select-item radioDIV hidemove">
<el-radio-group @change="radioChange" v-model="form.radio">
<el-radio-button label="7"></el-radio-button>
<el-radio-button label="30"></el-radio-button>
<el-radio-button label="90"></el-radio-button>
</el-radio-group>
</div>
</div>
</el-form>
</div>
resetForm () {
this.$nextTick(() => {
this.$refs["dataForm"].resetFields()
})
this.search()
this.$router.push({name: "echart "})
}
what result do you expect? What is the error message actually seen?
expect form or form.area to be emptied