Skip to content

Vue using wrong component when there're global and local components with same name but registered with different naming conventions #4434

@jiangfengming

Description

@jiangfengming

JSFiddle: http://jsfiddle.net/fenivana/3y7hzwg8/

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
  </head>

  <body>
    <div id="app">
      <x-foo/>
    </div>

    <script>
    Vue.component('x-foo', {
      template: '<div>global foo component will be used</div>'
    })

    new Vue({
      el: '#app',

      components: {
        XFoo: {
          template: '<div>local foo component won\'t show</div>'
        }
      }
    })
    </script>
  </body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions