<view class="home">
<view @click="seearticle(item._id)" class="container" v-for="item in listarr" :key="item.index">
<view class="title">
{{item.title}}
</view>
<image class="pic" mode="aspectFill" :src="item.avatar" ></image>
</view>
<button @click="onsubmit">发布</button>
</view>
这是开头的封面和标题展示
.container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1px solid #F5FFFA;
}
.title {
flex: 1;
height: 35%;
line-height: 35%;
margin-right: 30rpx;
}
.pic {
width: 245rpx;
height: 137rpx;
border-radius: 15rpx;
/* 圆角设置 */
}
这是CSS样式