Skip to content

Commit

Permalink
更新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaoGongBra committed Dec 8, 2022
1 parent 06c201d commit a46142f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions components/HtmlView.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ type props = Partial<{
className?: string
/** 是否开启图片预览 */
previewImage?: boolean
/** 点击带有href的标签的回调 */
onLinkClick?: (href: string) => void
}>

/**
Expand Down
2 changes: 0 additions & 2 deletions components/HtmlView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const View = ({
// 是否是纯文本组件
const isTextComp = useMemo(() => !isText && children?.every?.(item => item?.props?.nodeName === 'Text'), [isText, children])

// console.log('View', props, isText);
return isText ? (
<TextPlatform
style={viewStyle}
Expand Down Expand Up @@ -288,7 +287,6 @@ export default function HtmlView({
try {
const { nodes, images: imgs } = getNodes(html)
setNodes(nodes)
// console.log('nodes', nodes);
images.current = imgs
} catch (error) {
console.error('html解析失败', error)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro-html-view",
"version": "1.0.8",
"version": "1.0.9",
"description": "支持渲染由富文本编辑器编辑的html文本内容,支持小程序、h5、ReactNative,复杂的内容可能并不能正确渲染",
"main": "index.js",
"author": "[email protected]",
Expand All @@ -14,6 +14,6 @@
},
"homepage": "https://github.com/ShaoGongBra/taro-html-view#readme",
"dependencies": {
"taro-tools": "^1.0.20"
"taro-tools": "^1.0.25"
}
}

0 comments on commit a46142f

Please sign in to comment.