feat(banner管理页面): 搜索栏“国家”选项调整

This commit is contained in:
hzj 2026-01-28 18:33:40 +08:00
parent e0def280bd
commit 7cdf310aa9

View File

@ -310,7 +310,7 @@ export default {
textOptTitle: "",
listLoading: true,
selectedCountry: {},
selectedCountry: {}, //
countryList: [],
loadingCountry: false
};
@ -381,10 +381,21 @@ export default {
const that = this;
console.log("val", val);
that.selectedCountry = this.countryList.filter(
item => item.country.alphaTwo === val
)[0];
that.listQuery.countryCode = this.selectedCountry.country.alphaTwo;
if (!val) {
//
that.listQuery.countryCode = "";
that.selectedCountry = {};
} else {
//
that.selectedCountry =
this.countryList.find(item => item.country.alphaTwo === val) || {};
// 使访
that.listQuery.countryCode = that.selectedCountry.country
? that.selectedCountry.country.alphaTwo
: "";
}
this.renderData();
},
@ -397,7 +408,8 @@ export default {
.then(res => {
that.loadingCountry = false;
that.countryList = res.body || [];
that.listQuery.countryCode = that.selectedCountry.country.alphaTwo;
that.listQuery.countryCode = "";
that.selectedCountry = {};
// that.renderData();
})
.catch(er => {