98 lines
2.1 KiB
Vue
Executable File
98 lines
2.1 KiB
Vue
Executable File
<template>
|
||
<view class="page">
|
||
<view class="p-title">
|
||
<text>{{title}}</text>
|
||
</view>
|
||
<view class="p-sub-title">
|
||
<text>{{brief}}</text>
|
||
</view>
|
||
<!-- <view class="p-top-date">
|
||
<view>日期:{{date}}</view>
|
||
</view> -->
|
||
<view class="p-content">
|
||
<view v-html="content"></view>
|
||
<!-- <p> 已将常用的组件、JS API 封装到框架中,开发者按照
|
||
uni-app 规范开发即可保证多平台兼容,大部分业务均可直接满足。
|
||
但每个平台有自己的一些特性,因此会存在一些无法跨平台的情况。
|
||
大量写 if else,会造成代码执行性能低下和管理混乱。
|
||
编译到不同的工程后二次修改,会让后续升级变的很麻烦。</p> -->
|
||
</view>
|
||
<view class="p-top-date">
|
||
<view>日期:{{date}}</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
data() {
|
||
return {
|
||
title:'',
|
||
date:'',
|
||
brief:'',
|
||
content:'',
|
||
subtitle:''
|
||
}
|
||
},
|
||
onLoad:function(option){
|
||
console.log(option)
|
||
if(option.data)
|
||
{
|
||
var datas=JSON.parse(option.data);
|
||
console.log(datas)
|
||
this.title=datas.title
|
||
this.date=datas.datetime
|
||
this.content=datas.content
|
||
}
|
||
|
||
},
|
||
methods: {
|
||
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
.page{
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.page view{
|
||
display: flex;
|
||
}
|
||
.p-title{
|
||
justify-content: center;
|
||
align-items: center;
|
||
font-size: 35rpx;
|
||
font-weight: bold;
|
||
}
|
||
.p-sub-title{
|
||
justify-content: center;
|
||
align-items: center;
|
||
font-size: 28rpx;
|
||
color: #B2B2B2;
|
||
font-weight: bold;
|
||
text-align:justify;//两边对齐
|
||
text-justify: inter-ideograph;
|
||
text-indent: 56rpx; //段落首行缩进两个字符
|
||
padding-left:5%;
|
||
padding-right:5%;
|
||
}
|
||
.p-top-date{
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
padding-right: 40upx;
|
||
color: #B2B2B2;
|
||
}
|
||
.p-content{
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
text-align:justify;
|
||
text-justify: inter-ideograph;
|
||
text-indent: 56rpx; //段落首行缩进两个字符
|
||
padding-left:3%;
|
||
padding-right:3%;
|
||
}
|
||
|
||
</style>
|