Skip to content
Advertisement

Tag: vue-component

Why can’t I access props within my component?

I’ve copied the Grid Component Example into a single-file component (Grid.vue). Within that component, I’m not able to access the columns prop. console.log(this.columns) always prints: [__ob__: Observer] to the log. Can someone tell me why? This works fine in their example on the page and in JSFiddle. Here’s my Grid.vue file: I’m using this component within another component like so:

Unable to import/export vuejs components

I have a folder like this. Classic and Modern are simple components with template, export default {} and a style. I am calling both inside index.js as: So, when I import this module as: I get this error Unknown custom element: – did you register the component correctly? For recursive components, make sure to provide the “name” option. I have

How to set data into nuxt.js nuxt-link?

I’m trying to pass data into nuxt-link but nuxt-link is just returning a 404 error when I click on the link. It doesn’t seem to be getting and loading the file…. The second 2 links that use :href and hardcoding works Answer Nuxt uses vue-router by reading off the vue-router documentation you’ll be able to achieve what you want. router-link

Check if props in vue.js component template exists

After tried many variations, I don’t know how to properly style a component’s slot or partial code within <template></template> section. Is there a way to check if props <counter :recent=”true”></counter> from parent level exists, so in a Counter.vue in section <template></template> i would show a special html markup for it ? === UPDATED === Answer Here the default value for

Watching parent with prop doesn’t update during for loop

I have 2 components – <my-component> and <grand-child-comp>. In my root there is a multidimensional object and my component watches it with prop. In Vue debugger, I can see that my-component is getting and watching accountTypes object successfully. However, when trying to use it in my-component’s template, it doesn’t work. Lastly, accountTypes object looks like: Answer The problem is you’re

Advertisement