nurseWeChatAppletUI/pages/Healthitem/Healthitem.vue

51 lines
894 B
Vue
Raw Normal View History

2023-02-20 16:22:42 +08:00
<template>
<view class="app">
<view class="title">
{{item.informationTitle}}
</view>
<view class="text" v-html="item.informationContent">
</view>
</view>
</template>
<script>
export default {
data() {
return {
item: null,
};
},
onLoad(options) { //获取传值
this.item = JSON.parse(decodeURIComponent(options.item))
this.item.informationContent = this.item.informationContent.replace(/\<img/gi,
"<br/> <img class='richPic'")
},
onReady() { //更改导航栏文字
},
}
</script>
<style lang="scss">
.title {
padding-left: 3%;
font-size: 38rpx;
font-weight: bold;
white-space: normal;
word-break: break-all;
margin-bottom: 20rpx;
}
.text {
width: 96%;
margin: 0 auto;
background-color: #fff;
padding: 20rpx;
border-radius: 10rpx;
}
/deep/ .richPic {
width: 100% !important;
height: 100% !important;
}
</style>