<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                **問題1:輪播圖高度是固定的,與圖片高度不一致時,會出現樣式問題** 輪播圖圖片使用了屬性:mode="widthFix",根據寬度自動計算高度,但是輪播圖組件的高度是固定的150px,切換機型獲取改變寬度的話,輪播圖顯示就會出現問題 ![](https://img.kancloud.cn/89/94/8994d4d3ae95013bede420777e22538b_639x311.png) 解決方法:獲取圖片高度,讓輪播圖高度始終和圖片一致 1.使用變量改變輪播圖高度 ``` <swiper indicator-dots autoplay circular duration indicator-color="blue" indicator-active-color="pink" style="height:{{swiperHeight}}px"> ``` 2.在js中獲取圖片高度,給變量賦值,改變輪播圖高度 ``` 1.在image組件中有一個圖片加載完成的方法:bindload <image src="{{item.imageUrl}}" class="image" mode="widthFix" bindload="imgLoad"></image> 2.在js中使用這個方法: //輪播圖圖片加載完成 imgLoad(val) { //獲取圖片高度(獲取組件高度) const query = wx.createSelectorQuery(); //創建查詢元素 query.select('.image').boundingClientRect(); //綁定元素 // query.selectViewport().scrollOffset() query.exec( (res) =>{ //返回一個數組 const height = res[0].height; console.log(height) this.setData({swiperHeight : height}) //賦值 }) }, ``` ![](https://img.kancloud.cn/69/27/69277b69538183d896e7e2f1f528e8fe_578x258.png) **問題2:給輪播圖設置圓角** ``` //添加一個類,設置樣式 .swiper{ border-radius: 10rpx; overflow: hidden;//超過高度隱藏,要不然無法顯示圓角 transform: translateY(0);//webview熏染問題,兼容個別機型,不加可能出現有些角沒有效果 } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看