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
Tag: vue.js
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 return variable from Axios Response in Composition API to root level?
I want to return the headings array from an axios.get function and use it on root level inside my vue component but when I try to return it, it shows: This is the script element from my Vue3 Component: Edit: Thanks to Thomas and huan feng I can do this: This is the most elegant solution because reactive objects provide
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
How to change screen reader focus to vuetify modal once it opens?
I’m implementing adjustments for accessibility on a project and I need to make it possible to navigate through the page using only the keyboard. I am experiencing a problem with modals using the vuetify’s v-dialog component. When I try to change the focus of the page to the content within the modal for screen readers to announce to the user.
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
How add the sizes of the slices in the pie chart (at the top) in Chart.js?
I am starting to learn the chart.js library. I drew a pie chart (like “pie”). When you hover over the slices of the diagram, a number appears in the pop-up window that sets the size of the sector. How can you make this number still displayed at the top, where the sectors are listed (I marked this place with a
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