I have in an external JavasScript (sun.js) file a class like this : So I’m importing this class in one of my component And then I call my function testIfShining() in my mounted lifecycle : When I look at my console, I have the message log The function is working but I have an undefined value for the data this.text
Tag: vue.js
How to save vue-emoji-picker selected emoji to db together with text?
I need to save the emoji and text I added to the input with v-emoji-picker to the db. The emoji I clicked without a problem is displayed in the v-model. However, when I save the text with axios, the body itself appears, not the emoji alias. Doesn’t register in db either. I need to save the text and emoji as
How to delete many data in array if condition vue js
I have select many data and post to back end, it is succeed but after that i want to delete array data in front end without reload. I try with splice it is only delete one or two max is tow Here is my code after then i wont to delete all this baskets if checkbox is true i have
Enter key press on with Vue3
Have this code: I handle the focus perfectly, but want to run the method goToSlug() on key enter be pressed. It doesn’t fire the method. Answer Key presses are only registered on items that have focus. In order to make an element like a <li> tag focusable (which natively does not have that ability) you will need to add another
Vue doesn’t see updates of my object getting from vuex
I have an object in vuex that im getting on the page by getters, but vue see only first update of object. I collect the object stepwise so first it’s empty then i have commit that updates vuex state (setUser) and vue showing this new info on the page. But then i use one more commit (addInfo) and it’s works
How to display images from an array in vuepress or vuejs?
I have an array which looks like below: but when I try to print using the below code Only the questions are generated correctly but the images are not displayed properly, only the location gets printed as below and is highlighted in blue. Please help. Answer I didn’t use the function call. I directly used require keyword in the img
what can’t be passed by vue slot props?
In official react docs, It says the difference between ‘other libraries’s slot’ and ‘react’s props.children’ is as follows : This approach may remind you of “slots” in other libraries but there are no limitations on what you can pass as props in React. https://reactjs.org/docs/composition-vs-inheritance.html And it sounds like there are some things can’t pass through a ‘vue slot’. Is there
Customize the display in an input [Vue.Js]
I have an input that must contain values according to the selected checkboxes, and I would customize the display on the input according to the checked checkbox. I have initialized a watcher that updates the v-model of my input but the display is the following: my input : [Jhon,Eliott] While I would like to put a space in place of
How to import Library into Vue3 project
could someone help me import a library to my vue3 project so that I can use it in all components?… I’am trying to import ‘moments.js’ to my project Its installed with npm in my ‘main.js’ (entry) I import it like: but when I try to console.log(this.moment) from another component I get errors that this.moment is not a function Answer For
Why the function that inside the v-hover is called every times whenever hovering
Whenever hovering on the v-sheet, getBlueColor() function that is inside the v-hover is called. why it happened like that? exemple code And It is result after 5times hovering on the v-sheet (10) Call function func.getBlueColor Answer On top of what was told above, I do recommend the second part of my answer here to have a fully flexible styling (section