当前位置:网站首页>Uniapp uses uparse to parse the content of the background rich text editor and modify the uparse style
Uniapp uses uparse to parse the content of the background rich text editor and modify the uparse style
2022-06-26 08:56:00 【@Winner】
This paper
In the use of uniapp When developing , Some news content cannot be avoided , It needs to be used in the background Baidu UEditor Upload some content with mixed graphics and text .
Download plug-ins
First , To DCLOUD The plug-in market will uParse This plug-in passes HBuilder X Download to your project ( Plug in links :https://ext.dcloud.net.cn/plugin?id=183.
Basic use
- For detailed methods, please refer to the plug-in documentation , I won't describe it in detail here .
<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>
modify uParse Original style
- If you want to change the style, use /deep/ Make mandatory modifications .
- uniapp It is usually used in App.vue Modify inside .
App.vue
<style scoped> @import url("/components/u-parse/u-parse.css"); /deep/ .wxParse{
margin: 10px auto; width: 90vw; padding: 20px 10px; } /deep/ .first{
text-align: center; padding-bottom: 5px; border-bottom: 1px solid #CDCDCD; } </style>
边栏推荐
- isinstance()函数用法
- [QNX Hypervisor 2.2用户手册]12.1 术语(一)
- 基于SSM的电脑商城
- 深度学习论文阅读目标检测篇(七)中文版:YOLOv4《Optimal Speed and Accuracy of Object Detection》
- Intra class data member initialization of static const and static constexpr
- The principle and function of focus
- 读书笔记:SQL 查询中的SQL*Plus 替换变量(DEFINE变量)和参数
- Drawing with MATLAB (2) -- color ring
- Use of PCL
- How to use leetcode
猜你喜欢

反爬之验证码识别登录 (OCR字符识别)

【程序的编译和预处理】

MPC learning notes (I): push MPC formula manually

【Unity Mirror】NetworkTeam的使用

Stanford doggo source code study

Yolov5进阶之一摄像头实时采集识别

Principle of playing card image segmentation

Object extraction_ nanyangjx

Reverse crawling verification code identification login (OCR character recognition)

Koa_ mySQL_ Integration of TS
随机推荐
Koa_ mySQL_ Integration of TS
What are the conditions for Mitsubishi PLC to realize Ethernet wireless communication?
How to correctly PIP install pyscipopt
Using transformers of hugging face to realize named entity recognition
MPC learning notes (I): push MPC formula manually
Matlab drawing checkerboard (camera calibration)
Detailed process of generating URDF file from SW model
Exploration of webots and ROS joint simulation (I): software installation
1.23 neural network
Koa_mySQL_Ts 的整合
1.20 study univariate linear regression
【云原生 | Kubernetes篇】深入万物基础-容器(五)
Yolov5进阶之二安装labelImg
Euler function: find the number of numbers less than or equal to N and coprime with n
uniapp用uParse实现解析后台的富文本编辑器的内容及修改uParse样式
基于SSM的毕业论文管理系统
Polka lines code recurrence
OpenGL display mat image
Using transformers of hugging face to realize text classification
Leetcode: array fast and slow pointer method