当前位置:网站首页>uniapp显示富文本效果demo(整理)
uniapp显示富文本效果demo(整理)
2022-07-27 22:09:00 【我是开心呀】
uniapp显示富文本:
<template>
<view class="rtfBox">
<view class="margin-left30 margin-right30 margin-top20 margin-bottom20">
<rich-text :nodes="content"></rich-text>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
content: '',
}
},
// 页面加载
onLoad(e) {
//uni.hideTabBar(); //不让底部显示tab选项
console.log(e,'eeee');
uni.setNavigationBarTitle({
title: e.title
})
// var data = this.$.get_data('contentTxt');
var data = '<p>隐私政策11</p><p><img src="https://public.haotiku.com/haotiku/videos/20220216/1644974733576.png" alt="" width="571" height="337" /></p><p>应用内集成的第三方SDK以及插件:<br />1.cn.jpush.android: 用来给用户推送应用内资讯信息以及消息通知。<br />2.com.alipay:用于app内会员支付信息费<br />3.com.umeng.commonsdk:用于微信 qq等第三方登录授权以及分享。<br />4.com.amap.api:高德地图用于发布职位定位,已经用户入职导航。</p>';
data = data.replace(/\<img/g, "<img style='width: 100%;'");
this.content = data;
},
// 页面显示
onShow() {
},
// 方法
methods: {
},
// 计算属性
computed: {
},
// 侦听器
watch: {
},
// 页面隐藏
onHide() {
},
// 页面卸载
onUnload() {
},
// 触发下拉刷新
onPullDownRefresh() {
},
// 页面上拉触底事件的处理函数
onReachBottom() {
},
}
</script>
<style lang="scss" scoped>
.rtfBox {
}
</style>
<!-- 主要代码 -->
<rich-text :nodes="content"></rich-text>
<script>
export default {
data() {
return {
content:''
}
},
onLoad(){
var data = '<p>隐私政策11</p><p><img src="https://public.haotiku.com/haotiku/videos/20220216/1644974733576.png" alt="" width="571" height="337" /></p><p>应用内集成的第三方SDK以及插件:<br />1.cn.jpush.android: 用来给用户推送应用内资讯信息以及消息通知。<br />2.com.alipay:用于app内会员支付信息费<br />3.com.umeng.commonsdk:用于微信 qq等第三方登录授权以及分享。<br />4.com.amap.api:高德地图用于发布职位定位,已经用户入职导航。</p>';
data = data.replace(/\<img/g, "<img style='width: 100%;'")
this.content= data;
},
methods: {
}
}
</script>
边栏推荐
- 递归求解迷宫问题
- Point divide and conquer analysis
- Basic operations of MySQL database (3) --- Based on fields
- How does matlab set the K-line diagram to classic red and green color matching?
- Applet helps smart home ecological platform
- 估值360亿美元!即将进行首次载人发射的SpaceX筹资3.46亿美元
- 从第二层到第三层
- LeetCode_位运算_中等_137.只出现一次的数字 II
- 7. Typescript part Foundation
- startUMl
猜你喜欢

阿里二面:为什么要分库分表?

LeetCode 415. 字符串相加 和 43. 字符串相乘
![[CruiseControl]Build Result JSP](/img/80/11c2b539c217ecd6ba55668d3e71e9.png)
[CruiseControl]Build Result JSP

Matlab | those matlab tips you have to know (4)

startUMl

mysql数据库的基本操作(三)-——基于字段

Rational and perceptual activities and required skills in programmers' work
![Jerry Zhi doesn't play hidden audio files [article]](/img/09/b9fb293151f56d2a93f8a1c8f3d0dc.png)
Jerry Zhi doesn't play hidden audio files [article]

Point divide and conquer analysis

Map set
随机推荐
Leetcode 452. minimum number of arrows to burst balloons (medium)
leetcode:1997. 访问完所有房间的第一天【跳跃dp】
Rendering problems
网络设备硬核技术内幕 防火墙与安全网关篇 (十二) 零接触办公的奥秘 下
Matlab | those matlab tips you have to know (3)
Jericho will make a popping sound when turning on, broadcasting a prompt tone, and turning off [chapter]
Data visualization - White Snake 2: black snake robbery (3)
从第二层到第三层
网络设备硬核技术内幕 防火墙与安全网关篇 (五) 安全双修大法 中
The influence of head zeroing and tail zeroing on FFT output
[proteus simulation] 51 single chip microcomputer washing machine simulation control program
Ddt+yaml implementation of data driven mechanism based on unittest
蓝桥杯单片机第十一届国赛程序设计试题
Redis learning and understanding of three special data types
In the first quarter of 2020, the wearable market shipped 72.6 million units, with apple occupying nearly 30% of the market share
scrollview、tableView嵌套解决方案
Rational and perceptual activities and required skills in programmers' work
[bre] software build release automation
LED, nixie tube and key of single chip microcomputer
҈ straight ҈ Broadcast ҈ Pre ҈ Report ҈ |҈ In hot summer, let's cross the high temperature and "bake" with nono!