question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document should mentioned MUST define Component NAME when it use itself in .vue file

See original GitHub issue

What problem does this feature solve?

https://github.com/nuxt/nuxt.js/issues/3854#issue-357627623

https://github.com/vuejs/vue-class-component/issues/267#issue-357654876

What does the proposed API look like?

please add this to document

MUST define component name in .vue file for nested use

<template>
  <div class="hello">
      <span>{{pro.name}}</span>
    <Tree v-for="(p,i) in pro.child" :key="i" :pro="p"></Tree>
  </div>
</template>

<script>
  import Vue from 'vue'
  import Component from 'vue-class-component'
  @Component({
    name:'Tree', // MUST BE DEFINED !
    props:{
      pro:Object
    }
  })
export default class Tree extends Vue{
  }
</script>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sodateacommented, Sep 6, 2018

The link points to Recursive Components, not Circular References Between Components.

0reactions
ZenLiuCNcommented, Sep 6, 2018

get that ,thank you for your patience~

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does the vue.js component require a name option?
When registering a component, its ID is required, but Name is not. As Vue's Component Documentation says: Registration also automatically ...
Read more >
Rule proposal: `require-component-name` · Issue #265 - GitHub
Please describe what the rule should do: This rule warns you if the component's name property is undefined. What category of rule is...
Read more >
Components Basics - Vue.js
Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. It's common for an...
Read more >
Vue js Single File Components. Vue CLI. And example of how ...
You can see that names of components are typed by dashes. So the name of component calling form is depend on how you...
Read more >
Creating our first Vue component - Learn web development
The <template> section of your App.vue file should now look ... With these props defined inside the component object, we can now use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found