使用 this.$options.data() 方法
<el-button @click="rest" size="mini" class="btn">重置</el-button>
工单编号:
<el-input
v-model="pageParams.orderCode"
placeholder="请输入工单编号"
style="width:200px"
></el-input>
<el-table :data="tableData" style="width: 100%;margin: 15px 0;" border :stripe="true">
<el-table-column prop="orderCode" label="工单编号" align="center" show-overflow-tooltip>
</el-table-column>
</el-table>
data() {
return {
pageParams: {
tableData: [],
}
},
methods: {
rest(){
this.tableData =this.$options.data().tableData;
},
}
//调用方法
this.form =this.$options.data().form;