We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<swiper loop :aspect-ratio='ratio' dots-position="center" :show-desc-mask="showmask" :list="getImgs()" v-if="goodsdetail.imgs.length>0" ></swiper>
getImgs定义如下:
getImgs:function () { let bannerList = this.goodsdetail.imgs.map((one, index) => ({ url: '#', img: one })) return bannerList; }, getDetail:function () { let _this = this; this.ajax.post('store/getimglist',{"goodsid":this.goodsid}) .then(function (res) { _this.goodsdetail = res.data.data.pinfo; }).catch(function (err) { console.log(err) }) }
如果 接口 store/getimglist 返回的 imgs 值有一条数据 如:
{ "status": "200", "message": "\u6210\u529f", "data": { "pinfo": { "inventorynum": 99999, "state": 1, "piid": "107", "imgs": [ "https:\/\/aimgstoreapi.moveclub.cn\/uploads\/image\/20170613\/593fa100c3970.jpg" ], "tips": "\u7acb\u5373\u8d2d\u4e70", "canpurchase": 1 } } }
则在IOS下 点击 页面 会变成空白
The text was updated successfully, but these errors were encountered:
如果你只有一张图片加上你 v-if 的条件,肯定不会显示出来了。
Sorry, something went wrong.
@airyland 那会正在编辑issues不小心提交了 如果只有一张图片 会正常显示。但是 如果点击下页面 整个页面会变成空白
你太迅速了. 最后,自己解决方案是判断 图片数量 如果是一张的话 直接 显示图片 不用swiper组件。 多张的话使用swiper组件
No branches or pull requests
getImgs定义如下:
如果 接口 store/getimglist 返回的 imgs 值有一条数据 如:
则在IOS下 点击 页面 会变成空白
The text was updated successfully, but these errors were encountered: