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

0
votes
0answers
3 views

VuexFire Mutations

For anyone who has used VuexFire Vuex v2. What is mutations: VuexFire.mutations referring to here? The answer may be obvious but I have no idea what it means. Where do my actual mutations go then? I'm ...
0
votes
1answer
59 views

With minimal changes to the object structure, how can you reference a function from another function in the same object?

Using Javascript (ES6), I need to reference an handler function onKeyup so that I can add and remove an event listener in two functions declared in the same object. Would you see how I can access ...
0
votes
0answers
28 views

Sync Vue.js data with some existing html?

I am using Vue.js clientside, and populate a list as follows (this works after an ajax/json api request which I populate with Vue data and methods). <div id="myDiv1"> <li v-for="item in ...
0
votes
1answer
17 views

Vue and HTML5 input tag

I would like to create HTML5 slider. Something like it: <input type="range" min="1" max="10" v-bind:value="magnitude_value" step="1" />{{magnitude_value}} But look like v-bind do not trigger ...
0
votes
1answer
12 views

bind data to vue model dynamically in component

I'm trying to make a simple form that will accept user's input for different types of currency. Here's a (broken) fiddle that hopefully gets across what I want to do: https://jsfiddle.net/4erk8yLj/7/ ...
1
vote
1answer
32 views

vue.js 2.0 communication best practice

I am currently working on some stuff with vue.js and would like to ask if the following is good practice. I have a parent and a child component, for instance dropdown and dropdown-item. When a ...
0
votes
1answer
30 views

Vue.js “The ”el“ option should be a function that returns a per-instance value in component definitions”

Here is the html code. I am trying to call this id using vue.js but couldn't get that and it shows warning. <div id="SignesConcept"> <!-- Signes --&...
0
votes
0answers
15 views

Can’t get Auth0 authorised using the sample Vue.js project

I'm just getting started with Vue.js and Auth0 and I'm using the sample code from the Auth0 quick start guide for Vue.js. I get the login screen but upon signing in, the page refreshes, the "...
0
votes
1answer
15 views

Vue How to set property on a component with parent and in itself? [Warn]

I have a component, which I use as a nested component (more level of components) and by a vue-router mounted component also. Sometimes I'm passing the data from the parent, or set it inside the ...
0
votes
3answers
22 views

Does a Vuejs component template need only root one element?

