|
哪位大佬指点一下那个生鲜电商的模板在mian的页面里面有一段代码
<cityselector onresult="oncityselector"><cityselector>
下面的相关代码是
oncityselector(e){
var currentCity = e.detail;
if (currentCity && currentCity.name) {
if (this.data.cityName != currentCity.name) {
this.data.cityName = currentCity.name;
if (this.data.wareTypeList.length > 0) {
this.updatedWareList();
} else {
this.fnGetWareTypeList();
}
}
}
this.data.citySelectorOpened = false;
},
请问这是一种怎样的写法啊 |
|