[bugfix] functional component shouldl inherit attrs (#2706)

This commit is contained in:
neverland 2019-02-09 09:51:18 +08:00 committed by GitHub
parent 4ea057c046
commit 683e6d5183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,15 @@ function install(Vue) {
Vue.component(camelize(`-${name}`), this);
}
const inheritKey = ['style', 'class', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
const inheritKey = [
'style',
'class',
'attrs',
'nativeOn',
'directives',
'staticClass',
'staticStyle'
];
const mapInheritKey = { nativeOn: 'on' };
function functional(sfc) {