
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
gaoyia-parse
Advanced tools
1.2.0 修复了一些历史遗留问题
关于组件的一些说明
关于组件的一些说明:https://ask.dcloud.net.cn/article/36531
本组件修复自官方uParse
支持 Html、Markdown 解析,Fork自: mpvue-wxParse
,如果是PHP推荐结合https://github.com/phith0n/XssHtml使用 $this->m_dom = new DOMDocument();
| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| userSelect | String | text | none,text,all,element是否可选可复制 |
| imgOptions | Object | 参照组件源码和uni.previewImage文档 | 把previewImage的选项拿出来 |
| loading | Boolean | false | 数据加载状态 |
| className | String | — | 自定义 class 名称 |
| content | String | — | 渲染内容 |
| noData | String | 数据不能为空 | 空数据时的渲染展示 |
| startHandler | Function | 见源码 | 自定义 parser 函数 |
| endHandler | Function | null | 自定义 parser 函数 |
| charsHandler | Function | null | 自定义 parser 函数 |
| imageProp | Object | Boolean |
node 对象及解析结果 results 对象,例如 startHandler(node, results)| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| mode | String | 'aspectFit' | 图片裁剪、缩放的模式 |
| padding | Number | 0 | 图片内边距 |
| lazyLoad | Boolean | false | 图片懒加载 |
| domain | String | '' | 图片服务域名 |
| 名称 | 参数 | 描述 |
|---|---|---|
| preview | 图片地址,原始事件 | 预览图片时触发 |
| navigate | 链接地址,原始事件 | 点击链接时触发 |
<template>
<div>
<u-parse :content="article" @preview="preview" @navigate="navigate" />
</div>
</template>
<script>
import uParse from '@/components/gaoyia-parse/parse.vue'
export default {
components: {
uParse
},
data () {
return {
article: '<p>html代码,具体参见https://github.com/gaoyia/parse/tree/1.0.7/parse-demo中的demo</p>'
}
},
methods: {
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
}
}
}
</script>
//在APP.vue中引入,否则样式不能生效
<style>
@import url("/components/gaoyia-parse/parse.css");
</style>
先将 markdown 转换为 html 即可
npm install marked
import marked from 'marked'
import uParse from '@/components/gaoyia-parse/parse.vue'
export default {
components: {
uParse
},
data () {
return {
article: marked(`#hello, markdown!`)
}
}
}
FAQs
uParse修复版
We found that gaoyia-parse 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.