refactor(runtime-core): adjust attr fallthrough behavior

BREAKING CHANGE: adjust attr fallthrough behavior

    Updated per pending RFC https://github.com/vuejs/rfcs/pull/137

    - Implicit fallthrough now by default only applies for a whitelist
      of attributes (class, style, event listeners, a11y attributes, and
      data attributes).

    - Fallthrough is now applied regardless of whether the component has
      explicitly declared props. (close #749)
This commit is contained in:
Evan You
2020-02-28 17:53:26 -05:00
parent 06d3447149
commit e1660f4338
4 changed files with 54 additions and 97 deletions

View File

@@ -214,7 +214,7 @@ export function resolveProps(
lock()
instance.props = props
instance.attrs = options ? attrs || EMPTY_OBJ : props
instance.attrs = attrs || EMPTY_OBJ
instance.vnodeHooks = vnodeHooks || EMPTY_OBJ
}