小程序 引入weapp框架 实现自制表格

纯属娱乐

<!--index.wxml-->
<view>
  <i-tabs current="{{ current }}" bindchange="handleChange">
    <i-tab key="1" title="待处理"></i-tab>
    <i-tab key="2" title="已反馈"></i-tab>
    <i-tab key="3" title="待验收"></i-tab>
    <i-tab key="4" title="已验收"></i-tab>
  </i-tabs>
  <view>
    <view style='width: 100%;  height: 1rpx' />
    <i-row>
      <i-col span="5" i-class="col-class">
        <view class="table_parent">ID</view>
      </i-col>
      <i-col span="5" i-class="col-class">
        <view class="table_parent">设备</view>
      </i-col>
      <i-col span="8" i-class="col-class">
        <view class="table_parent">时间</view>
      </i-col>
      <i-col span="6" i-class="col-class">
        <view class="table_parent">提交状态</view>
      </i-col>
    </i-row>
    <view style='width: 100%;  height: 1rpx' />
    <block wx:for="{{noticeList}}" wx:key="index" wx:for-index='index' wx:for-item="item">
      <i-row>
        <i-col span="5" i-class="col-class">
          <view class="table_parent">{{item.id}}</view>
        </i-col>
        <i-col span="5" i-class="col-class">
          <view class="table_parent">{{item.equipmentNickName}}</view>
        </i-col>
        <i-col span="8" i-class="col-class">
          <view class="table_parent">{{item.statusOneTime}}</view>
        </i-col>
        <i-col span="6" i-class="col-class">
          <view class="table_parent">{{item.status}}</view>
        </i-col>
      </i-row>
    </block>
  </view>
</view>
/**index.wxss**/
page {
background-color: #d3d3d3;
}

.table_parent {
	display:flex;
	justify-content:center;
	align-items:center;
  background: white;
  font-size:30rpx;
  text-align:center;
  box-sizing:border-box;
  color:#595a5e;
  padding-top: 20rpx;
  padding-bottom: 20rpx;
}
.table {
  border: 1px solid #dadada;
  border-right: 0;
  border-bottom: 0;
  width: 98%;
}

.tr {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.th, .td {
  padding: 10px;
  border-bottom: 1px solid #dadada;
  border-right: 1px solid #dadada;
  text-align: center;
  width: 100%;
}

.th {
  font-weight: 400;
  background-color: #dadada;
}

 

{
  "navigationBarTitleText": "我的报修单",
  "usingComponents": {
    "i-cell-group": "../../dist/cell-group/index",
    "i-cell": "../../dist/cell/index",
    "i-tabs": "../../dist/tabs/index",
    "i-tab": "../../dist/tab/index",
    "i-row": "../../dist/row/index",
    "i-col": "../../dist/col/index"
  }
}

运行结果:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值