I have an object and I need to pass it to the ajax request. Here thissearchString is an array of object. I need to pass this array of object to the URL. So, I am using URLSearchParams but got this error message: Answer I think you not understand the function of URLSearchParams. Here, what this function do: With that you
Tag: vue.js
Import statements breaks script setup Nuxtjs 3
It seems that when I’m using the import statement in the <script setup> all code below it stops working. I installed the @heroicons package and use the import statement to use it as a component in my <template>. But everything below the import statements does not work anymore. My code: When running the code above I do not see “username”
Vue.js code working only in incognito window
I am developing an e-commerce window and it was working perfectly until the part where I needed to add items to the cart. the browser console showed an error when I wanted to display the items in the cart. However, the strange thing is that it works perfectly in the incognito window. What could be the issue? Below are my
Vue 2 html in data object
I tried backticks + signs, everything and I can’t parse the HTML in my data object to the template. Check the screenshot for the issue. Answer OP solved the issue by using the following
Send data to server using Axios VueJs
It is necessary to send data to the server in the required format, I don’t understand how to organize it correctly, the same JSON structure. You must send when attaching a file (@change), the file itself and a comment. Here is what I was able to do https://codepen.io/JessikaJes/pen/rNvgYwP Answer Change the code like this:
How to handle the change of the previous object
I’m currently making a nav bar. I create an array storing the info of the tabs in the nav bar. When a new route is clicked it updates the newly clicked tab to allow the current property to be true. How would you change the previous nav item to false. As currently they all change to true one by one
Viewport affecting relative position of a nested element in resizable div
In this app I made, where I use Vue and OpenLayers to create animations, a img element with position: relative is placed at the top right corner of a canvas element with resize: both; overflow: auto;. The problem (CodePen) is said element is used to create an animation in a for loop where at each iteration the canvas element is
stocking api response.data in localStorage on click vuejs
My goal is to store a specific data in the localStorage when I click on a link but log i get is either undefined or absolutely nothing. I am using this API https://www.themealdb.com/api/json/v1/1/categories.php I guess this.categorie.strCategory is incorrect but i really cant figure it out I also tried this.categories.strCategory Answer Try to pass category then save it
why is this Vuex state syntax throwing error?
I’m quite new with Vuejs & Vuex, I created a local project just to practice, so I have a file called: employeeList with an Array of objects. I’m trying to pass that same Array as state in Vuex, but is throwing me errors. I assume the syntax is wrong, please tell what would be the correct approach and if the
Change the output data in a VueJS multiselect
This is a VueJS multiselect html output. It pulls the data from a JSON file via axios. I cannot change the data. I would like to be able to amend the text if possible and hide the blank entry. So instead of ‘BL’, I would like it to display ‘Black’ and instead of ‘BLK’, I would like it to display