I have this quiz in multiple choice format where users can select one option per question and submit their answers at the end. This example shows what I’m trying achieve: [Example code w3school][1] The problem I’m having is that selecting an option on a question de-selects any previous selection, meaning only one option can be selected for the entire quiz.
Tag: vuejs3
Object property UNDEFINED in VUE v-for
I have this object inside an array called places which contains 20 similar objects and im using v-for to get each objects data into a div, other properties work fine, but when it comes to the openingHours.text property, it gives an error of undefined you can check the images below for more clarity figure 1 figure 2 Answer Does every
Cannot read string value of an object returned by params
I am just a beginner working on the note app which uses Laravel and Vue. And now I am having trouble trying to read the string value of an object returned by params from router.js and received by message inside props of MyIndex.vue. While the I think the object had been received, when alerting the user with toast, the “this.message.message”
Pass selected index of object that resides outside of a v-for loop in Vue 3
I’m creating a simple shopping cart in Vue 3 for learning purposes. So far, I’ve set up everything from the products object to the addToCart() functionality, and everything works within a v-for loop. The problem is I need to display the product’s title within an alert that resides outside the v-for loop and I have no idea how to do
Vue3 – Ace Editor on v-model change
I am using Ace Editor with Vue3: It’s being initialized like this: Now, I want to automatically persist the value of currentRecord.prompt in my database on the backend. To do this, I was thinking of firing of a request to the backend every time the value of currentRecord.prompt was changed in the editor: The problem here is that the watch
Wait x seconds for new emitted value before triggering a function
I have a child component that emits a value, and in the parent I perform an axios call with this value each time it is emitted. My problem is that I want to trigger the axios call only if in x ms (or seconds) the child has not emmited another value in order to reduce the amount of calls I
Vue 3 Typescript define unknown array of object
I’m using vue 3 with quasar and I would to make a wrapper for q-table but how can I define rows without using any[]. It works like this but then whenever I use this component I’ll have to convert my object to unknown. Is there any better way? Or I should just turn off “no-explicit-any” and use any[]? Answer QTable.rows
Vue.js 3: Store videos offline in a Vue PWA
I am using Vue 3 with Typescript. I am trying to show a video in the PWA. It works online great but when i try it offline the video is not loading. I store the video in the assets folder and in the finished dist the videos are in the media folder. Thank you for your help. Answer I found
How to make onclick event to work only once in vue.js
this is the normal javascript code for calling onclick event only once: the trick for normal javascript is this: But, now I want this functionality in vue.js and my button in vue.js is like following: Can anyone suggest me how to call event exactly once in vuejs…. Answer Use the .once event modifier to handle the event only once: demo
How to mutate props in Vue3 and have the parent computed setter called
I know this is an anti pattern, but it would simplify things a lot. And furthermore I’m just curious if it’s possible. When I call test1() I get the following warning: Set operation on key “items” failed: target is readonly. and nothing else happens. When I call test2() items change within the child AND the parent, BUT the computed setter