I would like to have a clean main.js and for this I want to move the directives into an external file. That is, to do something like and in an external file My version of course does not work, how to do it correctly Answer define them in a separate file like : then import them in main.js and loop
Tag: vue.js
How to display and hide the underline based on user clicks?
i have one component which is responsible for register [My-page]1,when user clicks on Login heading the signup underline should hide(means unvisible),and if the user clicks on Signup heading then the login underline should unvisible and displays the signup underline ,How to acheive this thing please help me.. Register.vue Answer You could just toggle a class.
Vue.js on render populate content dynamically via vue.router params
AS title sates, I don’t so much need a solution but I don’t understand why I’m getting the undesired result; running v2 vue.js I have a vue component in a single component file. Basically the vue should render data (currently being imported from “excerciseModules” this is in JSON format). IT’s dynamic so based on the url path it determines what
Using VAutocomplete from vuetify with render function (scoped slot)
Am trying to use the Autocomplete component inside a render function. When I try to use the scopedSlots of the component it won’t work for me. My code: I tried using the answer on this post Vuetify VMenu with render function The answer when I try it works however when I apply it to the Autocomplete it isn’t working for
Replace space with new line in vue js
I am trying to replace the spaces between the name to new line in vuejs but I am not able to achieve it. Please help me find where I going wrong. Right now the names are showing as but I want it to display as Below is the code. Answer You could do this entirely in CSS with word-spacing set
How to get options when user clicks on the More icon in vue.js?
i have an icons.vue component in that it will contain several font-awesome icons,when i click on more icon(3 dots[last icon in my component]),it should display some options like This image ,i am showing my icons imageplease help me How to acheive this thing icons.vue Answer I haven’t done much with Font Awesome, so I built an example of a possible
name of object within payload javascript
I have this payload. I’m trying to use Vue to set the values in the state using I realise one of my payload.val need to be the name of the value and not the name itself. How can I reference this correctly? My state looks like this: Edit: Spelling Answer As per the Vue documentation (Vue.set Documentation Link), first parameter
Currency Converter function in Vue3
I’m trying to implement a convert() function in a Vue3 project. I have a functions.js file to store some “global” basic functions I’m calling the function inside a component like this But it doesn’t work properly, I only get a pending Promise result… Can anybody tell me what I’m doing wrong? I’m learning Vue and JS…. Answer There is two
using V-for loop with filtered data set
I am filling values in a table using the code below in my ‘castData’ I have 15 items but I only want to return the ones that include “Sinto” Is there a way of applying this filter. I’ve tried appending .includes(“Sinto”) after the first castData with no luck. Answer One way would be to manipulate your castData before you pass
How Do I Use an Import Function in a Vue 3 Template?
In a Vue 3 project, I have the following setup. There is a separate stuff.ts file with some helper functions in it and I want to use it in my template. As far as I can tell, the function is properly imported and it’s defined when I log it in onMounted(). But when I click the link and try to