diff --git a/src/compiler/compile.js b/src/compiler/compile.js index 90087939119..953f2ccbb4c 100644 --- a/src/compiler/compile.js +++ b/src/compiler/compile.js @@ -261,10 +261,16 @@ export function compileRoot (el, options, contextOptions) { }) if (names.length) { var plural = names.length > 1 + + var componentName = options.el.tagName.toLowerCase() + if (componentName === 'component' && options.name) { + componentName += ':' + options.name + } + warn( 'Attribute' + (plural ? 's ' : ' ') + names.join(', ') + (plural ? ' are' : ' is') + ' ignored on component ' + - '<' + options.el.tagName.toLowerCase() + '> because ' + + '<' + componentName + '> because ' + 'the component is a fragment instance: ' + 'http://vuejs.org/guide/components.html#Fragment-Instance' )