element 远程搜索下拉加载
创始人
2024-05-29 10:27:59

created() {
this.getList();
this.getGroupList();
},
directives: {
/** 下拉框懒加载 */
“el-select-loadmore”: {
bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector(
“.el-select-dropdown .el-select-dropdown__wrap”
);
SELECTWRAP_DOM.addEventListener(“scroll”, function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight;
if (condition) {
binding.value();
}
});
},
},
},

// 远程搜索
remoteMethod(query) {
if (query !== “”) {
this.shopList = [];
this.loadingshop = true;
this.shopParams.name = query;
this.shopParams.page = 1;
this.getcommodityList();
}
},
//下拉加载
loadMore() {
if (this.lastPage) return;
this.shopParams.page++;
this.getcommodityList();
},
// 获取商品列表
getcommodityList() {
getGoodsList(this.shopParams).then((response) => {
this.lastPage = response.data.paginationResponse.lastPage;
var newShop = response.data.paginationResponse.content;
this.shopList = this.shopList.concat(newShop);
this.loadingshop = false;
});
},

相关内容

热门资讯

重大通报作弊器!乐乐上海麻将a... 重大通报作弊器!乐乐上海麻将ai智能透视辅助插件,乐乐上海麻将本来存在有外挂(有辅助挂方略)1、很好...
分享给玩家透视挂!家乡大贰ai... 分享给玩家透视挂!家乡大贰ai智能透视辅助工具,家乡大贰其实真的有外挂(有辅助挂细节)家乡大贰破解侠...
科普攻略开挂!英豪娱乐城ai智... 科普攻略开挂!英豪娱乐城ai智能透视辅助教程,英豪娱乐城好像真的是有外挂(有辅助挂头条)1、英豪娱乐...
总算了解辅助器!和悦游戏ai智... 总算了解辅助器!和悦游戏ai智能透视辅助教程,和悦游戏确实是真的有外挂(竟然有辅助挂)暗藏猫腻,小编...
揭秘关于辅助器!九九麻将ai智... 揭秘关于辅助器!九九麻将ai智能透视辅助技巧,九九麻将一贯是有外挂(有辅助挂方略)1、用户打开应用后...