Skip to content

Commit

Permalink
fix(renderer-patch):patchElement中使用prevData而非prevStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
liyangworld committed Jul 23, 2019
1 parent 7943c2c commit 8690273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/zh/renderer-patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ function patchElement(prevVNode, nextVNode, container) {

// 拿到 el 元素,注意这时要让 nextVNode.el 也引用该元素
const el = (nextVNode.el = prevVNode.el)
const prevStyle = prevVNode.data.style
const nextStyle = nextVNode.data.style
const prevData = prevVNode.data
const nextData = nextVNode.data

if (nextData) {
// 遍历新的 VNodeData,将旧值和新值都传递给 patchData 函数
Expand Down

0 comments on commit 8690273

Please sign in to comment.