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
-2
votes
1
answer
114
views
Missing header in the UI - Vue.js [closed]
I need my h1 to show below my for my checkbox. It is inside of the div. Should I maybe put it outside of the .
The missing is below the Organization Fields header. It is suppose to display below ...
7
votes
1
answer
431
views
Vue component for Game Die (dice)
As part of learning Vue and Vue Test Utils I develop some simple games. I made a simple version of craps. Because in many other games a die (or dice) is used, I decided to create a reusable component <...
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
618
views
Resizable split DIVs Vue.js
I just started Developing Web App (Vue.js) for my company for around 1-2 months. Therefore, my knowledge and experience in HTML, CSS and Javascript is kinda shallow.
I've created a custom resizable ...
-1
votes
1
answer
1k
views
Try-catch-finally snippet [closed]
Using visual studio I created a snippet which helps me surround my already written or new code into a try-catch-finally block. I use axios for REST so there had to be separate error handling method so ...
0
votes
1
answer
62
views
Repetitive then/catch method on Javascript [closed]
I have this function and looks ugly because there are a lot of "catch" doing the same. Any idea how to make it better?
...
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 "...
1
vote
1
answer
65
views
Remove excessive recurrent code from store and computed
I have three getters in my store:
...
1
vote
3
answers
303
views
Class constructor with async properties set from poke-api
So, this is for a clicker game I'm trying to build with Pokémon data drawn from the PokéAPI. Since I'm using Vue.js for the project, ...
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 ...
4
votes
3
answers
221
views
fizzbu| - Fizzbuzz with dynamic height
Here is a variation on a theme: fizzbuzz. After providing this answer recently, I decided to practice some VueJS skills with outputting the values and conditionally applying styles based on the value. ...
1
vote
1
answer
246
views
Vue.js Stoplight app - Dynamically changing classes on elements
I recently started delving into Vue.js, and decided to try my hand at some custom class/style bindings, so I made a small app that's supposed to cycle through each "light" of a stoplight (red, yellow, ...
3
votes
1
answer
98
views
Vue component over-complication
I'm building a date range selector, and while this works, I feel like I'm making it more complicated than it needs to be. Is there a more elegant way of writing this?
Possibly using computed values ...
2
votes
1
answer
477
views
Vue Star Rating Component
I am wondering if someone can do a code re"vue" specifically for my star rating component ([complete code available on github).
I am looking for feedback on best practices, any glaring code crimes I ...
2
votes
1
answer
316
views
create static page with vuejs
I have a static homepage with some routes and thought about creating this with VueJs. I am totally new to this and just know NodeJs with Handlebars. So normally I would have something like this
<...
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 ...
3
votes
1
answer
99
views
Using something other than form field's value in Vue
I have a form, I need to send untraslated values, but as well, I need to get translated ones from Vue to write them down in page.
For now, I ended up creating a 'shadow' property and changing it via ...
1
vote
1
answer
2k
views
Vue.js: extracting data from a nested object using for...in
I have a getter in my vuex module which gets data from a nested object, then check if there is any key match to the string and push these matched objects into an array. ESLint says that ...
2
votes
1
answer
2k
views
HTMLAudioElement sound delay on keyboard clicks
I am using Vue.js to play mp3 sounds on keyboard clicks. Even though each mp3 is less than 40 KB, there is a 95ms delay on heroku, on each request.
Is there a way to download sounds when dom is ready ...
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 ...
2
votes
2
answers
3k
views
Calling a global popup from nested vue components
I have tons of nested Vue components that need to be able to open a global modal. To avoid having tons of listeners and emitters snaking their way all through the app, I am using VueX. The main App ...
2
votes
1
answer
113
views
Use vue components as one-offs in layout scaffolding
I've recently been getting into VueJS and CSS Grid. In the past I've always used frameworks like Bootstrap to built up my layout. However, since CSS Grids and VueJS have caught my attention, I'm ...
2
votes
1
answer
2k
views
Vue.js component for adding/removing items
Simple Vue.js component, where you can add a wrestler via an AJAX endpoint, and remove a wrestler from an AJAX endpoint.
Any notes on whether I’m doing this the “Vue.js way” or tips for improvement ...
2
votes
1
answer
8k
views
VueJS to do list - handling clear event on input
I made a basic to-do list in VueJS, but it feels really clunky and obtuse to me. One of the key things is that if the text input value is empty and the user clicks the button labeled submit then it ...
4
votes
1
answer
2k
views
My first animated data grid with Vue.js
Because this is my very first attempt to create a data grid with Vue, I would like to know about all misconceptions used in my approach. Whomever points to the most important shortcoming / weakness in ...