Skip to content
New issue

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组件仅有一张图片时候,在iOS 下 点击页面 变空白 #1560

Closed
litoxy opened this issue Jun 13, 2017 · 2 comments
Closed

Comments

@litoxy
Copy link

litoxy commented Jun 13, 2017

  <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下 点击 页面 会变成空白
如果只有一张图片 会正常显示。但是 如果点击页面 整个页面会变成空白

@airyland
Copy link
Owner

issue 可以 reopen 的,不必要再建一个新的。

"点击页面"是什么意思

把业务代码删掉吧,直接给出我可以重现的代码。

@airyland
Copy link
Owner

按照你说的通过 setTimeout 模拟接口返回一张图片,并不能重现你所说的。麻烦补充 repo 或者 demo 页面再 reopen。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants