当前位置:网站首页>Uni app's uparse rich text parsing perfectly parses rich text!
Uni app's uparse rich text parsing perfectly parses rich text!
2022-06-27 02:50:00 【Z_ Xshan】
download uni-app plug-in unit
uparse Download address :uParse Rich text analysis - DCloud Plug in market
After downloading, there will be components file

Basic usage
<template>
<div>
<u-parse :content="article" @preview="preview" @navigate="navigate" ></u-parse>
</div>
</template>
<script>
import uParse from '@/components/u-parse/u-parse.vue'
export default {
components: {
uParse
},
data () {
return {
article: '<div> I am a HTML Code </div>'
}
},
methods: {
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
}
}
}
</script>
<style>
@import url("@/components/u-parse/u-parse.css");
</style>attribute
| name | type | The default value is | describe |
|---|---|---|---|
| loading | Boolean | false | Data loading status |
| className | String | — | Customize class name |
| content | String | — | Rendering content |
| noData | String | Data cannot be empty | Rendering presentation of null data |
| startHandler | Function | See source code | Customize parser function |
| endHandler | Function | null | Customize parser function |
| charsHandler | Function | null | Customize parser function |
| imageProp | Object | See below | Picture related parameters |
Customize parser Function details
- The parameter passed in is the current node
nodeObject and parsing resultresultsobject , for examplestartHandler(node, results) - There is no need to return a value , Complete the required changes by directly operating the passed in parameters
- The custom function will be executed after the processing of the original parsing function
event
| name | Parameters | describe |
|---|---|---|
| preview | Picture address , Original event | Triggered when a picture is previewed |
| navigate | Link address , Original event | Trigger when you click a link |
边栏推荐
- Calculation of average wind direction and speed (unit vector method)
- 学习太极创客 — MQTT(七)MQTT 主题进阶
- Test the respective roles of nohup and &
- 解决cherry pick提交报错问题
- Fork (), exec (), waitpid (), $? > > in Perl 8 combination
- Constraintlayout Development Guide
- Learn Tai Chi Maker - mqtt (VI) esp8266 releases mqtt message
- Flink learning 5: how it works
- 事业观、金钱观与幸福观
- Dameng database installation
猜你喜欢

Calculation of average wind direction and speed (unit vector method)

docker部署redis集群

1、项目准备与新建

谷歌开始卷自己,AI架构Pathways加持,推出200亿生成模型
![[micro service sentinel] degradation rules slow call proportion abnormal proportion abnormal constant](/img/4d/4d4424b609a3c0cd36c5c79daa8861.png)
[micro service sentinel] degradation rules slow call proportion abnormal proportion abnormal constant

元透实盘周记20220627

Qingscan use

three. JS domino JS special effect

发现一款 JSON 可视化工具神器,太爱了!

pytorch_ grad_ Cam -- visual Library of class activation mapping (CAM) under pytorch
随机推荐
Don't be brainwashed. This is the truth about the wages of 90% of Chinese people
STM32入门介绍
人群模拟
Getting started with Scala_ Immutable list and variable list
Cvpr2022 | pointdistiller: structured knowledge distillation for efficient and compact 3D detection
Why pass SPIF_ Sendchange flag systemparametersinfo will hang?
学习太极创客 — MQTT(八)ESP8266订阅MQTT主题
解决cherry pick提交报错问题
Hot discussion: what are you doing for a meaningless job with a monthly salary of 18000?
清华&华为等 综述 | 语义通信:原则与挑战
Dameng database installation
pytorch 23 hook的使用与介绍 及基于hook实现即插即用的DropBlock
Yalm 100b: 100billion parameter open source large model from yandex, Russia, allowing commercial use
元透实盘周记20220627
lodash get js代码实现
使用命令行安装达梦数据库
Paddlepaddle 20 implementation and use of exponentialmovingaverage (EMA) (support static graph and dynamic graph)
Precautions for using sneakemake
1、项目准备与新建
C language -- Design of employee information management system