1,666 questions
3
votes
0
answers
128
views
pinia composition api 'this' type problem
I am using Nuxt 2 with Pinia Composition API. Through a plugin, I have added axios instances, etc., into PiniaCustomProperties.
const piniaPlugin = ({ $pinia, app }: { $pinia: any; app: any }): void =&...
0
votes
1
answer
44
views
How to create modal like macOS settings app
Here's a reference
I have an example structure that describes how I want this to look, but I don't know how to implement it.
Here is a structure example
<Modal ref="modal" @close="...
4
votes
1
answer
1k
views
Vue3 with Draggable - Nesting list - Reactivity
I try to make drag and drop list with Draggable plugin, but depend how i assing new value in watcher from component(second code block) that's responsible of nesting it work only in one way
Codesandbox ...
0
votes
0
answers
978
views
Vue.js 3 and Pinia store filled in async by API
I'm creating an application in Vue.js 3 + Pinia. I created an action that call - async function with await on axios call - an API to fill the whole store for a page, but don't work.
Are there any ...
0
votes
0
answers
207
views
How to update query on route change using Vue and Urql
I'm trying to find a way to update my query when the route changes (same component). The query is being selected using route meta data. Between Vue router's navigation guards, hooks, watching for ...
1
vote
1
answer
93
views
Why does this computed property fail to change in my Vue 3 app?
I am making the transition from Vue's Options API to the Composition API and for this purpose, I have put together a small Todo App.
In App.vue I have:
<template>
<div id="app">...
0
votes
0
answers
1k
views
how to access array of $refs in vue 3 composition api?
I created a dynamic form using Vue 3 that consists of five input text fields. Each input field should only accept a single-digit number. When a user enters a number in an input field, the focus should ...
0
votes
1
answer
671
views
Error implementing Navigation Guard in a Vue 3 + Quasar + TypeScript project
I am working on an application using the Quasar Framework along with Vue 3 (utilizing Composition API with syntax) and TypeScript. I am attempting to implement a Navigation Guard in my routes.ts file ...
0
votes
2
answers
846
views
How to type Vue3 plugin function for Typescript - error is of type 'unknown'
I have a plugin with some functions inside.
export default {
install: (app:any) => {
app.provide('translate', (translations:Array<Object>, key:string) => {
let ...
0
votes
0
answers
1k
views
Vue3 issue calling getter method in another getter method within the same Pinia store
Currently working in Vue3 using Typescript, Vuetify, and the Composition API. I am also defining stores using Pinia.
I am trying to call a getter method in another getter method, both of which are ...
-1
votes
1
answer
417
views
VUE: how to use watch with vue get and set composition api
I am trying to create a searchable table element where user can also search and filter the returned result. but i can't seem to get how to set the value in the computed property setter.
but I keep ...
1
vote
1
answer
4k
views
Why Vue 3 ref is not updating
I have searched this issue and tried all the things but did not work for me. I am using Vue 3 ref and it needs to be updated after calling the Axios with the response but it is not getting updated ...
5
votes
0
answers
377
views
How to document Vue Single-File Components that use the Composition API?
Without relying on a third party package, what is the "correct" way to document my Vue 3 Single-File Components using the Composition API in a way that allows an IDE (in my case JetBrains' ...
2
votes
0
answers
128
views
Differents behaviours in chrome and Mozilla Firefox with same vue-charts dataset
I'm expecting the result I get in Google chrome than Mozilla firefox, but in Mozilla firefox after using the quick-pivot library is painted differently in Mozilla firefox due to to mixing the ...
0
votes
1
answer
363
views
Uncaught SyntaxError: ambiguous indirect export: created in vue 3 life cycle hook
I want to run a event before content load. I do it on Vue 3 option API wiht created() lifecycle hook but Now, I do it with Vue 3 Composition API.
Code:
<script setup>
import { created } from &...
0
votes
0
answers
144
views
Pinia type inference broken when my computed properties are in the code, when I remove them, type inference works again
If I remove all of the computed(()=>{}) definitions, i get back type inference. When I put them back, the store reverts back to type any. I loose all ts help in other files.
I tried removing the ...
1
vote
0
answers
666
views
Sass and vite are trying to incorrectly parse javascript in my vue application
I have a vue3/vite app that I have developed and deployed to my domain. Upon deploying and opening the page for the first time I am greeted with this error, after which upon refreshing it goes away:
...
6
votes
2
answers
6k
views
How to unit test VUE 3 Composition API methods?
How to unit test methods in VUE 3 Composition API (using vitest (preferably) or jest), knowing that methods are not accesible/exportable directly from the <script setup lang="ts"></...
1
vote
1
answer
343
views
Vue3 plugin + composition api
According documentation I made a helpres.ts plugin file with translate method which I would like to use inside components.
import { useAppStore } from '@/store/app'
export default {
install: (app)...
2
votes
1
answer
526
views
How to make vue testing library recognize script setup?
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 ...
0
votes
2
answers
192
views
Add ripple effect to a disabled button
I have a button which would enable and disable based on the mandatory form fields. When the button is enabled, clicking would have the ripple effect.
I want to add the ripple effect when the button is ...
0
votes
1
answer
232
views
Where to store a props type declaration on a DDD project?
I am trying to apply DDD to a Vue project (so it's DDD on the frontend) and I have a doubt as to where store a props type. A Vue component can have props, which is basically named data passed to the ...
0
votes
1
answer
539
views
defineExpose stop unwrapping
i am currently try to expose an template ref with defineExpose for using that template ref in useElementSize composable. But as the documentation tells "(refs are automatically unwrapped just ...
1
vote
1
answer
779
views
Adding Apollo Mutations to a composable in Vue
I am encapsulating some Apollo mutations in a Composable in Vue to allow the functionality to be reused in multiple components however for one instance, I need to know what the parameters of the ...
0
votes
1
answer
171
views
How to convert Option API to Composition API for function and this.$refs?
I'm trying to convert all Option API codes to Composition API codes because in this app, there are codes that use Option and there are codes that use Composition. I want to make them equal so I'll ...