Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
83 views

we're using VueX 3.6 with Vue 2.7. The project is old We can't go to Vue3. For new components, we're trying to use script/setup for new components. How to use VueX mapper functions in this situation? ...
Md. A. Apu's user avatar
  • 1,318
1 vote
1 answer
43 views

given a child component Foo.vue <template> ... <button @click="emit('bah', ...)">...</button> ... </template> <script setup> const emit = defineEmits(['...
Jay Edwards's user avatar
  • 1,025
2 votes
2 answers
63 views

I have an issue that needs to be resolved. a.ts const open = ref<boolean>(false) h(RowAction, { open: open, onDelete: () => { Data.remove().then(() => {}).catch(() => {})....
MewTheDev's user avatar
1 vote
0 answers
575 views

I am using Vue 3 (Composition API) with Typescript. Here is my code. <script setup lang="ts" generic="T"> import { ref, Ref } from "vue"; const props = defineProps&...
Arkandias's user avatar
  • 131
2 votes
0 answers
188 views

I am having issues with my store not resetting properly when locally developing, this is (i suppose) because of Vite HMR in my Nuxt3 application. My store is defined as so: import { defineStore, ...
Dennis's user avatar
  • 3,860
1 vote
0 answers
87 views

I have a page template that contains the following sub-component: <template> <ManageVacanciesAndMatchesTabVacancies @loading-data="setIsTabDataLoading" /> </template> And ...
Dennis's user avatar
  • 3,860
4 votes
1 answer
3k views

I am trying to use the v-model directive on two input elements. However, I am getting the following error: duplicate model name "modelValue". Below I show the code that generates this error: ...
William Pineda MHA's user avatar
0 votes
1 answer
91 views

I was wondering why this works: <template> <h1> You are on page {{ $route.params.page }}</h1> </template> but when I try to access the param from script setup as in <...
dhiaagr's user avatar
  • 15
0 votes
1 answer
82 views

I am creating a vue.js3 SFC application where the list component is used multiple times. The aim is to produse a separate lists of items in each component from SingleList.vue. I wanted to use a v-for='...
Anna's user avatar
  • 15
0 votes
1 answer
215 views

I am trying to pass a prop between sibling elements (a card and an input) and so far it has not been successful. I have a button nested within a card element. When someone is pressing a button, I emit ...
Anna's user avatar
  • 15
1 vote
1 answer
426 views

I have a vue3 app, in which I'd like to keep using the standard composition api style. Unfortunately, RevoGrid doesn't seem to like it. RevoGrid works with an options api style , but the equivalent ...
Shane Petroff's user avatar
1 vote
1 answer
50 views

I have a generic component linked to a computed value to simulate routing. There is a current page property, and three links, whenever the user clicks on a link, that property gets updated via the ...
dhiaagr's user avatar
  • 15
7 votes
1 answer
14k views

The examples given for defineModel in the Vue docs all relate to uses for data inputs. I was wondering if this construct could also be used elsewhere, thus avoiding the somewhat cumbersome props/emit ...
quilkin's user avatar
  • 1,499
1 vote
1 answer
4k views

In my vue app, I want to watch route changes, and then react to the change. Here is an example where I simulate a route change. <script setup> import { ref, watch } from 'vue' import { ...
Arti-Art's user avatar
1 vote
1 answer
72 views

Say I have an SFC component with a save emit: // ChildComponent.vue const emit = defineEmits<{ save: [data: { new: Row[]; removed: Row[] }]; }>(); If I want to use the new & removed in a ...
Ansis Spruģevics's user avatar
0 votes
1 answer
36 views

I want to track the state of several buttons without having a tracker variable and function for each. So I want to pass a parameter through to a computed property, something like this: <div class=&...
Andy's user avatar
  • 2,160
-1 votes
1 answer
219 views

i would want to access the props value from another props validator. Here is my code: <script lang="ts" setup> import { PropType } from 'vue'; import { iStep } from '@/...
user3699170's user avatar
-1 votes
1 answer
93 views

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
1 answer
159 views

Funnily the Vue js documentation is highly suggesting to use the <script setup> syntax of the Composition API, the problem with it is that the documentation is very basic and it interferes with ...
domjanzsoo's user avatar
2 votes
1 answer
526 views

So I have an existing project where I wanted to add testing suite with jest + vue testing library. Added necessary libs and configs and jest basic calc sum test passes. After that importing basic vue ...
Perp's user avatar
  • 403
0 votes
0 answers
33 views

I'm having trouble with getting current route name in App.vue in Vue3 script setup. I would like to get the current route name and check if it matches some conditions. The route is /login. and the ...
Kenta's user avatar
  • 1
0 votes
1 answer
1k views

In this project, there's the user which is a js object, like this: const user = { "ID": id, "NAME": name, "EMAIL": email, ... } And here's the router on VueJS: { ...
user avatar
1 vote
0 answers
1k views

I'm using TipTap with Vue3, Composition API and typescript (script setup) and I've faced a problem. There is no documentation how to implement https://tiptap.dev/examples/interactivity vue ...
Stepan Berkunov's user avatar
2 votes
1 answer
3k views

I defined a props: interface Props { formList: BaseSearchFormListItemType[], inline?: boolean searchBtn?: { show?: boolean text?: string type?: string size?: string } } const ...
林嘉裕's user avatar
1 vote
2 answers
735 views

I get the following warning in the browser when I try to reference the slot props. What am I missing? [Vue warn]: Property "disabled" was accessed during render but is not defined on ...
fsdevland's user avatar
0 votes
0 answers
173 views

Want to build a simple CRUD App to understand the Basics. I am using Vue3 + Pinia Store + API Platform. What i have: StudentsPage: here, i fetch Data from my API and display the Data in a Table (...
Tom Yeldim's user avatar
2 votes
1 answer
2k views

I've been learning Vue 3 for the past month or so and have gotten quite far but I can't fix this no matter what I've tried. I know I'm losing reactivity but I can't figure out how and it's driving me ...
Todd Hammer's user avatar
1 vote
0 answers
751 views

<script setup lang="ts"> import { computed } from 'vue'; type Props = { duration?: '0'|'0.5'|'1'|'1.5'|'2'|'2.5'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10', //^^^^^^^^^ ESLint: Prop 'duration'...
Mohammad A. Apu's user avatar
0 votes
1 answer
789 views

The component I want to use with a custom name is defined as: @/components/MyCustomName.vue <template lang=""> <div>I'm here</div> </template> <script> ...
Eric G's user avatar
  • 796
1 vote
1 answer
852 views

I'm kinda new to composition API in vue3 and I'll be glad if someone could explain to me why... this works: <template> <h1>{{ foo }}</h1> </template> <script setup> ...
Douglas Jordão's user avatar
1 vote
0 answers
358 views

I'm using vue-test-utils to test my components. They are written in composition API with <script setup> tag. I'm facing some difficulties when spying the functions to test if they were called or ...
Gabriella Tavares's user avatar
0 votes
1 answer
530 views

I'm just following the tiptap docs trying to implement a floating menu in vue 3. Im using script setup and im not sure if thats the issue, but in either case im struggling to get this to work. The ...
Samuel M. Bednarz's user avatar
0 votes
1 answer
527 views

I have a nuxt 3 component which fails to load dynamic image that i'm getting from a specific URL(auth0 images). My template looks like so: <template> <img class="h-28 w-28 rounded-...
George Marwanqana's user avatar
4 votes
1 answer
3k views

I have only seen examples of one onMounted() per one component. I'd like to use onMounted() for each feature. Is there any problem? MyComponent.vue <script setup> import { onMounted } from 'vue';...
decoy's user avatar
  • 171
0 votes
2 answers
2k views

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
0 votes
1 answer
624 views

I am using this lib simple-vue-camera. Got it to work properly,but i wish I could use it with script setup. I cant access the snapshot method of the camera.. The problem i guess is in the 'const ...
vapdev's user avatar
  • 67
1 vote
2 answers
625 views

Here's a reproduction link: https://stackblitz.com/edit/node-c6mn17?file=src/components/Test.vue I want to be able to use reactive state from that store using setup in Vue 2.7. I export a Vuex store ...
Cesar Martinez Dominguez's user avatar
1 vote
4 answers
4k views

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

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
  • 523
0 votes
1 answer
559 views

I have created a form component in Vue 3 where I am trying to bind a reference object to input elements and from my understanding of two-way binding and how Vue behaved for my past works, I expected ...
Muhtasim Fuad Showmik's user avatar
2 votes
2 answers
4k views

I'm building an application in Vue 3 using Script Setup and Quasar where the user can add new input boxes by pressing the "New Space +" button. It's super annoying to have to click the ...
HumanHickory's user avatar
1 vote
4 answers
456 views

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
1 answer
521 views

I have this Vue 3 SFC <template> <div> Home component </div> </template> <script> export default { name: 'Home', icon: 'house-icon' } </script&...
Tolbxela's user avatar
  • 5,219
1 vote
2 answers
1k views

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
2 votes
1 answer
947 views

im trying to write tests with Vitest for my vue3 component this is my component code: <script lang="ts" setup> import { reactive, computed, ref, onMounted } from 'vue' import { ...
Andrew Crescencio's user avatar
0 votes
2 answers
536 views

Using Vue3+typescript, I'm trying to use a library called gtag-vue to send google analytics events to my account. The idea is that in a Vue component, when the user clicks a div, I'll send a custom ...
lpares12's user avatar
  • 4,053
0 votes
1 answer
2k views

In vue 3 composition API im trying to do the following: <script setup lang="ts"> import { computed } from "vue"; // vue doesnt like this line (the export seems to be the issue) export ...
Rezzy's user avatar
  • 334
5 votes
0 answers
697 views

We want to use vue composition api using the script setup in our company. How would one write unit tests for a script setup component? We're using Vue 2.7.14 and vitest if that matters.
Lucas Venturini's user avatar
0 votes
1 answer
197 views

I have a child component that takes in some props to decide for a state: export interface IProps { selected?: boolean, answered?: boolean } const {selected, answered} = defineProps<...
NullOrNotNull's user avatar
1 vote
1 answer
1k views

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