使用mui框架时,会出现在pc端上a链接可以点击,单移动端点击不了的问题,在
// 初始化数据
var once = ''
res.data.alist.data.forEach((v) => {
mui('body').on('tap','a',function(){document.location.href=this.href;});
let topbar = '<img src="' + v.image + '" class="tit-img">'
// let descHtml='<span class="list-content">' + v.desc + '</span>';
let descHtml='<span class="list-content"></span>';
if(style == 2){
descHtml=""
topbar = ''
}
在mui中调用接口渲染数据之前加上 ‘ mui(‘body’).on(‘tap’,‘a’,function(){document.location.href=this.href;});’
就可以完成兼容问题