1. 程式人生 > 其它 >vue 搜尋框

vue 搜尋框

//按時間查詢資料 <el-form class="line" inline @submit.native.prevent="GEOMNum()"> <el-form-item> <el-date-picker value-format="yyyy-MM-dd" type="date" v-model="creTime" :placeholder="this.LANG.test1.desc49" ></el-date-picker> <el-button class="button" @click="GEOMNum()" type="primary" >{{ LANG.test1.desc48 }}</el-button > </el-form-item> </el-form> //按賬號查詢資料 <el-input:placeholder="this.LANG.test1.desc50"v-model="address"clearable@clear="resetGoods"> </el-input> <el-button @click="GEOMNum()" type="primary">{{LANG.test1.desc48}}</el-button> methods: { GEOMNum: function (index) { this.$axios .get("bk", { params: { currentPage: this.currentPage, creTime: this.creTime, address: this.address, pageSize: this.pageSize, }, }) .then((res) => { console.log(res); if (res.code == 0) { this.dataList = res.data.dataList; this.totalPage = res.data.totalPage; this.currentPage = res.data.currentPage; this.pageSize = res.data.pageSize; this.total = res.data.total; console.log(this.totalPage); console.log(this.currentPage); console.log(this.pageSize); console.log(this.total); } }); }, time() { this.GEOMNum(); }, // 重置搜尋框 resetGoods() { this.address = ""; this.GEOMNum(); }, // 點選搜尋按鈕 searchGoodsResult() { this.GEOMNum(); }, }