I’m quite new with Vue, and I’m trying to lazy load a Component, I’m getting this error which I don’t understand, there should probably be a syntax error. Here’s the code: The Modal Comp is just a simple h2 and a p with a red border (I already tried the same code without lazy load, and it works fine). Here’s
Tag: vuejs3
Vue3 – How do I pass through a variable name on a @click function?
I have a button that activates the raiseStat() function. I want to pass through the name of an existing variable so that a function can then modify that specific variable. The button: The data I want to modify: The function: When I console.log the variable within the function it says ‘1’ which makes sense, I’m passing through the value of
How to add files from file input into array in Firefox browser?
(I’m using vue 3) I’m adding files from input file to array, then I conditionally render these file names. All working good on Chrome. Problem is when using Mozilla Firefox. In this browser array of files is overrided by last added file, for example: add file-1 || output: file-1 add file-1 and next file-2 || output: file-1 file-1 (duplication). There
Prop default gets overwritten in all mount-instances as soon as prop is passed once [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 7 months ago. Improve this question
how can i use variable declared inline in vue js?
I’m working with Vue.js (version 3) and I wanted to do something like this: but Vue returns the error: Since, as I suppose, he’s looking for item in data, where I created the Vue app. Is there anyway to solve this issue? Maybe some workaround to obtain the same effect? Answer It’s not recommended to use v-if and v-for on
How to use source images dynamically in :src in Vuejs
I’ve tried everything I found on Google, none of they worked for me. Basically, what I’m trying to do is passing an object through a v-for to another component like that: This representante variable is the object i’m passing. It has a imagem property that contains the name of the image I need. IMPORTANT: the images are in the public
Mounting a Components Library in Vue 3
I am new to Vue.js and trying to migrate a Vue.js 2 migration to Vue.js 3. I have read the Vue.js instructions on how to that carefully; however, the application that I need to migrate contains a Component Library out of Vue.js 2 components that I need to mount in the migrated app aswell. This is the Vue.js 2 main.js
Dynamic Routing for Dynamic Components in Vue3
A dynamic component with Dynamic Routing is needed for me in Vue3. I wanted to render the component which is coming from the params (path named id) from the router.ts As you can see here in router.ts I have a dynamic parameter named as id. I wanted the same component to be rendered with the same name. For example: If
Rendering variables from async functions in VueJs
I’m pretty new to VueJs. My intention is to create a simple application that extracts the text from a wikipedia page and renders it on a button press. Code Errors and But all the console.logs work properly when the button is pressed Answer try adding return statement for data
Can I define nested component without creating new file?
What I want: Parent.vue I wanted to make very small dedicated component for one page. It looks pretty good. But it doesn’t work. I don’t want to make a new file and use export default. and also don’t want register it globally. Is there no way to create component like this? ===== answer: main.js it works. Why… Answer Your code