1,666 questions
1
vote
0
answers
353
views
Vue 2.7 Array of objects losing reactivity when modified
I've recently managed to upgrade our codebase to Vue 2.7 in the hopes of being able to start using the CompAPI, but I'm having some issues with it.
The feature that I'm having an issue with is the ...
1
vote
1
answer
1k
views
Can I use pinia getter as the first argument of Vue3's watch?
Summary
when setting a watch target as the first argument in Vue3 watch, can i input pinia getters?
Environments
vue: 3.2.13
pinia: 2.1.4
typescript: 4.5.5
Description
when I referenced the getter ...
0
votes
1
answer
4k
views
How to use v-model with custom components in Vue 2.7 Composition API?
I am building a custom input component, using Vue 2.7 and the Composition API. So far, my componente has come to this state below:
<template>
<div class="ui-field">
<...
1
vote
1
answer
1k
views
Updating Ref not Triggering Composable Recomputation
I am trying to update a ref object that should trigger the data fetching logic written to return updated data. But this doesn't seem to be working.
App.vue
<script setup lang="ts">
...
-1
votes
1
answer
871
views
Using single Axios instance in Vue 3
I have a Vue plugin for creating an axios instance which I want to use for all my api calls.
plugins/axios.ts
import axios from 'axios'
import type { App } from 'vue'
interface AxiosOptions {
...
1
vote
2
answers
174
views
Reactive object assignment from reactive array
I need to assign to a reactive object a object from a reactive array inside script setup composition API, any suggestion?
Here is my code - the variable pokemonsReactiveArr is:
export let ...
1
vote
1
answer
2k
views
state is reseting after pinia-plugin-persistedstate is configurated
I need to persist my localStorage that is reseting after I reload a page of vue 3 composition API with setup, what is doing is just what I said, when I launch the app all the variables are saved in ...
0
votes
1
answer
278
views
Flattening multiple reactive arrays looses the reactivity (Array.flat())
I have been working on component which takes in a reactive Map<string, string[]> and combines all the values of this Map into single array. This resulting flattened array is put into a reactive ...
1
vote
1
answer
3k
views
Composable data fetching example
I'm trying out the composable example yet I cannot seem to get it to work.
// fetch.js
import { ref } from 'vue'
export function useFetch(url) {
const data = ref(null)
const error = ref(null)
...
-1
votes
1
answer
48
views
How do I track prevValue in Vue composable?
I'm trying to track previousValue so that when elRef changes, I can cancel an event listener on prev and add it to new. But previous value is always null. I've confirmed that the watcher does fire ...
0
votes
1
answer
1k
views
How to get a reference to the current pinia store from a (composable) action?
Here is "kind of" what I want:
// Here is a generic composable:
function export useGeneric() {
function genericAct(){
const store = getCurrentStore(); // This is what I need
store....
2
votes
2
answers
999
views
Pinia state doesn't change on action
I am using vue3 and for state managment i am using pinia.
Main.js
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import './index.css'
import App from './App.vue'
import router ...
2
votes
0
answers
1k
views
How to pass a Pinia store from the app to a vue 3 library
I have a Vue 3 library that all my apps are using. Some of my apps uses Pinia and the library provides pinia stores as well.
My problem is that I do not know how to pass my pinia store to the library.
...
0
votes
1
answer
311
views
Module '"vue-final-modal"' has no exported member 'ModalsContainer'.ts(2305)
"vue-final-modal": "^3.4.11" -> upgrade to "vue-final-modal": "^4.4.5",
"vue": "^3.3.4",
with composition API, TS, vite
OS
Windows
After ...
0
votes
0
answers
179
views
I would like to use a library in my NUXT application, but it is giving me error that Top-level await is not available in the configured target env
I am importing a npm library inside my component and inside
error in that npm library:
Top-level await is not available in the configured target environment ("chrome87", "edge88", ...
3
votes
2
answers
3k
views
How to use jsdoc on vue3 props without typescript?
const props = defineProps({
items: {
/** @type {{new(): Color[] }} */
type: Array,
required: true,
},
selectedColor: {
type: Object,
required: true,
},
composable: {
...
0
votes
0
answers
110
views
Access to XMLHttpRequest at 'https://api.rawg.io/api from origin 'http://localhost:3000' has been blocked by CORS policy
is anyone getting acquainted with the RAWG video game platform API ?
error:
Access to XMLHttpRequest at 'https://api.rawg.io/api/platforms?key=YOUR_API_KEY' from origin 'http://localhost:3000' has ...
2
votes
2
answers
4k
views
WebWorker path import in Vite
I'm currently developing a Vue.js library using Vite as the build tool. In development mode, everything works perfectly, and the web workers are imported with the intended path:
Example (Development ...
1
vote
0
answers
579
views
Upgrade to nuxt-bridge: Auto-imports cause eslint errors
I want to upgrade a nuxt v2.16 project to v2.17 and nuxt-bridge and replace the @nuxt/composition-api with the core composition api.
Now I have autoimports and this code for example runs:
// ...
...
3
votes
1
answer
1k
views
Inline edit in vue js 3 with Composition API
I tried to make inline editing in Vue Js 3 with Composition APIand I face this problem. When I click edit, it impacts all rows. How do I make it to only work in one row based on id?
Here's the result ...
2
votes
0
answers
483
views
Test web connection by a socket-client in my vue 3 composition API app
I'm making a vue 3 app, I'm starting with a web connection test visiting the official web guide, but I don't reach the goal to test it through the socket-client.io package. How do I do this?. This is ...
-1
votes
2
answers
49
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 ...
0
votes
1
answer
601
views
How to invoke function by name in vue js 3 composition api inside <script setup>?
There is a function that receives a name of form submitting button (quasar framework), in vue js 2 options api i would use this keyword with [] and name of button to invoke so-called function, is ...
0
votes
1
answer
339
views
no displaying raw html in v-html vue 3 tag
I'm trying to display a raw html in a v-html tag that get from a http request, when I launch the app there is nothing to be displayed inside this tag
here is my tag:
<div :v-html="html.value&...
2
votes
1
answer
348
views
Empty ref('') variable after assigning .value to this variable in composition API vue 3
I'm making a request with a ref property, after I assign a string to a ref('') the .value it is empty in the request when I'm calling the method inside the onMounted(), why is that possible? but when ...