
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
mpvue-wxparse-ht
Advanced tools
支持 Html、Markdown 转 Wxml 可视化,修改自: wxParse
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
loading | Boolean | false | 数据加载状态 |
className | String | — | 自定义 class 名称 |
content | String | — | 渲染内容 |
noData | String | 数据不能为空 | 空数据时的渲染展示 |
startHandler | Function | 见源码 | 自定义 parser 函数 |
endHandler | Function | null | 自定义 parser 函数 |
charsHandler | Function | null | 自定义 parser 函数 |
imageProp | Object | 见下文 | 图片相关参数 |
node
对象及解析结果 results
对象,例如 startHandler(node, results)
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
mode | String | 'aspectFit' | 图片裁剪、缩放的模式 |
padding | Number | 0 | 图片内边距 |
lazyLoad | Boolean | false | 图片懒加载 |
domain | String | '' | 图片服务域名 |
名称 | 参数 | 描述 |
---|---|---|
preview | 图片地址,原始事件 | 预览图片时触发 |
navigate | 链接地址,原始事件 | 点击链接时触发 |
npm i mpvue-wxparse
<template>
<div>
<wxParse :content="article" @preview="preview" @navigate="navigate" />
</div>
</template>
<script>
import wxParse from 'mpvue-wxparse'
export default {
components: {
wxParse
},
data () {
return {
article: '<div>我是HTML代码</div>'
}
},
methods: {
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
}
}
}
</script>
<style>
@import url("~mpvue-wxparse/src/wxParse.css");
</style>
先将 markdown 转换为 html 即可
npm install marked
import marked from 'marked'
import wxParse from 'mpvue-wxparse'
export default {
components: {
wxParse
},
data () {
return {
article: marked(`#hello, markdown!`)
}
}
}
v0.6 之后的版本样式文件需自行引入
打包时出错 ERROR in static/js/vendor.js from UglifyJs
参照以下配置使 babel 处理 mpvue-wxparse,或更新 UglifyJs 插件
// webpack.base.conf.js
{
test: /\.js$/,
include: [resolve('src'), /mpvue-wxparse/],
use: [
'babel-loader',
{
loader: 'mpvue-loader',
options: {
checkMPEntry: true
}
}
]
}
FAQs
基于mpvue-wxparse适用于cover-view的富文本解析器
The npm package mpvue-wxparse-ht receives a total of 0 weekly downloads. As such, mpvue-wxparse-ht popularity was classified as not popular.
We found that mpvue-wxparse-ht demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.