Vue.js is a library for building interactive web interfaces. It creates data-driven user interfaces with a simple and flexible API.
1
vote
0answers
12 views
Using Flow.js in Vue.js
I'm trying to use flow.js with vue.js but I'm running into issues getting it to work in .vue files.
I ran vue init webpack, npm install -g flow-bin, and then npm install and npm run dev.
I was able ...
0
votes
0answers
5 views
Scroll to bottom of div with Vue.js
I have a Vue component with several elements in it. I want to automatically scroll to the bottom of that element when a method in the component is called (basically, do the same as in Scroll to bottom ...
0
votes
0answers
12 views
how do i toggle the classes of individual <li> elements?
when I toggle a class from true to false, currently all elements trigger on and off at the same time. How do I target them individually? the Todo-List example has similar functionality (with todo /...
1
vote
1answer
11 views
How to reassess a computed value upon key press?
I would like to display a different random word from a list upon pressing a key.
The "displaying a random word" part works fine:
var vm = new Vue({
el: "#root",
data: {
verbs: ['...
2
votes
1answer
41 views
How / why to switch from <script> includes to npm installs?
I have a VueJS project that uses npm to manage all the Vue stuff (vue-resource, router, Vuex etc). But in my index.html file I've also got a bunch of other stuff included via script tags:
Bootstrap
...
0
votes
0answers
19 views
-enter-active and -leave-active classes doesn't appear while toggle-in Vue event
For some reason it is impossible to make transition effect where the -enter-active and -leave-active appears with a default timeout in de html code of my webpack/vue-loader application.
I've copy/...
0
votes
3answers
23 views
Import JSON into VueJS
I'm using wbepack to compile a VUEJS project in which I import a JSON file which has an array of objects into vueJS however when accessing it via the component the object appears to be empty.
import ...
0
votes
1answer
25 views
What is Vue.extend for?
This is a simple enough one, but I'm not getting the answer I need from the documentation. I'm in the process of learning Vue.js, and I don't really understand where Vue.extend fits in. I get Vue....
0
votes
1answer
21 views
vue.js - conditions and custom filter
I'm trying to use 3 conditions to display several texts to a tooltip with bootstrap.
<span class="icon icon-info"
data-toggle="tooltip-click"
data-placement="right"
data-trigger="focus ...
1
vote
2answers
47 views
How to call a vue.js function on page load
I have a function that helps filter data. I am using v-on:change when a user changes the selection but I also need the function to be called even before the user selects the data. I have done the same ...
0
votes
2answers
26 views
Deeply nested data objects in VueJS
I've got a VueJs front end that fetches some data from an API. The app uses vue-router.
The data fetched for one component is similar to the following:
{
name: ...,
email: ...,
order: {
...
2
votes
3answers
62 views
Find and update value in array of nested objects
I have an object array as follows:
products = [
{
id: 1,
title: "Product 1",
specifications: {
price: 1.55,
discount: 15,
attributes: [
{
l1: 100,
...
0
votes
1answer
26 views
Vue js - Multiselect - Where to add event?
I am using the http://monterail.github.io/vue-multiselect/ Vue plugin in a laravel project and I am trying to get the tagging option to work. It is working but when I add the tagging JS I am unable to ...
1
vote
2answers
25 views
VueJS: Complete dynamic component transition before rendering new component
I have some components that i swap out using VueJs's dynamic component option. I set up transitions on the dynamic component. My issue is as follows:
-Currently, if a change the current view(or ...
0
votes
2answers
22 views
Two way binding between controller in routerview and parent
I have a single page application which consists of a:
A navigation component which contains a title and a menu
A router-view
I'd like each component being presented in the router view which ...
0
votes
2answers
40 views
VueJS - Invalid handler for event “click”: got undefined
I have list of elements which I want to go to edit when clicked.
I have similar solution in other component and it is working perfectly fine but in new one it is not and can't find why.
When ...
1
vote
3answers
32 views
'window' is not defined in Vue.js 2
I'm currently upgrading my application from Vue.js 1 to Vue.js 2. I have a problem with the following function in my main component:
<script>
export default {
ready: function listenKeyUp()...
0
votes
1answer
17 views
How to use a Vue VM variable in a component?
I have the following working code which displays elements of an array defined in Vue:
var vm = new Vue({
el: "#root",
data: {
numbers: [1, 2, 3]
}
})
<div id="root">
<...
0
votes
0answers
23 views
Enquire.js seems not to work with Vue.js version 2.0
I want to use Enquire.js in my Vue.js(v 2.0) project. There are a bunch of examples on the internet where users integrating Enquire with Vue.js.
For example here: https://jsfiddle.net/Linusborg/...
0
votes
1answer
22 views
In Vue 2 after passing props v-for does not get updated after items are removed
If I pass an array of objects using props in Vue 2 and on this array I use the v-for directive, view does not get updated if one of the array elements get removed.
This seems to work only if the v-...
0
votes
1answer
35 views
Vue.js Router: why $route.router.go() not working?
Why doesn't work redirect to page with vue-router 0.7.13 + SweetAlert? I do like this (Laravel 5.3):
Here is article.blade.php:
...
<a href="#" v-on:click.prevent="deleteArticle('/articles/{{ $...
-4
votes
0answers
32 views
Usage npm in Windows
I am using Laravel 5.3.1. I would like to use vue.js and CSS in my project. In this regard I installed and uninstalled node moduels several times.Each time I found error when I tried to execute gulp ...
2
votes
1answer
31 views
How to get route params to work with vue-router and vuex
I'm trying to pass data from a component to $route.params.post but somewhere along the line it's failing and I'm not sure how to get it to work.
In my component I'm using router-link to go to a ...
-1
votes
0answers
27 views
Getting wrong data when using mapGetters
In vuex, the data is like this:
when I use mapGetters,the data is like this:
The ParentID totally change and all the ParentID become the same one(10001).
here is my getter
areaList: (state) => {...
2
votes
3answers
48 views
How to use a default value for undefined object property in VueJS interpolation?
How to use a default value for undefined object property in VueJS interpolation? My data is a computed variable and is undefined at first before selecting a selectedDataId in a selectbox so vue sends ...
-1
votes
0answers
34 views
Vue.js - Variable number of checkboxes
I have a requirement for a task to have a variable number of checkboxes that represent special requirements for a task. The special requirements belong to a company id and each company can choose to ...
1
vote
2answers
60 views
Vue 2.0 - Failed to mount component: template or render function not defined despite defined render function
Working on an SPA using Vue 2.0. I'm bundling all my templates with Webpack from .vue files via Laravel Elixir, laravel-elixir-webpack-official and laravel-elixir-vue-2. I've reviewed pretty much ...
1
vote
1answer
26 views
vue-router not routing properly, no components are shown
I'm trying to use vue-router to show different components for different route. However it doesn't seem to be working.
I have a codepen of the compiled program here.
My main.js is just defining the ...
0
votes
1answer
23 views
What is the proper way to mutate values from an imported sibling component in Vue.js 2.0?
I'm using the single-file component approach with Vue 2.0. I have 3 components App (parent), AppHeader, and FormModal. AppHeader and FormModal are immediate children of App and siblings of each other.
...
1
vote
1answer
22 views
Using Vue-Resource in Vuex store; getting maximum call stack size error
I'm trying to pull an array from my api to a component using vuex but I'm at a loss and probably in over my head in attempting this. With the api being accessed directly from a component I had it set ...
1
vote
1answer
17 views
Params field is empty in $router.push
I use this
this.$root.$router.push({
path: '/dashboard',
params: { errors: 'error' },
query: { test: 'test' }
})
in my component to redirect to other URL when some error has occured. ...
3
votes
2answers
27 views
Deleting dynamic input fields in Vue
Noob question but I can get fields to render in Vue but not sure how to delete my fields. I added an index option in the v-for directives but not sure what to do after that. Thanks!
Here is a ...
1
vote
1answer
26 views
Scoped CSS in Vue losing scope when using ExtractTextPlugin
Example Vue code (working in development):
<template lang="pug">
.wrapper
</template>
<style lang="stylus" scoped>
.wrapper
min-height: 100vh
display: flex
justify-...
2
votes
1answer
32 views
Can I do dispatch from getters in Vuex
Fiddle : here
I am creating a webapp with Vue 2 with Vuex. I have a store, where I want to fetch state data from a getter, What I want is if getter finds out data is not yet populated, it calls ...
1
vote
1answer
24 views
Can't access $store when importing Vuex instance from an external file
I'm creating a counter using Vue & Vuex 2.
When trying to access the count property on the store object, using this.$store.state.count, I get an Cannot read property 'state' of undefined error.
...
1
vote
1answer
29 views
Run component method on load vue.js
hey I'm pretty new to Vue.js and I'm trying to accomplish what seems to be a simple thing but I'm, having trouble. Essentially, I need it so every time a component is loaded into the DOM, one of it's ...
1
vote
1answer
17 views
node-module vue-webcam is throwing 'Unexpected token' error in safari
I'm getting an error with a vue module that is imported in an app I am working on. The error is:
SyntaxError: Unexpected token '{'. Expected an identifier name in const declaration.
It seems like it'...
1
vote
1answer
25 views
Replacement for $eval in VueJS 2
$eval has been removed from Vue 2.
But, consider this JSFiddle (Vue 1): https://jsfiddle.net/kvdmolen/0w193c75
Here is JSFiddle with Vue 2.0.7: https://jsfiddle.net/kvdmolen/0w193c75/1/
Imagine ...
1
vote
0answers
32 views
Component in Vue.js server-side rendering
I am trying to make my Vue app have server-side rendering. I am using vue-server-renderer (https://www.npmjs.com/package/vue-server-renderer). Client-side rendering is working fine.
My app use vue-...
4
votes
1answer
39 views
How to pass a vue.js value as a parameter to a route in blade
I have a route in Laravel that requires an id as a parameter.
Route::get('/example/{id}', ExampleController@index)
If I had passed the data from the Laravel controller to the view value I would ...
2
votes
1answer
30 views
Use Vue's directive to change Dom style but not working
I'm trying to use Vue to build my app but I have a problem with image loading speed. I have written a directive to control it:
<div style="width:1280px;height:800px;background-size:100% 100%" ...
2
votes
1answer
50 views
Vue 2 and Vue-Resource [Cannot read property 'get' of undefined(…)]
Recently upgraded to Vue-2 using Broswerify and Vueify. In the main app I had to require vue/dist/vue.js instead of 'vue' since im not using Webpack, however now when I use Vue.use(require('vue-...
3
votes
0answers
52 views
Vue.js v-html contenteditable prevent dom refresh to keep cursor / caret from jumping
For reference I'm using Vue 2.0, Vuex, and Firebase.
I am building a contenteditable component using the v-html binding to render the innerHTML. The data is updated onKeyUp. Whenever the data is ...
1
vote
2answers
30 views
Weird error when running a simple vue.js app
I'm using vue.js 2.x and just set up a simple app using webpack.
When i start the app in dev mode, i get this error in chrome console and nothing is displayed on the page:
Uncaught TypeError: _vm....
2
votes
1answer
26 views
Vue 2 v-if not working after input changed
Maybe I'm doing it wrong but while binding v-if to two distinct input fields it only works if the input values hasn't changed.
var app = window.app = new Vue({
el: '#admin-app',
data() {
...
1
vote
1answer
24 views
How do you activate a class for individual elements within an array? [Vue.js]
I want to activate a class for each input individually. I have two inputs bound to the same v-model and class. I have a method that checks for something to be true, and if true enables the bound class....
1
vote
3answers
42 views
What is the simplest way to toggle a class on/off of an element without affecting other elements using Vue.js?
I have seen several examples of how to toggle a class in Vue.js like this:
new Vue({
el: "#app",
data: {
isActive: false
}
});
.demo {
width: 100px;
height: 100px;
...
0
votes
1answer
28 views
Any Idea how to do Session based authentication in laravel 5.3 using vue js and vue router
My biggest problem for now is the authentication
my head aches about this because im using api to fetch and send data to the server using vue
so ive tried doing the login thing with the AUTH ...
1
vote
1answer
33 views
vue-router 2, how to fetch routes via ajax?
How do I create the routes array dynamically, after fetching it via ajax?
Is there a way to add/push new routes to the router after it has been initialized?
This doesn't work:
new Vue({
el: '#app'...
0
votes
0answers
23 views
jQuery BlockUI + Vuejs + Webpack
I am creating a vue directive to work with VueJS! Actually I have made it work in other project which were made with Laravel + Vuejs.
Now I am doing it on the pure front-end project which I have used ...