第五次尝试

1.首页布局

<!--index.wxml-->

<view class="container news-list">
  <view class="navi">
    <button class="add-button" size="mini" type="primary" bindtap="addItem">添加收支</button>
  </view>
  <block wx:for="{{items}}">
    <view class="news-item" data-title="{{item.title}}">
      <view class="news-text">
        <text class="news-title">{{item.title}}</text>
        <view class="news-stamp">
          <text>{{item.cate}} {{item.account}}</text>
          <text>2016-9-29{{item.date}}</text>
        </view>
      </view>
    </view>
  </block>
</view>

2.首页样式

/**index.wxss**/

/*添加按钮*/
.navi {
  100%;
}

.add-button {
  float: right;
}

/*列表*/
.news-list {
  display: flex;
  flex-direction: column;
  padding: 40rpx;
}

.news-item {
  display: flex;
  flex-direction: row;
  text-align: left;
   100%;
}

.news-text {
  display: flex;
  flex-direction: column;
  100%;
  border-bottom: 1px solid #ccc;
  line-height: 30px;
}

.news-stamp {
    font-size: 30rpx;
    color:darkgray;
    margin: 20rpx;
    display: flex;
    flex-direction: row;
    justify-content:space-between;
}

.news-title {
  margin: 20rpx;
  margin-bottom: 0rpx;
  font-size: 40rpx;
}

是多疑还是去相信 谎言背后的忠心 或许是自己太执迷 命题游戏 沿着他的脚步 呼吸开始变得急促 就算看清了面目 设下埋伏 真相却居无定处 I swear I'll never be with the devil 用尽一生孤独 没有退路的路 你看不到我 眉眼焦灼却不明下落 命运的轮轴 伺机而动 来不及闪躲 沿着他的脚步 呼吸开始变得急促 就算看清了面目 设下埋伏 真相却居无定处 I swear I'll never be with the devil 用尽一生孤独 没有退路的路 你看不到我 眉眼焦灼却不明下落 命运的轮轴 伺机而动 来不及闪躲 你看不到我 眉眼焦灼却不明下落 命运的轮轴 伺机而动 来不及闪躲 黑夜和白昼 你争我夺 真相被蛊惑 心从不退缩 这天堂荒漠 留给孤独的猎手
原文地址:https://www.cnblogs.com/muailiulan/p/10424421.html