I did not saw anything about this in docs, maybe I did not search enough, but components template seems to work "better" with a root element (better means: it works without root element with Laravel ...
0
votes
1answer
21 views

Is there a function or method in vue.js just like ng-init in angularjs ?

I want to initialize the data in *.vue, but the method of 'created' just run once, so is there a method run anytime just like the directive 'ng-init' in angulajs? Thanks a lot!
0
votes
1answer
29 views

Select input from getmdl-select with Vue 2.0

I was trying out getmdl-select with Vue2.0. in the view, I got it correct and working as expected, but it is not changing the model associated. Here is the code: <div class="mdl-textfield mdl-js-...
0
votes
0answers
12 views

how to get CSP version of vue2.x

from vuejs.org installation, runtime-only build is fully CSP-compliant. after git clone , npm run build i got the vue.runtime.js version. but it doesn't work in chrome extenstion enviroment. so, ...
1
vote
2answers
37 views

VueJS access child component's data from parent

I'm using the vue-cli scaffold for webpack My Vue component structure/heirarchy currently looks like the following: App PDF Template Background Dynamic Template Image Static Template Image ...
1
vote
2answers
46 views

Gulp, Vue, Webpack, Babel and Uncaught SyntaxError: Unexpected token import

I've been trying whole day to get it to work without any luck so if someone could shine some light that would be very much appreciated. I'm trying to set up environment for working with ES6 files as ...
1
vote
1answer
36 views

What's the correct way to pass props as initial data in Vue.js 2?

So I want to pass props to an Vue component, but I expect these props to change in future from inside that component e.g. when I update that Vue component from inside using AJAX. So they are only for ...
1
vote
1answer
20 views

Best Practice for Reacting to Params Changes with Vue Router

When using Vue Router with routes like /foo/:val you have to add a watcher to react for parameter changes. That results in somewhat annoying duplicate code in all views that have parameters in the URL....
0
votes
0answers
37 views

Vue js with jquery validation

I'm having some problems with vue.js and jquery unobtrusive-validation in .net mvc modelmetadata validation. Seems like jquery validation is not fired when vue.js are used. That's my cshtml: @using (...
0
votes
3answers
40 views

setting data with Vue.js

Sorry for my begginner question, but I'm stucked since yesterday on a basic problem which i cannot figure out the solution. I want to fill my variable logs with some json object and render it in ...
0
votes
1answer
47 views

example works in js-fiddle but not in self-made page

This js-fiddle example is working as it should: https://jsfiddle.net/qf089a0a/51/ But when I try to load this example on my own, the dropdown menu doesn't show anything -- even though it does in the ...
1
vote
1answer
28 views

Get Vuex state data by passing a variable

I'm new on working with Vue and Vuex, and currently I'm trying to bind props to my component like this: My HTML looks like this: <div id="vuemodal"> <modal :active="get('active')" :login="...
0
votes
0answers
14 views

Vue-strap Alert apears under Modal

How do i bring vue-strap Alert on top of Modal in Vuejs. I could not do it by z-index. <alert :show.sync="show" placement="top" duration="2000" type="success" width="500px" dismissable z-index="...
1
vote
1answer
36 views

Vue 2.0 Component - could not render all <div>s within a template

I am composing a modal component as I learn VueJS. The modal component basically consists of two major elements: the actual box containing all contents and an overlay. Now the problem I am stuck in ...
1
vote
2answers
34 views

Disabling/enabling buttons by data in Vue.js?

I'm having a look at Vue.js with a view to simplifying an application which is starting to get a bit too complex with jQuery. I want to utilise the data binding so that the state of an 'Order' object ...
1
vote
1answer
27 views

Vuex 2.0 Dispatch versus Commit

Can someone explain when you would use a dispatch versus a commit? I understand a commit triggers mutation, and a dispatch triggers an action. However, isn't a dispatch also a type of action?
0
votes
1answer
15 views

Passing related model to vue 2.0 component

I am building a vue.js frontend to a Django-based JSON REST API (which uses DREST - Dynamic Rest Views and DRF - Django Rest Framework). In the vue frontend, I have an item list which iterates ...
0
votes
2answers
28 views

Vue.js: Monitor Dynamic Changes To Object

Problem Changes to an object are not being detected by the listening child component. Context I have an empty object that is storing values as they come back from an API. This object is bound to a ...
-1
votes
1answer
41 views

Get lowest price from vue js array

I have this array which loops through all the trips for a listing. <span v-for="price in listing.trips"> <div class="price">{{ price.cost }} </div> </span> Is it ...
-1
votes
0answers
21 views

Vue-Router Bootstrap Menu

I want to use vue-router in combination with the bootstrap collapsible menu in the navbar for mobile sites. As the page is not reloaded the menu stays open. Is there a workaround for that problem?
1
vote
1answer
41 views

How to set URL query params in Vue with Vue-Router

I am trying to set query params with Vue-router when changing input fields, I don't want to navigate to some other page but just want to modify url query params on the same page, I am doing like this: ...
0
votes
2answers
40 views

Can a variable in data be computed based on other data?

I would like to have some of the data variables computed based on some other variables and follow their changes in the Vue instance. The natural solution new Vue({ el: '#root', data: { ...
0
votes
0answers
49 views

How to create an admin user, and so on in Firebase?

I can not quite understand how to make users with different privileges (administrator, student, teacher), here are the rules: {"rules": {"authentication": {"users": {"$uid":...
1
vote
1answer
28 views

How to create a hook with events between VUE 2.0 components

I've created two dynamic components. Now, using events: $emit/$on what I need is to fire the "logThat(someObj)" method of the component-two passing the arguments as you can see in this fiddle: Vue....
2
votes
1answer
42 views

placeholder for select in vuejs 2.0.0

I am creating a webapp using vuejs 2.0. I have created simple select input using following code: <select v-model="age"> <option value="" disabled selected hidden>Select Age</...
0
votes
1answer
22 views

Vue-router dynamic load menu tree

I'm trying to create a menu tree with vue-router by ajax request,but the $mount function was called before the ajax request responsed, so the router in the Vue instance always null. Is there any good ...
0
votes
0answers
34 views

Vue Component Issue

I have this page I want to try out Vue Router with Vue Components. I cant figure out whats wrong. I am getting an error Uncaught TypeError: Cannot read property 'name' of undefined at this line const ...
0
votes
1answer
40 views

Vuejs 2 Using accounting.js

Since the currency filter is deprecated in vue2 I need to import/ use external library accounting.js But I'm facing problem to use accounting.js in my component. The console show error like this: [...
1
vote
1answer
17 views

HMR strange behavior in Safari with store pattern - Vue2

I've implemented a simple user store in Vue 2 to keep track of the currently authenticated user. It looks like this: const user = { isGuest: true, state: { name: '' }, save (user) { ...
0
votes
1answer
45 views

Vue.js Component combined with Laravel Form Validation (i.e. passing an initial value for data)

After much Googling and finding the Vue.js forum down, I am ready to give up. I'm creating a Postcode Lookup component, and everything was working well until I tried to combine it with Laravel's form ...
0
votes
1answer
42 views

Default values for Vue component props & how to check if a user did not set the prop?

1. How can I set the default value for a component prop in Vue 2? For example, there is a simple movies component that can be used in this way: <movies year="2016"><movies> Vue.component(...
0
votes
2answers
38 views

Rendering data in Vue

I'm trying to create a Card component in Vue that renders some data I pull from firebase. In React I'd pretty much just use map and render out a <Card /> component then go create the Card ...
0
votes
1answer
12 views

vue.js pass argurments in filters with $options

I am calling the built in Currency filter in an application like so this.$options.filters.currency(this.meta[i].metadata_value) Inside html I can pass arguments to change the decimal points to 0 by ...
0
votes
1answer
21 views

Getting select options from computed properties with Vue JS

I am trying to get a select from to work with Vue using a computed property. Here's a fiddle I'm working with: https://jsfiddle.net/2m18ab1v/13/ Here's what my view-model looks like: var vm = new ...
1
vote
1answer
34 views

Infinite scrolling from two different API endpoints

The question could also be titled "attaching two different scroll Event Handlers on window and programmatically switching between them I have two endpoints, the first one brings me a list of "latest" ...
0
votes
2answers
35 views

vue 2.0 and vue-router 2.0 build SPA, router-view did not update

Build A Single page app with vue 2 and vue-router 2 and vuex 2, but do not update /src/main.js import Vue from 'vue' import App from './App.vue' import router from './router' import store from './...
0
votes
1answer
57 views

VueJS 2.0 - Communication Between Sibling Components - $emit and $on

I am building out an app as follows.. Let's look at one model I'm using.. (I've got Laravel 5.3 in the background just serving up the basic views and serving the API. For example: Clients. at example....
0
votes
2answers
30 views

v-model on input that dynamically changes value by other script ?

I have two input that store lat and lng from google map script, if the user changes the marker's position => these two inputs get the lat and lng that the user pecked, so I wanna get the value of ...
0
votes
1answer
30 views

Debounced function calls delayed but all executed when wait timer ends

I am using debounce in order to implement a 'search as you type' field. I am reading https://css-tricks.com/debouncing-throttling-explained-examples/ and from what I can understand the function ...
0
votes
1answer
38 views

Updating parent data via child component?

What is correct procedure to update parent data via child component? In the child component - I am modifying parent data directly via props. I am not sure if this is wrong way to go about it. ...
1
vote
0answers
31 views

Vue-router 2 changes route but does not update the view?

I have a login issue with website that uses: Vue.js v2.0.3 vue-router v2.0.1 vuex v0.8.2 In routes.js I have a simple interceptor setup router.beforeEach((to, from, next) => { if (to.matched....