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

Vue.js - Working with Components

I am new to Vue.js. Very new so this question might sound a lot like a first graders. Forgive me. I have the App.vue and Character.vue setup. I wanted to create characters on the fly and add them to ...
2
votes
1answer
25 views

Custom filter in vue 2.0 returns nothing

I am trying to build a custom filter that returns the items that match an input. It works well with simple arrays such as ['Apple', 'Banana', 'Cupple']. but doesn't with an array of objects (I am ...
0
votes
2answers
10 views

Vuejs use NeDB,can not find database files

Vue create project: vue init webpack-simple nedbtest install Nedb database: npm i nedb -S change App.vue : <template> <div> <button @click="insert">insertData</button> ...
1
vote
1answer
21 views

[Vue warn]: Cannot find element: #app

I have a fresh installed laravel project with all the components updated. All I did is tried to add app.js in my welcome.blade.php file, after adding the following I get this error [Vue warn]: ...
2
votes
1answer
26 views

Is it possible to trigger bootstraps dropdown creation manually? (VueJS)

It seems all the VueJS bootstrap components were built on version 1.x and I get nothing but errors (even with packages claiming to support 2.0) when trying to use any of the packages with Vue 2.x Is ...
1
vote
0answers
28 views

Server side computation of initial vue.js vuex store state

I am working on a project for which I have an API service and webclient service (Hosted on google appengine, just for information). The webapp/webclient is served by a golang server, which will take ...
2
votes
1answer
31 views

Call AJAX with Vue.js and Vue resource in Laravel

I'm making AJAX request in Laravel with Vue.js and Vue resource. I have view: {{Form::open(['method' => 'post', 'class' => 'form-inline', 'id' => 'main-form'])}} {{Form::text('param1', null,...
0
votes
2answers
20 views

Updated list when var (array) changes

I have a list of items, which I want to update when I update the array. This is my list of items: <li v-for="page in pages" class="menu__item"> <a class="menu__link" @click="currentPage =...
2
votes
1answer
40 views

Vue-if conditional not working. if-Else block appears to be skipped

This is a follow up question to one I posted here: (I have 2 records in a database Vue outputs 8 records). In that question, was having trouble fetching a JSON list of games for an online casino I'm ...
1
vote
0answers
12 views

Modifying instance data while ajax submit, reverts input data

