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
6 views

Vue component not showing (Laravel 5.3)

I'm trying to get Passport setup on Laravel 5.3, but the Vue components don't seem to be showing up in the blade. Here is the code for my blade: @extends('connect.frame') @section('title') API ...
1
vote
1answer
14 views

Mutating Arrays Vuex

The following mutation does not work: const mutations = { [types.UPDATE_IMG_URLS] (state, newArray) { state.imageUrlArray.concat(newArray) }, (...) } However this one does: const mutations =...
0
votes
0answers
13 views

Vue2 router do not work when type manually

I have such code: created: function() { if(!localStorage.hasOwnProperty('auth_token')) { router.replace({name: 'login'}); } else { if(router.history.current.name == 'login') {...
1
vote
0answers
8 views

Switching from vue-resource to axios

With vue-resource, we could set the root url in main.js like so: Vue.http.options.root = 'http://localhost:3000/api' I tried replacing that with: axios.defaults.baseURL = 'http://localhost:3000/api'...
0
votes
0answers
5 views

Vue.js method called multiple times using $emit and $on when it should only be called once

I'm using a bus to allow components to interact with other components via the method described in this link: https://forum.vuejs.org/t/create-event-bus-in-webpack-template/4546/2 . I have a method ...
0
votes
1answer
18 views

Cloning a Vue.js object?

I want to log a Vue.js object with console.log(obj), but all properties are displayed with reactiveGetter() and reactiveSetter() functions instead of their values. How can I clone a Vue.js object, so ...
0
votes
1answer
24 views

Vue.js conditional rendering in older browsers

I'm trying to filter a collection by a search term. When I use the es6 syntax and built in features such as string.includes('') it works fine. Unfortunately I have to support a few versions of IE ...
1
vote
0answers
22 views

Vue - v-bind error:v-bind' is an undeclared prefix

i'm working in asp.net with Orckestra CMS (before Composite) and Razor Templates and try to use Vue framework. All is fine when using {{option.text}} <select class="form-control" id="myExample1"&...
1
vote
1answer
20 views

How to access a method from vuejs component?

I am building a Tic Tac Too game with vue.js framework. I have declared a vue component called grid-item, when this item is clicked I want it to call the handleClick method. when I run the code ...
0
votes
1answer
23 views

Vuejs deferred events on ajax content

I have some vuejs events. <div @mouseover="activate" @mouseout="deactivate" class="item featured"> They work fine but when the content is loaded in via a simple jquery load() it does not ...
3
votes
3answers
28 views

Accessing returned data from jQuery load

I'm working on a vue.js component and I've got this computed property: loading_asset_status(){ var img = $("img.modal-main-image").attr('src', this.current_image.img_url) .on('...
1
vote
1answer
26 views

How to add a Favorite - UnFavorite Button with vue.js 2?

My view is like this : <div class="panel panel-default panel-store-info"> ... <div class="favorite"> <add-favorite-store :id-store="{{ $store->id }}"></add-...
1
vote
1answer
16 views

Vue 2, Cannot reference Prop Object in template

Problem: Although from the Vue DevTools I am passing the prop correctly and the router-view component has access to the data that it needs and in the correct format, whenever I try to access any of ...
0
votes
1answer
18 views

How do I remove Vue from being loaded when using elixir?

I am using Laravel 5.3 and elixir to compile my Sass and JS. My /resources/assets/js/app.js file contains only 2 lines: require('./bootstrap'); require('./search'); search.js contains some custom ...
1
vote
2answers
29 views

How to run some javascript code only on small screen/mobile devices

I am building a vue web app which will be used across all devices. I have some code which I want to get executed only on small devices or mobile. Currently I have that code in a if condition with $(...
3
votes
1answer
24 views

How dynamic add events to a tag in my custom grid component

<template> <tbody> <template v-for="(row,index) in datalist"> <tr @click="rowevent != null?rowevent(row,this.$el):''" :class="index % 2 === 0?bodytrclass[0]:bodytrclass[1]"...
1
vote
1answer
32 views

How to render the data after the API Call? (Vue.js)

So the following template is rendered immediately, and it does not wait for the API call. The solution I found is using v-if in order to keep the elements from rendering until the data is there. ...
-1
votes
1answer
27 views

How to create a single file Vue component in ES6?

What would be the steps to a single file Vue component in ES6 ?
1
vote
2answers
21 views

Dynamically add properties to Vue component

I am loading data from the database which drives what type of component I display An AJAX call goes off and returns me some data (this can be restructured if needed) { component_type: 'list-item', ...
-4
votes
1answer
29 views

Another front-end technology inqury - but using serverless backend

We have started to work with serverless technologies specifically with AWS Lambda and API Gateway using the serverless framework. We are working with Auth0 to manage authentication. Question is what ...
1
vote
0answers
38 views

vue mdl componentHandler.upgradeDom() returning not a function

Trying to instantiate mdl into a vuejs project (vue v2.1). Running into a very similar issue to this, except when I call mounted () { componentHandler.upgradeDom()} in my App.vue, it's returning: ...
0
votes
0answers
22 views

How to import and use bootstrap-vue with Webpack

I started a project using vuejs-templates and webpack. Then I added bootstrap-vue to the project. Now, I am not sure how to add a bootstrap button. In main.js I am importing BootstrapVue: import ...
0
votes
1answer
16 views

Vuejs 2, VUEX, data-binding when editing data

I have a user profile section and Im trying to allow the user to edit their information. I am using vuex to store the user profile data and pulling it into the form. The edit form is located in a ...
0
votes
0answers
10 views

Vue 2.0 SSR error page

I'm trying to implement ErrorPage vue component for my SSR application. I'm using boilerplate with // server.js ... const context = { url: req.url }; const stream = renderer.renderToStream(context); ...
0
votes
1answer
25 views

Vue $route is not defined

I'm learning Vue router. And I want to made programmatic navigation (without <router-link>). My router and view: router = new VueRouter({ routes: [ {path : '/videos', ...
0
votes
1answer
10 views

Is it possible to render two adjacent VueJS components?

I have created two custom VueJS components and I would like to place them adjacent to one another like so: <div id="app"> <x-component /> <y-component /> </div> ...
0
votes
1answer
22 views

Binding img src

I have an img tag in a Vue component with a binded src attribute to Vuex state. <img :src="this.$store.state.imageDataURI"> I am successfully updating that state object in Vuex (see below). ...
1
vote
1answer
30 views

How to test computed properties in Vue.js? Can't mock “data”

I wonder how to test computed properties in Vue.js's unit tests. I have create a new project via vue-cli (webpack based). For example here are my Component: <script> export default { ...
0
votes
3answers
24 views

Vue.js component click event not finding method

I'm fairly new to VUE.JS and I'm trying to integrate it into an MVC project. In my MVC view I have my app div. @RenderPage("~/Views/Product/Templates/product-details-template.cshtml") <div id="...
1
vote
1answer
29 views

Vue.js swap array items

In my vue.js application I'm trying to swap 2 forum rows like this: export default { data() { return { forums: [] } }, methods: { ...
1
vote
0answers
20 views

Vuex, vue-router and handling page reload (F5)

I'm in the process of switching over the application I'm building to be a single-page application, using vue-router and vuex. But this is my first SPA, so I'm falling foul of some newbie issues. I had ...
0
votes
1answer
18 views

VUE.JS: Passing Data From Parent To Child Component

I have a layout file in which I have some data. Besides that I have three components: tags students actions I want to declare the data in the layout file, but access it through the three child-...
1
vote
1answer
11 views

Vue.js component with checkbox ID conflicts

I have a custom Vue component (vcheck) that has a checkbox with a label: <input v-model="val" type='checkbox' :true-value="trueValue" :false-value="falseValue" id="v-check" ...
1
vote
1answer
13 views

duplicate webpack (2.2.0) chunks with vue-components

When I build my bundle (dev works fine) I find that two chunks (names starting with 0 and 1; 1.08Mb and 1.07Mb respectively) are almost completely similar. Content of chunk 1 is covered completely by ...
0
votes
0answers
18 views

Getting query string parameter using Vue.js [duplicate]

How can I access the query string parameter using Vue.js? Do I need to use vue-router for this? I can access it by parsing window.location.href. But is there a Vue.js specific method like AngularJS ...
0
votes
1answer
32 views

Vuex $store properties not reactive when using computed property

I have a Vuex store, which I'm injecting into my instance: import store from '../store'; const mainNav = new Vue({ el: '#main-nav', store, components: { NavComponent } }); And I'm creating a ...
0
votes
0answers
29 views

Vuex $state issue

I have error like this: I previously thought that this is problem with router, but after creating new project with only vuex problem is still there enter image description here This is my main.js ...
1
vote
1answer
20 views

Vue 2 Programmatically Create Toggle Transmissions

I have just been taking a look at some example code on the Vue JS documentation about transitions. I am trying to add buttons to each list item and give them the ability to toggle content within each ...
0
votes
2answers
22 views

Usng Vue.js to push dynamically created inputs to an array

What would the best process be to push dynamically created inputs to an array. Ideally I would like an array in the data like. customer_answers: [1,4,5,6,8] The items in the array being the values ...
1
vote
1answer
23 views

Adding <slot> in repeating content region

I have a menu component which, simplistically, takes in an prop with an array of options and renders an item in the menu for each one. I wanted to be able to customise the markup that was inside each ...
0
votes
2answers
35 views

How to plus all the values of a same index in JS array with VueJs

I have some products that I have created an array for showing them with VueJS & every product that user chooses goes to a list and every time that clicks on the products, It will increment the "...
0
votes
2answers
29 views

how to call a vue component outside of instance in javascript?

I developed some vue component (grid,popup,layout..) by webstorm with (vue-cli..webpack ...) . My development environment: webstorm + webpack + vue-cli Now i want to know how i can use that in a ...
1
vote
2answers
27 views

HTML Tags containing Vue.js v-if and v-for directives flash at loading

I use Vue.js to send data to a basic and very simple API that subscribes an e-mail address to a newsletter via the form below and to display some messages (state and errors). I use in particularly ...
0
votes
0answers
18 views

Draggable table tr is not moved in vue.js

I use vue.js 2.0 and I made draggable table using Vue.Draggable. It has no error, but when I try to drag tr, it is not moved. But using div then it moved. Did I have something missed? index.html <...
-2
votes
0answers
21 views

Vue 2.0 with Vuex cannot work

I tried implementing website by using vuex but the error showed Uncaught TypeError: Cannot read property 'getters' of undefined I have searched a lot about this problem but still doesn't work. Can ...
0
votes
1answer
16 views

add <tr><td> tag happen trouble using vue.js

I have a table when I create a data it will update and I want using Vue.js to do so I to see Vue.js Components and try <div id="app1"> <table class="table table-bordered"> <tr>...
0
votes
4answers
68 views

How to display button link with vue.js?

My view is like this : <div class="panel panel-default panel-store-info"> ... <div id="app"> <AddFavoriteProduct></AddFavoriteProduct> </div> .......
1
vote
0answers
19 views

Vuex actions targeting with deep hierarchical data?

Is it possible to structure vuex in a way which I can execute an action like buildings[0].apartment[1].room[2].dispatch('paint', 'white'); If not what's the way to go about executing an action ...
1
vote
1answer
33 views

Express.js net::ERR_CONNECTION_CLOSED

I'm running a Universal Javascript application on Heroku. My Vue.js app is being loaded by Express.js and requests are proxied to https://localhost:3000/api. I am trying to make a simple POST ...
0
votes
1answer
22 views

Delete an item of a computed list in Vue.js

I would need to display a list of items, and be able to erase one of them when needed. <tr v-for="(todo, key, index) in todo_list"> <td><input v-model.trim="todo.priority" type="...