Most voted "vuex" questions
22 questions
Sort by count of
-
5
votes2
answers109
viewsHow to return to the previous state? (Vuex)
I am using Vuex to manage the states of my app and I am creating a forward button and a back, in case of my advance I use the function below: addUser() { const payload = { name: this.name, email:…
-
3
votes1
answer120
viewsSearch for array containing string and number
Hello, I have an array with the following extrusion ddd: [ 'SP', 11, 12, 13, 14, 15, 16, 17, 18, 19, 'RJ', 21, 22, 24, 'ES', 27, 28, 'MG', 31, 32, 33, 34, 35, 37, 38, 'PR', 41, 42, 43, 44, 45, 46,…
-
3
votes1
answer57
viewsHow can I refactor this vuex Mutation?
I have the following scenario: I’m manipulating the object namespaced questions, within it exists list and news, want to create a mutation that adds a key value pair in questions within those two…
-
2
votes1
answer303
viewsVue.js: how to change a $state of Vuex that is in a v-model?
I am with the following doubt, I have some inputs linked to Vuex states: <input class="form-control" type="search" placeholder="Filtre sua pesquisa"…
-
2
votes1
answer827
viewsvuex error: [vuex] Unknown action type
I need to separate the responsibilities of my store (vuex) from ONE file for two(services and store); The problem is that regardless of how I do it even using other examples it always returns the…
-
1
votes3
answers341
viewsDoubt in Vue computed method using Vuex
I have the following code below using Vue.js and Vuex. This code increments and decreases value as a counter. I would like to know what the method refers to count inside computed in Vue instance. I…
-
1
votes1
answer183
viewsVuex. Good practice when using Mutation
I have a question about updating the state using the mutation, I usually see the use as follows: [ALGUM_MUTATION_TYPE] (state, novoArray) { state.array = novoArray } In this model, we overwrite the…
-
0
votes1
answer313
viewsCapture changes that have been rendered with state in vueJS
I’m rendering the data that’s in one state in the vuex on some inputs that are scattered around the screen; I know I can’t use the same method of a "model" (two-way-databiding) to change the value…
-
0
votes1
answer140
viewsCalling VUE function through another Iframe
I made a form where an action is executed in iframe, i need somehow, this file I’m opening in iframe call my function in VUE, I’m posting my code below. new Vue({ el:"#app", data : { teste : '', },…
-
0
votes0
answers26
viewsProblem with cloudfront aws with Nuxt
I have a problem that I have no idea how to solve. I’m hosting a site made with Vue and nuxt in the cloudfront of aws, so far everything normal When I am on some internal page and reload pressing…
-
0
votes2
answers538
viewsHow to pass parameters from Component to vuex in an Laravel and vuejs project?
I am using in my project Vuex with modules and Axios to work with the API created in Laravel, how to pass parameters in an edition of a data recovered from an API I have my Store export default {…
-
0
votes0
answers98
viewsHow to use Object.value in Vuex Getters module
in a. Vue or Vue html file, I can use a v-if with the following snippet Object.values(this.dialogs).filter((v) => v).length !== 0 and works as expected but in a file. js more precisely in a vuex…
-
0
votes1
answer874
viewsUpdate field of a selection of an object array with filter
I have a selected list with some records (not all) and I need to apply an update in specific field of the selection but I don’t want to repeat arr.filter(x).filter(y).filter(z...) In a normal…
-
0
votes1
answer77
viewsGet function return inside a Vuex getter
Good afternoon, I am using the vuetify bind Rules and in it a method that comes from inside a getter in a module. in bind the method returns in the best possible way, giving me error or succes and…
-
0
votes1
answer207
viewsProblems logging in with Vue, Vuex, Xios and Laravel
I’m trying to log in an application that uses the Windows as back/api and the front with Vue/vuex/Vue-router, but when receiving the token I can’t keep the status in the store after updating the…
-
0
votes1
answer382
viewsHow to save form data to a global obj using Vuex Vue.js with Laravel 5.8
Good guys, in my first component I have this obj ready. export default { data: () => ({ valid: false, campo: { endereco: '', numero: '', bairro: '', cep: '', cidade: '', estado: '', complemento:…
-
0
votes1
answer118
viewsSwitching from false to true with Vuex and Axios
Currently I have a structure with Nuxt and Vuex in the project, there is an object that comes directly from an Api and I need to make it change the state from "false" to "true" if the API returns it…
-
0
votes1
answer104
viewsV-model with Vuex push in the array in the store
Hi, I’m new with vuex and I need a little help: below is a piece of my code: <v-btn icon color="purple darken-2" @click="addKeyNames" ><v-icon> mdi-plus-circle-outline</v-icon>…
-
0
votes0
answers32
viewsHow to take the value of a reduce the tag to appear in the view - VUE.JS
I’m trying to set up a panel, and I want to take the added values of a reduce to appear in the view Inside the budgets, there’s an array of value, and I’ve done the methods to add methods: {…
-
0
votes1
answer32
viewsHow to put typing in the return of Object.Keys being the types the Keys of the Object or the interface?
I got the following Interface interface UserState { id: string; isDeleted: boolean; deletedAt: null | string; name: string; email: string; picture: string; } Object const state: UserState = { id:…
-
-1
votes1
answer43
viewsI can’t pass the products I select in Home.Ve to Header in Vue
Hello, I’m doing an e-commerce system in Vue, but I’m having a hard time passing the object of my JSON, which is in the Home.Ve component to the cart icon that is in another component, in…
-
-2
votes1
answer227
viewsReactivity of Objects in Vuejs (vuex)
I am making an application where I store the user profile data in the vuex store, and there is the option to update this data. the problem is that when I update via mutations as indicated, and…