当前位置:网站首页>Uniapp display rich text effect demo (organize)
Uniapp display rich text effect demo (organize)
2022-07-28 00:57:00 【I'm happy】
uniapp Show rich text :
<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: '',
}
},
// Page loading
onLoad(e) {
//uni.hideTabBar(); // Don't let the bottom show tab Options
console.log(e,'eeee');
uni.setNavigationBarTitle({
title: e.title
})
// var data = this.$.get_data('contentTxt');
var data = '<p> Privacy policy 11</p><p><img src="https://public.haotiku.com/haotiku/videos/20220216/1644974733576.png" alt="" width="571" height="337" /></p><p> Third party integrated in the application SDK And plug-ins :<br />1.cn.jpush.android: It is used to push in app information and message notifications to users .<br />2.com.alipay: be used for app Internal members pay information fee <br />3.com.umeng.commonsdk: For wechat qq Third party login authorization and sharing .<br />4.com.amap.api: Gaode map is used to publish position positioning , User induction navigation .</p>';
data = data.replace(/\<img/g, "<img style='width: 100%;'");
this.content = data;
},
// Page shows
onShow() {
},
// Method
methods: {
},
// Compute properties
computed: {
},
// The listener
watch: {
},
// Page hidden
onHide() {
},
// Page uninstall
onUnload() {
},
// Trigger pull-down refresh
onPullDownRefresh() {
},
// Handling function of page pull bottom event
onReachBottom() {
},
}
</script>
<style lang="scss" scoped>
.rtfBox {
}
</style>
<!-- Main code -->
<rich-text :nodes="content"></rich-text>
<script>
export default {
data() {
return {
content:''
}
},
onLoad(){
var data = '<p> Privacy policy 11</p><p><img src="https://public.haotiku.com/haotiku/videos/20220216/1644974733576.png" alt="" width="571" height="337" /></p><p> Third party integrated in the application SDK And plug-ins :<br />1.cn.jpush.android: It is used to push in app information and message notifications to users .<br />2.com.alipay: be used for app Internal members pay information fee <br />3.com.umeng.commonsdk: For wechat qq Third party login authorization and sharing .<br />4.com.amap.api: Gaode map is used to publish position positioning , User induction navigation .</p>';
data = data.replace(/\<img/g, "<img style='width: 100%;'")
this.content= data;
},
methods: {
}
}
</script>
边栏推荐
- Basic operations of MySQL database (I) --- Based on Database
- When Jerry made a phone call, recording to SD card /u disk was not enough [article]
- mysql分表之后怎么平滑上线?
- The Canadian court found Meng Wanzhou guilty of "dual criminality", and the extradition procedure will continue!
- 为华为打造无美系设备的产线,台积电三星能做到吗?
- Selection of FFT sampling frequency and sampling points
- 110. SAP UI5 FileUploader 控件深入介绍 - 为什么需要一个隐藏的 iframe
- MySQL中的运算符
- 单片机之led、数码管与按键
- Leetcode - find the median of two positively ordered arrays
猜你喜欢
随机推荐
"C language" deep entry rounding & four functions
网络设备硬核技术内幕 防火墙与安全网关篇 (九) 虚拟化神器 (下)
Valued at $36billion! SpaceX, which is about to launch its first manned launch, raised $346million
Fastjson历史漏洞复现
The Canadian court found Meng Wanzhou guilty of "dual criminality", and the extradition procedure will continue!
At least 42 employees are infected with novel coronavirus! Nokia announces closure of telecom equipment plant in India
IP address & subnet mask
startUMl
SRv6初登场
Basic elementary function
Impact of privilege changes on existing connections
融云 IM & RTC 能力上新盘点
Swear, swear, swear
Border width border fillet border color
Postman download and use tutorial
Jmeter 如何解决乱码问题?
从第二层到第三层
有趣的哈夫曼树
2020年一季度可穿戴市场出货量达7260万部,苹果独占近三成市场份额
Selection of FFT sampling frequency and sampling points







![[bre] software build release automation](/img/c6/daead474a64a9a3c86dd140c097be0.jpg)
