Skip to main content

Questions tagged [vue-props]

For questions specific to the usage of the "props" property within the Vue.js framework. When using this tag also include the more generic [vue.js] tag.

vue-props
0 votes
0 answers
45 views

Vue 3: Isn't the value of a component's prop that's bound to ref in the parent component updated immediately?

I'm using Vue3's Composition API in a project that injects HTML code from a webpage (that's in my domain) into another webpage. I've made a simplified version of the real project's code base in this ...
sweet-pineapple's user avatar
0 votes
1 answer
188 views

Emitting data from child to parent component in Vue js

I am trying to emit data from child to the parent component but for some reason its not showing me, although I have console logged the emit and its working. Emit is being triggered but in the parent ...
Ali Haider's user avatar
1 vote
1 answer
494 views

Can't pass object prop to vue 3 web component

I am trying to pass an object prop to a vue3 web component. My web component: <script lang="ts"> import { type Ref, ref, type PropType } from "vue"; export default { props:...
Or Bezalel's user avatar
1 vote
1 answer
45 views

Elements doesn't react to reactive props being changed

I have this code for a "Show Code", which will render the Code Snippet with different props based on the language selected by the user on the Code Header (working fine). image here <...
Sophia Rezende's user avatar
0 votes
1 answer
82 views

Type disabled problem in WebStorm about Vue3 Props

declare Props import { ExtractPropTypes, PropType } from 'vue' export const Props = { ocrName: { type: String as PropType<string>, default: () => 'Nicky', }, age: { type: ...
卢方舟's user avatar
-1 votes
1 answer
792 views

How to make a slot with v-for loop Vue js 3?

I'm expecting to make a v-for loop with slot in a child component. How can I pass the data looped to the child component ? The data uses a table html template. // parent component <template v-...
john's user avatar
  • 25
3 votes
1 answer
3k views

using props in computed (vue)

I have this simple 2 component vue app : (nuxt, composition api and ts) Parent : <template> <input type="text" v-model="txt"> <Child :txt="txt">&...
moxyom's user avatar
  • 33
0 votes
0 answers
35 views

The requested module '/path' does not provide an export named file.json

I'm expecting to render a json file in a Vue js app, but I'm getting an error The requested module '/path' does not provide an export named file.json. Even though the file exists and is with a correct ...
john's user avatar
  • 25
0 votes
0 answers
55 views

How to manipulate checkbox state from parent (via props) and inside children component (state management in vue components)

Every time I need to build a filter in vue, I run into the same problem. I have an overall filter state which I currently manage in a composable. (In the old days it was vuex). The filter includes ...
Merc's user avatar
  • 4,482
-1 votes
2 answers
44 views

Props not rendering in child component

I am trying to pass an error message to child component but it is not rendering it. Hard coded message is displayed only. enter image description hereenter image description hereenter image ...
Anupam Kumar's user avatar
0 votes
2 answers
2k views

Nuxt 3 props value not receiving first time on mounted method

I am working on nuxt 3 and I have an issue with props. I am passing one object from the parent component to the child component using props but when I console those props then the object seems blank ...
Kishan Bhensadadiya's user avatar
0 votes
1 answer
384 views

Vue: How to merge object props with default values

I want to set an object title as a prop with type and text inside. As a default, I want to set only the default value for type to be h2. When title: {text: 'Some text'} is passed as props, I want to ...
user16589580's user avatar
1 vote
1 answer
93 views

How to pass data (array and number in this case) as a prop to another route in vue?

So i have a routing set up in my Vue application and i have a HomeView view and a CheckoutView view and i want to pass the data as a prop from HomeView ("/") to CheckoutView ("/checkout&...
russelhd's user avatar
3 votes
2 answers
1k views

Default props in Vue 3 composition api are undefined (TS)

If I don't pass a value, the prop is just undefined, instead of taking the default value. For example switchView and activeView. I have defined the props like this: interface Props { config: { ...
Bushima's user avatar
  • 107
1 vote
3 answers
109 views

Items arrive as undefined at child component

using the quasar framework with Vue 3, I am experiencing the following issue: Whenever I try to pass variavles/objects/arrays or whatever from a component to another, regardless of what methos I use (...
Ghazal Nikmanesh's user avatar

15 30 50 per page
1 2 3
4
5
33