Skip to content

Commit

Permalink
docs: 更新 transformElement 示例代码 (#8461)
Browse files Browse the repository at this point in the history
img ===> image
  • Loading branch information
Teemwu authored Jan 7, 2021
1 parent e8b469c commit f9a33c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion versioned_docs/version-3.x/html.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ HashSet 中包含的 HTML 标签可以自动闭合,且不能被嵌套。
```js
// 给所有 img 标签添加 aotu 类
Taro.options.html.transformElement = (el) => {
if (el.nodeName === 'img') {
if (el.nodeName === 'image') {
el.setAttribute('class', 'aotu')
}
return el
Expand Down

0 comments on commit f9a33c0

Please sign in to comment.