当前位置:网站首页>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>
边栏推荐
- The Canadian court found Meng Wanzhou guilty of "dual criminality", and the extradition procedure will continue!
- Ddt+yaml implementation of data driven mechanism based on unittest
- 公司7月来了个软件测试工程师,一副毛头小子的样儿,哪想到是新一代卷王...
- 英特尔携手汉朔、微软,释放“AI + 零售”大招!
- Promoting cloud network integration and building a digital economy: Intel unveiled the 5th Digital China Construction Summit - cloud ecosystem Conference
- Current situation of semiconductor testing equipment Market: the localization rate is still less than 10%!
- Basic operations of MySQL database (2) --- Based on data table
- 从第二层到第三层
- 数据分析:拆解方法(详情整理)
- The latest notice of the Chinese Academy of Sciences: abandon the impact factor! The journal zoning table will be published for the "Journal surpassing index"
猜你喜欢

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

Map set

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

红队大杀器 Behinder_v4.0(冰蝎4.0)

What are the namespaces and function overloads of + and @ in front of MATLAB folder

From the second floor to the third floor

公司7月来了个软件测试工程师,一副毛头小子的样儿,哪想到是新一代卷王...

Rongyun IM & RTC capabilities on new sites

迷惑的单片机矩阵按键

Read cmake in one article
随机推荐
小波变换学习笔记
mysql数据库的基本操作(三)-——基于字段
Y79. Chapter IV Prometheus' monitoring system and practice -- Prometheus' service discovery mechanism (10)
Rongyun IM & RTC capabilities on new sites
mysql分表之后怎么平滑上线?
Logic of automatic reasoning 09 - automatic theorem proving
Intel releases open source AI Reference Suite
Data analysis: disassembly method (details)
Volkswagen China invested 8billion yuan and became the largest shareholder of GuoXuan high tech
Solve maze problem recursively
数据分析:拆解方法(详情整理)
[leetcode] 547. Number of provinces (medium)
网络设备硬核技术内幕 防火墙与安全网关篇 (十二) 零接触办公的奥秘 下
Matlab | those matlab tips you have to know (I)
蓝桥杯单片机第十一届国赛程序设计试题
2020年一季度可穿戴市场出货量达7260万部,苹果独占近三成市场份额
点分治解析
Network equipment hard core technology insider firewall and security gateway chapter (VI) security double repair under the law
[meetup preview] openmldb + ONEFLOW: link feature engineering to model training to accelerate machine learning model development
[must read for new products] valuation analysis of Meishi technology, distributed audio-visual products and Solutions