上传文件至 '新闻小程序/pages/news-detail'

完善了样式
This commit is contained in:
link_1999 2022-04-06 20:23:33 +08:00
parent 9cff70c1ef
commit d3a82382d6
2 changed files with 56 additions and 9 deletions

View File

@ -1,9 +1,13 @@
<view>
<view>{{detail.news_title}}</view>
<view>{{detail.news_date}}</view>
<view>{{detail.news_author}}</view>
<view wx:if="{{news_image}}">
<image src="{{news_image}}"></image>
<view class="detail_start">
<view class="news_title">{{detail.news_title}}</view>
<view class="publisher-info">
<view class="news_author">{{detail.news_author}}</view>
<view class="news_date">发布于{{detail.news_date}}</view>
</view>
<view>{{detail.news_content}}</view>
</view>
</view>
<view wx:if="{{news_image}}">
<image class="news_image" src="{{news_image}}"></image>
</view>
<rich-text class="news_content">{{detail.news_content}}</rich-text>

View File

@ -1 +1,44 @@
/* pages/news-detail/news-detail.wxss */
page {
display: flex;
flex-direction: column;
}
.news_title {
font-size: 26px;
line-height: 28px;
font-weight: 700;
color: #3a3a3a;
text-align: justify;
margin: 30rpx 20rpx;
}
.publisher-info{
margin: 0 30rpx;
display: flex;
flex-direction: row;
border-bottom: 1px solid grey;
}
.news_author {
font-size: 13px;
border-radius: 10rpx;
height: 40rpx;
text-align: center;
border: 1px solid;
}
.news_date {
font-size: 13px;
color: #999;
margin-left: 30rpx;
margin-bottom: 30rpx;
}
.news_content {
margin: 30rpx 20rpx;
}
.news_content .txt {
word-wrap: break-word;
font-size: 18px;
color: #333;
text-align: center;
}
.news_image {
width: 90%;
margin: 30rpx;
}