Skip to content
Advertisement

Tag: vue.js

Importing a function in Vue 3 setup

Currently, im trying to call a throttle/debounce function in my Vue component, but every time it’s called a Uncaught TypeError: functionTD is not a function si throw here is my code. useThrottleDebounce.ts and this is when it’s called inside setup in my component Answer The issue is that useThrottleDebounce doesn’t return a function, therefore functionTD is not a function:

Vuex 4, State is empty in component

I am trying to access subjects store state using this.$store.state.subjects inside my home component however it comes up as an empty array. Using console.log the only place I am able to see the state.subjects populated is if its in the mutation function. Anywhere else the console.log is empty. It seems to me that the state is not persisting from the

How to use Vue router query params in hash mode?

I would like to access URL params in Vue methodology, other than using window.location.href and parsing. router/index.js Answer The code you showed for logging the query params is correct so there is a problem with the route. To create a link in the template, use a <router-link>: To route programatically in the script, use this.$router.push (or this.$router.replace): When you log

print array in method in vue.js

I am very new to vue and I wanted to play around with methods a little. What I wanted to try was printing out an array of Strings and this is the method I tried to use: But I get errors because of i and s. I tried a few things but it always either says I didn’t define or

v-slot is always undefined in VueJS

Here is the problem. Root view: Grid component (container): And finally grid item component: I’m getting the error: GridItem.vue Uncaught (in promise) TypeError: Cannot read property ‘testData’ of undefined. I’m cracked my head trying to understand what’s going wrong. Need help, thanks for your time. Answer Get your slot props in Home component:

is it possible to use luminous in Vue.js?

I am trying to create photo website with vue.js and Laravel, and use luminous to magnify the photo when it is clicked. My photos are stored in AWS S3 bucket. My vue.js structure is like below. 1.PhotoComponent.vue this component is literally rendering each photo. 2.PhotoListComponent.vue this component is making a list of PhotoComponent.vue. There are three things that I have

Advertisement