Vue.js is a library for building interactive web interfaces. It creates data-driven user interfaces with a simple and flexible API.

learn more… | top users | synonyms (1) | vue.js jobs

0
votes
0answers
5 views

HTML Element is not removed from DOM after transition usage with Vue 2.x

I have an issue with animation. Standard, all work fine In normal case, I have this: <div v-if="update"> a </div> <div v-if="create"> b </div> in the real time DOM ...
0
votes
0answers
17 views

vue-model in Vue.2.x

https://www.npmjs.com/package/vue-model Example on above code is not working in my environment: vue: ^2.2.1, vue-model": 0.0.3, Vue.models.register('customer', { baseRoute: '/customers'...
-1
votes
1answer
38 views

Vue.js and jQuery?

Is it possible to use jQuery with Vue.js? I have a function this function that I want to use in my Vue component. The function basically slides the items in and out, but when I implemented using the &...
0
votes
0answers
15 views

Adal.js not setting props in localStorage

I'm having a problem using the adal.js library without Angular. (I'm using Vue.js.) I have an authentication context instance, which is constructed with the following options (exact values have been ...
0
votes
1answer
24 views

Reactive properties issue with vue.js

I have run into a baffling issue with reactive properties in a Vue.js app, which probably results from a misunderstanding on my part and I hope someone can help. In my App.vue, I have import auth from ...
0
votes
0answers
8 views

Updating Vuex state changes LokiJS data, too. Why? Vuex / LokiJS

My app workflow is getting some data from API backend, and write to client storage with help of LokiJS. I have thousands of data in client collections. For my app's state management I use Vuex. And ...
0
votes
0answers
21 views

Workflow for building a Vue.js-based library

I'm trying to build a JS library that's essentially a Vue component bundled together with Vue itself. I'd like to expose a simple API like: Mapboard({div: '#some-div'}) that allows consumers of the ...
0
votes
1answer
20 views

Vuejs doesn't see localStorage item on login until I reload the page

I have a sample vue app where I'm trying to add authentication. The backend for this app returns a jwt string on successful login. The problem is that the projects are not fetched after login. But ...
0
votes
1answer
26 views

Best way to create select all checkboxes on table

I'm newbie on VueJS and I'm create a data table component, so far I have created two components: ui-datatable and ui-checkbox, that allows me check all rows from table. Is working perfectly, but I ...
0
votes
1answer
18 views

Passing route params in vue router v-link

I have this anchor in Parent.vue: <a v-link="{ path: '/somepath/somesubpath', query: { messageId: 999}}"> Here </a> or also this <a v-link="{ path: '/somepath/somesubpath', params: { ...
0
votes
1answer
21 views

VueJS Not emit message to parent

I don't have much knowledge about child and parent component and i am just simply trying to change value in child then emit then value to parent so i can show somewhere, But it looks like not working, ...
0
votes
1answer
35 views

Vue - best way to reuse methods

In vue 2 - what is correct practise for reusing vue methods? Instead of writing them in each component, what is the best way to make them global?
0
votes
1answer
22 views

vuejs how to get index of child from child method

I have component: Vue.component('child', { template : '#child-tpl', props : { child : Object } }, methods : { index : function () { return ???; /...
2
votes
2answers
23 views

Accessing props in vue component data function

I am passing a props to a component: <template> {{messageId}} // other html code </template> <script> export default { props: ['messageId'], data: function(){ ...
-1
votes
0answers
14 views

vue2 and laravel through browserify binded data not displaying

Current Version : Laravel 5.2 Bundler :Using built in browserify not webpack Please have some patience and read my post. This is a detailed one. What i did is pull my dependencies vue and vueify ...
0
votes
0answers
21 views

Manipulating DOM in Vue 2.2.1 using Tether is causing errors. Is there a right way to do it?

I'm trying to use tether and vue 2.2.1 together. Here is a jsfiddle example: https://jsfiddle.net/awei01/fwttsa6o/2/ What (i think) tether does: If the tethered DOM node is inside the normal ...
0
votes
3answers
29 views

use webpack with vue, but require seems not working

I use webpack to bundle js, sample: var Vue = require('vue') var app = new Vue({ el: '#app', data: { info: { email: '' }, email: '' }, methods: { onSignin: ...
1
vote
2answers
30 views

Computed props not working Vue JS 2

im learning vue js following a channel on YT, the video was sent last year, so i think its not working due to some changes on VueJS itself, but it would be great if you guys could help me with this ...
1
vote
3answers
23 views

Vuejs add css class to ul li list from array

I have someting like this array: items : [ { cssClass : 'item1' text : 'some text 1' } { cssClass : 'item2' text : 'some text 2' } ] i want make li that will ...
0
votes
1answer
15 views

How to pass value to vuemultiselect from the database on edit

I have a laravel form and am using vue multiselect to select multiple users. I then save those users in my database. On edit, I can fetch the users but I dont know how to append them. {!! Form::open([...
0
votes
1answer
22 views

Vuejs Global User Object from Laravel API

I have a small Laravel / VueJS app with single file components and it is a single page application. I use vue-stash for central state managment. Here is my store.js export default { user: { ...
0
votes
1answer
56 views

Getting Error: “Cannot read property 'length' of undefined” only in production setup

vue Version: 2.1.1 I am getting following error, only in production setup: TypeError: Cannot read property 'length' of undefined at s.updated (vue.common.js:6077) at we (vue.common.js:...
2
votes
2answers
29 views

Invalid prop: type check failed for prop

I created a countdown with Vue.js but I am having trouble showing the values I am getting. I have two components and I have read the single file component guide from Vue but I just don't seem to ...
3
votes
1answer
52 views

VueJS - How to detect Ctrl+V?

I've already seen the answers to this question, but it's not the solution I need, since it's for jQuery, and I need something for vue.js. So far, I was able to detect single character presses using ...
0
votes
1answer
19 views

Vue.js re-rendering sorted array

I have a basic sorting UI to sort comments based on some values: Part of CommentsSection template: <div v-if="numComments" class="tabs d-flex"> <span class="text-muted">Sort by:&...
0
votes
1answer
21 views

Vue.js async update from inside JS import

I have two form components, which have a common JS validator. import { validateInput } from './validateInput.js' export default { data () { return { email: '[email protected]', validEmail: ...
0
votes
2answers
23 views

How can I store collections using Vuex in a way that is NOT dynamically?

new Vuex.Store({ state: { comments: { //store comments collection of each article /* articleId: [...commentsCollection] */ }, articles: { ids: [], ...
1
vote
1answer
18 views

Vue component not rendered inside router-view

recently I've been using vue in frontend and vue-router with it to shape a SPA. My problem is that I am not able to access a component defined in main Vue instance: import ElementComponent from './...
0
votes
1answer
15 views

Style-Binding using Computed Properties and VueX

How would I bind styles using computed properties in VueJS while integrating with VueX. The issue I am having is in regards to my style properties not updating after a change in my VueX Store. Code ...
0
votes
1answer
25 views

Edit Firebase data using VueFire

I have a simple admin app that creates new businesses via form and adds them to a table. I have created methods to add and delete entries, but am not sure how to proceed creating an update method. The ...
0
votes
0answers
14 views

Handlin unavailable server with vue-resource

Is there a way to handle errors with vue-resource when a HTTP response has not been received? For example, when the backend server is unavailable (i.e. http://localhost:30000 doesn't exist) I receive ...
2
votes
1answer
23 views

VueJS: Vuex doesn't update View after modifying State

I'm currently working on a web project. I use VueJS 2 and Vuex 2. The problem is that When I update a subArray of my state, the state is not bind to the view. my State: export const state = { ...
1
vote
1answer
14 views

Vue Router multiple independent router-view navigation

I have multiple blocks of items similar to the books in the jsfiddle below. Each book has a sub-menu and users can click to see a specific book content. The problem is when users visit book1/summary ,...
1
vote
0answers
24 views

Vuejs large application lazy loading dynamic components

I'm trying to build a vuejs application which will have hundreds if not thousands of "form" or "page" components that all get swapped out inside a dynamic <component is=''> tag. The problem is ...
-1
votes
0answers
27 views

process.env empty object in JS using node and gulp

I have read many answers about why the process.env is empty in JS and try everything but nothing works. This is my code: gulp.task('build-scripts', function () { console.log(process.env.NODE_ENV);...
1
vote
1answer
28 views

Apply style to an HTML element added dynamically by v-for using Vuejs

I'm adding elements to a list dynamically using v-for. <ol> <li v-for="light in lights"> <input type="range" min="0" max="255" v-model="light.currentBrightness" v-on:change=...
3
votes
1answer
24 views

random “data-v-*” attribute in Vue.js components

Experimenting with Vue.js the first thing I noticed is how every instance of a component that I define as single file component and include as custom element gets a random hash attribute like data-v-...
1
vote
1answer
20 views

defining the layout of child component from parent in Vue js

I'm new to Vue and using Vue 2.2.1. I am wondering if it's possible to create a reusable component that can have its layout defined by its parent. For example, consider the following pseudo code: // ...
0
votes
0answers
15 views

Nuxt.js Webpack Build Error On Heroku

I have a Nuxt.js project to which I added just a few components for now. It runs flawlessly if build local. I wanted to test it on Heroku, however I get some webpack related build errors, in which I ...
1
vote
2answers
33 views

I can't convert json string to object in Vue.js and javascript

im trying to convert this json string to object, but i can't, the console this erro: Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Vue$3.buildResults (...
2
votes
1answer
24 views

Vue.JS custom radio button component requires clicking twice

I have a custom radio button component with the following HTML markup: <div id="app"> {{message}} - {{sex}} <radio value="m" v-model="sex" name="sex">Male</radio> <radio value="f"...
1
vote
0answers
15 views

vuejs unit test throwing log message because of inner component

I have a component like this <template> <p>{{ msg }}</p> <inner-comp></inner-comp> </template> <script> import InnerComp from './components/InnerComp ....
1
vote
1answer
16 views

Defer form submission to a method?

I have a form: <form id="myForm" @submit.prevent="doSomething()">...</form> In doSomething() I make a check and if true, I want to submit the form. How can I submit the form after the ...
0
votes
0answers
22 views

Vue router passes unnecessary mixin from Component A to B on route switch

I am facing weird issue with my app, where router passes mixin from one component to another, even though the subsequent component has not defined this particular mixin. If lets say I home route at "/"...
1
vote
1answer
40 views

JWT authentication with Vue.js

I'm working on an SPA with Vue.js and vue-router and I'm now dealing with authorization/authentication using JWT. I have the back end (API endpoint) sorted out, such that it will issue a token in ...
1
vote
3answers
34 views

Vue: How to call .focus() on button click

I only started coding with vue.js yesterday, and I don't know how to "focus" on a textbox without using the "traditional" JS way, which is document.getElementById('myTextBox').focus(). Initially, my ...
1
vote
2answers
21 views

Getting form data on submit?

When my form is submitted I wish to get an input value: <input type="text" id="name"> I know I can use form input bindings to update the values to a variable, but how can I just do this on ...
1
vote
1answer
23 views

Touch Events in Vue 2.0

I'm using Vue 2.0 and should work with swipe gestures. I have checked that there is one official plugin (named vue-touch) but as they say, Vue 2.0 is not supported yet. I know there are tons of ...
0
votes
1answer
5 views

Vuejs2: list of autosize textareas bound to a growing array of objects don't update their value

I bound https://github.com/jackmoore/autosize to textareas listed in a v-for, and I'm seeing a weird data persistence behaviour while growing the array structure bound to that list: On the left side, ...
1
vote
2answers
24 views

how to pass refrence from parent to child in vue js

I have this code HTML <div class="col-xs-4"> <h3 class="text-center">Incomplete task</h3> <div class="well" style="max-height: 300px;overflow: auto;"> ...