I have the following method on my Vue instance: ajaxSubmit: function(event) { this.loader = true; var form = event.target; var action = form.getAttribute('action'); ...
2
votes
1answer
23 views

Replacing entire vue.js container

I have a vue.js widget that is instantiated as follows: var foo = new Vue({ el: '#v-container', methods: { populate:function() { // some custom code } }, }); ...
0
votes
1answer
33 views

Vue js in cordova

I'm struggling to implement a simple Vue.js app into Cordova. Everything works fine except that I don't know how I can intercept cordova events (deviceready, pause, ...) into my vue application. I ...
1
vote
3answers
44 views

How to dynamic change vue component props in js

for ex: <body> <div id="app"> <ro-weview id="wv" src="http://google.com"></ro-weview> </div> <script> (function () { Vue.component("ro-webview", { ...
2
votes
3answers
22 views

How do I pass options to SASS loader for style within .vue files?

I'm trying to configure vue-loader to make it include node_modules in @import statements. The loader config for scss files that works fine looks like this: { test: /\.(sass|scss)$/, use: [ '...
1
vote
1answer
23 views

Vuejs, Difficulties to build with relative path

I'm facing difficulties to make a proper build with a relative path when I run npm run build. Resolving assets is easy but I don't know how to configure 2 things: 1/ The assetsPublicPath in config/...
1
vote
1answer
31 views

On-page data entry interaction with Vue.js

I have a data input page where various actions are required when certain data is input. Currently to manipulate the data I send the data changes back to the server and refresh the screen. The ...
1
vote
1answer
16 views

Vue-loader giving me an unexpected token error

When I run the webpack command I get a strange error in the vue-loader library ERROR in ...\node_modules\vue-loader\lib\parser.js:25 output.styles.forEach(style => { ...
1
vote
0answers
30 views

Internal server error in vue.js?

I have this method: addCheckbox: function() { if(this.field.value) { this.fields.push(this.field); this.field = { value: '' }; } ...
1
vote
1answer
38 views

how to use vue.js in simple web application?

I am gonna planning to use vue.js in a web application. but it could not loaded and not fired html in browser. Please look at my below code: <!DOCTYPE html> <html> <head&#...
1
vote
0answers
16 views

vue with nginx: path not matching

I am setting up vue(2.1.x) with nginx(1.10.2), I have following configuration: location / { root /var/lib/myRepo/dist/; index index.html; } This works when I hit 'http://localhost:8080/', ...
0
votes
1answer
20 views

Vue js Build not working

I am trying to get vue js source code for production. I used this command npm run build . I got a dist folder with index.html and a folder named static with all css and js . when I tried running ...
1
vote
1answer
18 views

How can I use object props in Vue.js?

The vue.js documentation has this as an example: props: ['initialCounter'], data: function () { return { counter: this.initialCounter } } However, initialCounter works in my template, but counter ...
1
vote
0answers
17 views

How to make an Object with spread (…) notation reactive?

I'm trying to change the opacity attribute of an object and make that change reactive: Component.vue: <child-component :common="itemCommon"></child-component> <script> data () { ...
2
votes
1answer
27 views

How to bind the value separately returned from the component

I've imported the same child component twice in a component, and used $emit() and $on to get the result from the child component. Now I want to bind the value returned to each component. For example,...
2
votes
1answer
49 views

Vuex store with “strict: true” does not work

When I set strict: true I get error: vue.js:525 [Vue warn]: Error in watcher "state" (found in root instance) warn @ vue.js:525 run @ vue.js:1752 update @ vue.js:1720 notify @ vue.js:584 ...
0
votes
1answer
16 views

Naming convention for components which could share the name of an HTML element?

In my Vue project I have a component which acts as a site header, and a component which acts as a site footer. I can't use these as <header> and <footer> of course, because these are ...
1
vote
2answers
22 views

Missing X-CSRF-TOKEN in Vue headers

I'm trying to make a POST using VueJS 1.0.28 but I'm getting a Laravel 5.3 TokenMismatchException error. This is in app.js to cover both jQuery and Vue: Vue.http.interceptors.push((request, next) =&...
2
votes
1answer
17 views

How would one change the class of a rendered list item depending on its index with Vue.js?

I have the following Vue.js template code: <div v-for="(item, index) in items" :class="{col-sm-4: index !== 0, col-sm-8: index === 0}" > <a :title="item.title" :href="item.link"> ...
1
vote
2answers
37 views

Parent onChange sets child property to true

Form (parent) component: export default { template: ` <form name="form" class="c form" v-on:change="onChange"> <slot></slot> </form>`, methods: { ...
-1
votes
0answers
40 views

Why custom properties in Vue.js's VueComponents doesn't exist?

I found VueComponent's $options does't like normal Vue instance. In Vue instance'options,there are custom properties. _base: Vue$3(options) components: Object created: Array[2] directives: Object el: ...
3
votes
1answer
54 views

Return vue instance from vue.js filter (Vue.js 2)

I'm using filter function for internationalization like this: <div>{{ "hello" | message }}<div> message is a filter function that depends on global Vue.config.lang variable. It works ...
0
votes
2answers
38 views

vue.js i used 'v-once' in 'v-for' statement,why can't find 'item'?

<div v-for="item in imControls.messages" > <p v-once> <span class="" v-if="item.type==3">{{item.name}}:</span> <span class="red" v-if="item.type==4">{{...
4
votes
1answer
26 views

Vuejs dynamically toggle class is not working in Laravel Blade Template

I am novice in VueJs and As I am trying to implement the basic toggle class functionality using v-bind property of VueJs in my Laravel project. I am not getting the value of variable className while ...
3
votes
1answer
36 views

VueJS directive calculate if div is scrolled to the bottom

I'm trying to make a little directive that will keep the div scrolled to the bottom if the div is currently scrolled to the bottom, but will not scroll to the bottom if the user scrolls up, but will ...
0
votes
1answer
40 views

How to add and remove item from array in components in Vue 2

I made a component "my-item" which contains three elements: a dropdown (populated by "itemList") and two input boxes populated from the dropdown. This component is considered a row. I am trying to ...
0
votes
1answer
41 views

Masonry is not a function

I am trying to use masonry in my application. Following is my component template. <template> <div> <section class="section"> <div class="container"> ...
0
votes
1answer
44 views

How to @import external SCSS properly with webpack and Vue.js?

As in Material Component Web's example, I want to be able to import SCSS from my node_modules like this: @import '@material/elevation/mdc-elevation'; However, I'm getting this error message when ...
-1
votes
1answer
24 views

Pushing copies to Firebase

I am trying to push 15 copies of an object to a Firebase node which is an array. The object being pushed contains questionText and an answerText object. I didn't write the code for this particular ...
-1
votes
1answer
20 views

Getting TypeError: t.replace is not a function Vue.js

this.$http.post('../idea/comment'+idea_id, newResponse).then((response) => { //do something }, (response) => { }); //get returned comment //...
1
vote
2answers
27 views

Vuex: Access State From Another Module

I want to access state.session in instance.js from records_view.js. How is this accomplished? store/modules/instance.js const state = { // This is what I want to access in records_view.js ...
3
votes
1answer
31 views

Load form data via REST into vue-form-generator

I am building a form, that needs to get data dynamically via a JSON request that needs to be made while loading the form. I don't see a way to load this data. Anybody out here who can help? JSON ...
1
vote
3answers
44 views

How to pass href value to template in Vue

This is the HTML. <navlink v-bind:href="#about">About</navlink> And the main.js code is Vue.component('navlink', { template: '<li class="item"><a><slot></slot&...
3
votes
2answers
35 views

How to define a reusable function in vue component namespace

here is my code: Vue.component("ro-webview", { props: ["src"], template: `<div> <div> <div class="col-md-2 list-inline"> ${this.getIcon("fa-arrow-left")} ${this.getIcon("fa-...
0
votes
1answer
23 views

Components and Slots approach

I have actually 2 global components one for Admin and other one for Modal. The Admin component have a child comp called Page and the Page comp have others childs. I want to pass content directly to ...
-1
votes
1answer
26 views

How to time travel(rollback) in a state tree using Vuex?

How can I achieve a time travel feature using Vuex ? I want to go back for a previous state, to undo something. Is that possible out of the box ? Any idea on how to achieve that ? was hoping for ...
1
vote
0answers
33 views

Any ideas why is my Vue.js app working in a codepen but not locally on a jekyll site?

I created a pricing calculator using Vue.js with codepen and recreated here. it seems to be working fine but when I add it to my jekyll site and run it locally, no vue data is displayed. I am ...
1
vote
0answers
28 views

Laravel elixir angular and vue

guys! My project based on Laravel framework. For main site using Angular, but for admin panel need vue. I finded this package Larave-Angular with all configs. Package has this gulpfile const elixir ...
-1
votes
0answers
23 views

Vue.js alternative for vue2-filters for deep filtering

I am trying to implements functionality similar to deep filtering in Angular $filter('filter'). One alternative is to use vue2-filters package and use filter by filter here. Is there any ...
2
votes
1answer
47 views

The content not shown properly in function callback in Vue.js

I've got two problems here. The first is that I can't get the star rendered properly. I can do it if I change the value in the data() function but if I want to do it in a function callback way, it ...
3
votes
1answer
33 views

Retry failed ajax request in vuejs

What's the best way to retry failed AJAX request in VueJS ? bulkDecline(requests, decliner) { requests = _.map(requests, 'id'); return Vue.http.post(`${baseUrl}/api/decline/${decliner}/bulk-...