Questions tagged [vue.js]
Vue.js is an open-source JavaScript framework for building interactive web interfaces. It creates data-driven user interfaces with a simple and flexible API.
106 questions
4
votes
0
answers
70
views
Vue 2 to 3 upgrade: checkbox form field component
I have a checkbox form question component I made in Vue 2, and I'm migrating to Vue 3 so want to simplify it as much as possible and make sure I've taken advantage of all the new feature of Vue 3.
...
1
vote
2
answers
223
views
Virtual scroller Vue component
Problem
The scrolling looks smooth on Windows, but very laggy on Linux (Webkit webview and Webkit browsers).
Any thoughts on what could be optimized or what's obviously broken?
Demo playground:
https:/...
5
votes
2
answers
669
views
Display properties of a country, from online service
I'm currently learning Vue JS and I made a simple app that pulls information from API and displays facts about a country given a 2-letter country code. I'm looking for feedback on how to improve the ...
4
votes
1
answer
75
views
"Github contribution"-clone made with VueJs
I took a shoot at writing a Github contribution clone using Vuej, tippy.js and tailwindcss.
Githubs looks like this:
My working clone looks like this:
It is not an exact look-a-like but I'm getting ...
2
votes
1
answer
72
views
JS animated string builder
Today, I tried to write a simple function that would display the characters of my string one by one by iterating over a string containing the letters of the alphabet and showing the steps on the ...
4
votes
2
answers
113
views
Vue.js - Sierpinski Triangle
Below is a Vue app I wrote to draw a Sierpinski Triangle given n iterations, which can be incremented/decremented via a HTML ...
3
votes
2
answers
132
views
group computed properties in vue component
I have the following vue component which all works fine
...
4
votes
1
answer
2k
views
D3 Updating stacked bar chart
In my data there can be different number of bars in each chart.
Here is a picture:
When pressing the button labeled change bars layout the view of the charts toggles between horizontal and vertical ...
1
vote
1
answer
322
views
Chaining backend calls from VueJS method using Axios
This is the first ever bit of front-end code I have ever written, I have tried to adapt the existing call that is there to the backend using axios, so I check on of the response object value using the ...
12
votes
2
answers
635
views
Vue - It's the Royal Game of Ur
Background
After learning Kotlin for Advent of Code in December, I started looking into cross-compiling Kotlin for both the JVM and to JavaScript. Then I wrote a game server in Kotlin and also a ...
5
votes
1
answer
4k
views
Passing a callback to a component in Vue.js
I'm currently trying to teach myself Vue.js and I've just created my first small project: a simple todo list. While writing the component I discovered that you can't access methods from the parent ...
2
votes
1
answer
164
views
Ecommerce site shipping data
I have a REST API using the Laravel framework and the front-end uses the Vue.js framework. It is a dashboard for an e-commerce store where you can connect to a post shipment service API to upload ...
6
votes
1
answer
2k
views
Best way to do unknown number of nested v-for loops, or how to do while loops in VueJs (is there a "v-while"?)
I want to recursively use a Vue component for each item in a multidimensional array, which is a list of topics. For example, Topic 1 can have subtopics 1.1, 1.1.1 and 1.1.2, but topic 2 might have no ...
4
votes
1
answer
116
views
Client side authorization when retrieving from server
I have an endpoint to retrieve the user's authorization based on Joseph Silber's Bouncer.
I have a global can() function. It creates a unique key based on the ...
5
votes
2
answers
1k
views
Implementing Laravel old data in Vuejs
Users input their pin-code which is checked against the database and returned with the locality, district and state associated with that pin-code. Multiple localities may be returned so the options ...
3
votes
1
answer
994
views
Smooth sidebar toggle animation with vuejs and tailwind
I'm making a slide sidebar with vuejs and tailwind. It works but feels kind of sluggish. Is there a way to make it smoother ?
working example: https://codepen.io/tuturu1014/pen/oNzRXeW
...
0
votes
1
answer
75
views
How to refactor switch statement with convoluted if chain within vuex module
So this is my scenario. In my Websocket Vuex module I'm dealing with all the data coming from the server. I can get different kinds of notifications from the server and according to the type of ...
-4
votes
1
answer
118
views
Simple Vue calculator [closed]
I made conditional calculator in Vue js but I need help to make it more efficient.
https://jsfiddle.net/wbrx9cyp/1/
example of code:
...
2
votes
2
answers
232
views
Currency Convertor in VueJs
I have created this simple currency convertor to learn VueJs more. Any code review/comment on coding standard and best practice for Vue? Thanks in advance.
...
5
votes
2
answers
149
views
Very basic Vue todo list viewer
Problem
I keep trying to use various todo lists. But I keep coming back to the same situation; not having an active todo list. This can come in two forms:
I don't have a habit to open bespoke ...
2
votes
0
answers
404
views
Vue 3 composition API typescript using ref in Object
Hi I using Vue 3 with Typescript. In my code I have variable:
...
3
votes
1
answer
207
views
Multiple audio player - arrow keys & space
I am creating a VueJS component of an audio player.
I am having some difficulties in finding the ideal way to get the arrow keys and space bar to work.
I have found a solution, however I think it is ...
2
votes
2
answers
165
views
Structuring code logic for events on laravel controller
The code below will store a base64 image on another website and create an event to display the image on a Vue page in real time. It works fine and all.
My question is, is this a good way of doing it ...
2
votes
0
answers
480
views
Vuejs Dynamic inputs and displaying data
I am accepting dynamic input from the user if they have any i.e - Children/Siblings/Previous Employement etc through Vue Components.
A form is created and they input their data which is validated and ...
4
votes
0
answers
187
views
Vuejs - input validation
I'm in a project that's currently using vue. I'm at the moment developing validations for the inputs and in a way to make them more flexible, my idea was to create an intermediate component "...