mirror of
https://gitee.com/vuejs/vue.git
synced 2024-11-30 02:57:43 +08:00
early return in vdom update modules
This commit is contained in:
parent
dc183eda1f
commit
95a9282b20
@ -14,6 +14,9 @@ const xlinkNS = 'http://www.w3.org/1999/xlink'
|
||||
const isXlink = name => name.slice(0, 6) === 'xlink:'
|
||||
|
||||
function updateAttrs (oldVnode, vnode) {
|
||||
if (!oldVnode.data.attrs && !vnode.data.attrs) {
|
||||
return
|
||||
}
|
||||
let key, cur, old
|
||||
const elm = vnode.elm
|
||||
const oldAttrs = oldVnode.data.attrs || {}
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { updateListeners } from '../../vdom/helpers'
|
||||
|
||||
function updateDOMListeners (oldVnode, vnode) {
|
||||
if (!oldVnode.data.on && !vnode.data.on) {
|
||||
return
|
||||
}
|
||||
const on = vnode.data.on
|
||||
const oldOn = oldVnode.data.on || {}
|
||||
updateListeners(on, oldOn, (event, handler, capture) => {
|
||||
|
@ -1,4 +1,7 @@
|
||||
function updateProps (oldVnode, vnode) {
|
||||
if (!oldVnode.data.props && !vnode.data.props) {
|
||||
return
|
||||
}
|
||||
let key, cur, old
|
||||
const elm = vnode.elm
|
||||
const oldProps = oldVnode.data.props || {}
|
||||
|
@ -29,6 +29,9 @@ function toObject (arr) {
|
||||
}
|
||||
|
||||
function updateStyle (oldVnode, vnode) {
|
||||
if (!oldVnode.data.style && !vnode.data.style) {
|
||||
return
|
||||
}
|
||||
let cur, name
|
||||
const elm = vnode.elm
|
||||
const oldStyle = oldVnode.data.style || {}
|
||||
|
Loading…
Reference in New Issue
Block a user