Skip to content
Advertisement

Tag: vue.js

Vue 2 and NuxtJS – style child component from parent

I have a Nuxt.js project (so still using Vue 2) with these two components, I would like to override the child style from the parent, I discovered the ::v-deep pseudo selector but it doesn’t seem to be working. My label always appear as cornflowerblue instead of orange. Anyone has experienced this before ? PS: After I get that to work,

Infinite repeated while using v-for in vuejs

I have an API to get list of books, in each book I have author ID. I also want to get author name from that ID through another API (get author), so I use v-for to get items in list of book. Each item I call getAuthor(authorId) function but it repeats infinitely. Does anyone know what the reason is? My

How to use owl carousel in Nuxt?

I want to make script work on every page without that these page need loaded; I have owl caroussel script on my static folder, and i already put it in nuxt.config.js, here how i put it: And there is the script on my main-script.js: The caroussel work well on the page if the page is loaded, but if it come

How to dynamically import Vue 3 component?

According this article I would like to import component to view dynamically to my Vue 3 app. The code of the view looks like: Code does not throw any errors but I dont see the component on the page. If I use first import style it works. Am I missing somethig? Answer You need to use defineAsyncComponent in Vue 3

VueJS : Unhandled error with simple script

Still learning VueJS, I just wanted to know why when I click on my button my function selection doesn’t work. All the rest in the created() is fine and shows the correct , but in my methods section, just to show a console.log on a click event I have this error : [Vue warn]: Unhandled error during execution of native

Vue, adding/incrementing time in ‘xhxxm’ format

I’m trying to make a simple interface where a user can increment time using a number of options available in a list. I have it working to set the vue variable as the time that they click on (i.e. if they click ‘+30m’ then the variable reflects 30 However, I’d like to display the variable in the format of XhXXm

Does the store object in vuex fall through to leaf components?

Following the docs: https://vuex.vuejs.org/guide/mutations.html#committing-mutations-in-components and the video tutorial: https://scrimba.com/scrim/ckMZp4HN?pl=pnyzgAP it’s not clear (to me) whether store is visible in nested/child components present in the component that includes it. Answer From the docs you’ve linked (emphasis mine): You can commit mutations in components with this.$store.commit(‘xxx’), or use the mapMutations helper which maps component methods to store.commit calls (requires root store injection)

Advertisement