随笔 - 122,  文章 - 2,  评论 - 2,  阅读 - 54649

swiper

演示视图

演示视图

wxml

<!-- 中部上游信息 -->
  <swiper class="swiper" autoplay circular previous-margin="20rpx" next-margin="60rpx">
    <swiper-item wx:for="{{upstreamList}}" wx:key="id">
      <view class="swiper_item" style="background: url(../../images/upstream_bg0.png) no-repeat center center;background-size: 100% 100%;">
        <view class="center_row">
          <van-icon name="wap-home" size="20px" style="margin-top: 25rpx;" />
          <text class="title">上游管理</text>
        </view>
        <view class="center_clo">
          <text class="title">贵州闽达钢铁有限公司</text>
          <text style="color: #ffffff;">关联时间:2023-04-20 10:35:40</text>
        </view>
      </view>
    </swiper-item>
  </swiper>

css

/* 中部上游信息 */
.swiper{
  z-index: 1;
  width: 100%;
  /* background-color: #FFFFFF; */
  height: 360rpx;
}
.swiper_item{
  border-radius: 20rpx;
  width: 650rpx;
  height: 300rpx;
}
.center_row{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  color: #ffffff;
  margin-left: 30rpx;
  margin-top: 50rpx;
}
.title{
  color: #ffffff;
  font-weight: bold;
  font-size: 36rpx;
  margin-top: 30rpx;
}
.center_clo{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  color: #ffffff;
  margin-left: 30rpx;
  margin-top: 20rpx;
}

scroll

视图

视图

wxml

<!-- 计划明细 -->
    <view class="scroll_box" wx:for="{{2}}">
      <scroll-view scroll-x >
        <view class="item_list">
          <text class="normal_plan">品名</text>
          <text class="normal">三级螺纹钢</text>
        </view>
        <view class="item_list">
          <text class="normal_plan">材质</text>
          <text class="normal">HRB400</text>
        </view>
        <view class="item_list">
          <text class="normal_plan">规格</text>
          <text class="normal">20*9</text>
        </view>
        <view class="item_list">
          <text class="normal_plan">数量</text> 
          <text class="normal">20件</text>
        </view>
        <view class="item_list">
          <text class="normal_plan">单价</text>
          <text class="normal">500元</text>
        </view>
        <view class="item_list">
          <text class="normal_plan">重量</text>
          <text class="normal">100吨</text>
        </view>
      </scroll-view>
    </view>

css

.scroll_box{
  width: 100%;
  height: 120rpx;
  overflow: hidden;
  background: #fff;
  white-space: nowrap;
  margin-top: 20rpx;
  }
  .scroll_box scroll-view{
    height: 100%;
    width: auto;
    overflow:hidden;
  }
  .item_list{
  width: 180rpx;
  height: 60rpx;
  margin-right: 10rpx;
  display: inline-block;
  /* background-color: #F5F5F5; */
  line-height: 60rpx;
  text-align: center;
  }
posted on   depressiom  阅读(49)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2022-04-25 安装黑苹果 、 Mac OS虚拟机
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示