Skip to content

Tag: vuejs3

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…

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 compo…

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…

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 wha…