<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [toc] # 2.2 首頁開發(二) ## 2.2.1 將列表圖片替換為演示圖片 ``` <!-- 列表模塊 --> <view class="flex flex-wrap"> <view style="width: 375rpx; height : 375rpx; padding: 5rpx; box-sizing: border-box;"> <image src="../../static/demo/1.jpg" style="width: 365rpx; height: 365rpx;" class="rounded" mode="aspectFill"></image> </view> </view> ``` ## 2.2.2 將圖片mode模式設置為保持縱橫比縮放圖片 ``` <image src="../../static/demo/1.jpg" style="width: 365rpx; height: 365rpx;" class="rounded" mode="aspectFill"></image> ``` ## 2.2.3 實現金幣和人氣布局 ``` <!-- 列表模塊 --> <view class="flex flex-wrap"> <view style="width: 375rpx; height : 375rpx; padding: 5rpx; box-sizing: border-box; position: relative;"> <!-- 直播間圖片 --> <image src="../../static/demo/1.jpg" style="width: 365rpx; height: 365rpx;" class="rounded" mode="aspectFill"></image> <!-- 直播間金幣 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; left: 15rpx; top: 15rpx; background-color: rgba(0,0,0,0.4);"> <text class="iconfont iconbizhongguanli text-warning mr-1"></text> <text class="text-white font">0</text> </view> <!-- 直播間人氣 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; right: 15rpx; top: 15rpx; background-color: rgba(0,0,0,0.4);"> <text class="text-white font mr-1">人氣:</text> <text class="text-white font">0</text> </view> </view> </view> ``` ## 2.2.4 實現直播間名稱與直播間狀態布局 ``` <!-- 列表模塊 --> <view class="flex flex-wrap"> <view style="width: 375rpx; height: 375rpx; padding: 5rpx; box-sizing: border-box; position: relative;"> <!-- 直播間圖片 --> <image src="../../static/demo/1.jpg" style="width: 365rpx; height: 365rpx;" class="rounded" mode="aspectFill"></image> <!-- 直播間金幣 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; left: 15rpx; top: 15rpx; background-color: rgba(0,0,0,0.4);"> <text class="iconfont iconbizhongguanli text-warning mr-1"></text> <text class="text-white font">0</text> </view> <!-- 直播間人氣 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; right: 15rpx; top: 15rpx; background-color: rgba(0,0,0,0.4);"> <text class="text-white font mr-1">人氣:</text> <text class="text-white font">0</text> </view> <!-- 直播間名稱 --> <view class="rounded-circle flex align-center justify-center" style="position: absolute; left: 15rpx; bottom: 15rpx; "> <text class="text-white font">標題</text> </view> <!-- 直播間狀態 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; right: 15rpx; bottom: 15rpx; background-color: rgba(0,0,0,0.4);"> <text style="width: 20rpx; height: 20rpx; display: block; " class="rounded-circle bg-danger mr-1"></text> <text class="text-white font">已結束</text> </view> </view> </view> ``` ## 2.2.5 使用v-for遍歷直播間 ``` <!-- 列表模塊 --> <view class="flex flex-wrap"> <view v-for="(item,index) in 10" :key="index" style="width: 375rpx; height: 375rpx; padding: 5rpx; box-sizing: border-box; position: relative;"> <!-- 直播間圖片 --> <image src="../../static/demo/1.jpg" style="width: 365rpx; height: 365rpx;" class="rounded" mode="aspectFill"></image> <!-- 直播間金幣 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; left: 15rpx; top: 15rpx; background-color: rgba(0,0,0,0.4);"> <text class="iconfont iconbizhongguanli text-warning mr-1"></text> <text class="text-white font">0</text> </view> <!-- 直播間人氣 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; right: 15rpx; top: 15rpx; background-color: rgba(0,0,0,0.4);"> <text class="text-white font mr-1">人氣:</text> <text class="text-white font">0</text> </view> <!-- 直播間名稱 --> <view class="rounded-circle flex align-center justify-center" style="position: absolute; left: 15rpx; bottom: 15rpx; "> <text class="text-white font">標題</text> </view> <!-- 直播間狀態 --> <view class="rounded-circle px-2 flex align-center justify-center" style="position: absolute; right: 15rpx; bottom: 15rpx; background-color: rgba(0,0,0,0.4);"> <text style="width: 20rpx; height: 20rpx; display: block; " class="rounded-circle bg-danger mr-1"></text> <text class="text-white font">已結束</text> </view> </view> </view> ``` ## 2.2.6 首頁代碼優化 1. 輪播圖組件化 2. 單個直播間組件化 3. 直播間組件列表組件化 4. icon圖標組件化 5. 直播間狀態(圓點)組件化 6. css樣式分離
                  <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>

                              哎呀哎呀视频在线观看