Skip to main content

All Questions

-1 votes
1 answer
85 views

Blank background-image in vue.js

For a website, i want 70% of the page to be covered with an image. However the image is just blank. I use Vue.js as my frontend. Here is the code that results in a blank space: <script setup lang=&...
Clyon97's user avatar
  • 59
0 votes
2 answers
2k views

Vue 3 composition API pass array props through many children

I need to pass an array from component A (App.vue) through component B to component C. What I do is this (this first step works, just read it to understand): // A.vue <script setup> import B ...
grimoiredark's user avatar
1 vote
4 answers
4k views

Why doesn't the component tag in Vue3 work properly for dynamically rendering components?

I'm just learning Vue and trying to learn dynamic rendering using the component tag. What is the problem with this code? No errors are displayed in the console, but clicking on the buttons still does ...
mrcrazyog's user avatar
3 votes
2 answers
5k views

How to clear "Slot 'default' invoked outside of the render function" warning? Vue3, Composition API

The full warning message: [Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render ...
Cin88's user avatar
  • 513
1 vote
4 answers
449 views

Setting input attributes with props and <script setup>

Is it possible to set a form input type using a prop? The below does not seem to work, any others ways to do this? For example <script setup> defineProps({ InputType: String, InputId: String,...
sgledhill's user avatar
1 vote
2 answers
1k views

Can I import a component in Vue.js with path based on prop?

I am using the Material design Icons library for Vue.js. This library contains a folder and every icon is a single file component in that folder. I have another component, ToolbarButton, that has a ...
Štěpán Žák's user avatar
1 vote
1 answer
1k views

How to create a SetTimeout for a message alert component in Vue 3 Composition API?

I am getting started with Vue. I am struggling to create a SetTimeout for a message alert component. My component looks like this: <script> export default { name: "Message", ...
Victor Martins's user avatar
1 vote
1 answer
374 views

Vue Script setup in build imports not accessible

My Problem is when I use setup I can't access it in normal script but only after I build the application in Dev mode anything works fine. In this example, I can't access this.authStore in my logout ...
Maximilian Flechtner's user avatar
2 votes
2 answers
6k views

How to get the route parameter in the VueJs 3 composition Api

I need a route parameter in a VueJS componente. For example the 42 in example.de/page/42. // router // ... { path: '/pages/:id', name: 'pages', component: () => import('../...
Max Pattern's user avatar
  • 1,718
2 votes
1 answer
1k views

Vue.js composition API <script setup> - how to two-way bind props

I am struggling to find a way how to create two-way props binding between parent and child components using Vue.js3. Below you can find an example of my code. Unfortunately, the "emit" ...
bakis's user avatar
  • 685
-1 votes
1 answer
474 views

How to scrollIntoView in vue composition api that use script setup?

I have a parent app(parent.vue) that emit value from child app(MainMenu.vue) that used to scroll in spesific pageview by id in parent app, but when i run it give the error message TypeError: document....
cahya faisal reza's user avatar
3 votes
1 answer
1k views

Vue - Why setup with reactive when you can do it easily with data option?

I am currently building a login for a Vue app. In a tutorial (02/2021) I see that the colleague creates a setup method and imports a Vue reactive object into the component. Just to collect the form ...
Max Pattern's user avatar
  • 1,718
0 votes
2 answers
2k views

Changing prop of component in vue.js with composition API

How can I change the prop value of a component and notify these components about the change? Parent.vue <script setup> import Child from './Child.vue' const finished = ref(false) function ...
Jonas's user avatar
  • 477
5 votes
3 answers
7k views

Change ref of the parent from child component using Vue 3

I have a child component called Navbar. A logout is an option in the Navbar. <a @click="(event) => {event.preventDefault();}"> Logout </a> I have imported this Navbar into ...
Mishen Thakshana's user avatar
1 vote
1 answer
2k views

Vue 3: How to get boolean data from parent (using <script setup>) into child?

Firstly, I know this is probably a SUPER easy question, but I've been struggling for an hour and half and I'm kinda done with that. First vue project ever, so I've never had 2 components talk to each ...
Myzwer's user avatar
  • 49

15 30 50 per page