Skip to content
Advertisement

Tag: vue.js

Adding the column name in the table and links in vue

I am beginner web developer. I make my first crud in Laravel 8 and Vue. I use this component t in my project: https://www.npmjs.com/package/vuejs-datatable I have this code: DataTable.vue: Notes.vue: This code work fine. I have 2 problems: I would like the column headers in the table to be taken from: headers – currently these are the column names from

Vuex | Be able to update outside of a mutation

I am trying to update a state of a action which is controlled through Vuex. I know initially, I am unable to update the state of the action without doing it directly through a mutation. However, I didn’t really want to do that as I am trying to use it in a callback. So I attempted to clone this array

Vuex state empty after reload

Inside a mutation I’m changing my state like: So the state shall hold an array with an object as the entry. Checking the state also shows the same. And it’s displayed on the view. When now reloading everything remains inside the state except of the object inside the array. It just shows an empty array inside the store: Nested_form is

How to bind option data from the API response in Vue.js?

I’m new to Vue.js and trying to bind option data from the API response. I have written axios call from the mounted() and assigned companies form the response but I’m getting defined error as per below. I have assigned the API response data to the company but why it’s not working so can someone guide. Template Part: Script Part: Answer

Vue Remove loop rendered component from DOM

I have image upload form for images to my website. When the user clicks on input images, he can choose multiple images. After selecting images, images are previewed and the user can select some meta info(Category, Type) about the image. upload.vue And if all image falls in one category than a user can select one category from this page and

this.$refs.upload.submit(); not returning response Element-UI

I’m using element-ui and I’m uploading a file with: How can I get the reponse from this.$refs.upload.submit();? I already tried: I know the submit() needs some sort of promise. I just don’t know what to change, I just want to get the error messages. Answer I am not to familiar with element-ui but custom components almost always have events that

Trying to iterate over an array of objects, and create a new property that contains an array of words from that sentence’s text property

My state contains the following property: Now I am trying to iterate over the sentences, create a new property on each sentence called words which will be an array of words. When I console.log(this.sentences), I see the new property but when I try to render the property in the DOM, it doesn’t show the new property. Answer Array#map returns: A

Advertisement