Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: domPropsRE(regexp) can't correctly match key with uppercase letter #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/zh/renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ h('input', {
如上代码所示,我们已经实现了关于 `class`、`style` 的处理,所以接下来我们要处理的就是 `VNodeData` 中除 `class` 和 `style` 之外的全部数据,当然也要排除 `VNodeData` 中的 `target` 属性,因为它只用于 `Portal`。处理方式很简单,我们为 `mountElement` 函数添加如下高亮代码:

```js {1,18-24}
const domPropsRE = /\[A-Z]|^(?:value|checked|selected|muted)$/
const domPropsRE = /[A-Z]|^(?:value|checked|selected|muted)$/
function mountElement(vnode, container, isSVG) {
// 省略...

Expand Down