精简搜索函数, 添加页面
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
getAuthInfo,
|
||||
getDataSet,
|
||||
getDay,
|
||||
searchValueFormat,
|
||||
showModal,
|
||||
sleep,
|
||||
toArray,
|
||||
@@ -40,12 +41,7 @@ Page({
|
||||
},
|
||||
searchChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
this.data.params[key] = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
searchChange2(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
const val = `${e.detail.value || ''}`.trim();
|
||||
const val = searchValueFormat(e.detail.value);
|
||||
if (val) {
|
||||
this.data.params[key] = val;
|
||||
} else {
|
||||
@@ -53,16 +49,6 @@ Page({
|
||||
}
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
onOptionChange(e: any) {
|
||||
const key = getDataSet(e).key;
|
||||
this.data.params[key] = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
datePickerConfirm(e: any) {
|
||||
const data = getDataSet(e);
|
||||
this.data.params[data.key] = e.detail.value;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
searchOk() {
|
||||
this.getList(1);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user