Vue.js is a library for building interactive web interfaces. It provides data-driven components with a simple and flexible API. http://vuejs.org/

learn more… | top users | synonyms

0
votes
1answer
29 views

Vue.js Todo task with CSS animation and transition effect

How do you add a visual indicator such as a spinner and a tick when you save a new task in the example below. Basically when I click the save button the following should happen: Save button should ...
1
vote
0answers
14 views

Resetting a Vue.js list order of all items after drag and drop

I have a drag and drop component (using Sortable) but I can't figure out the logic to update the list order once the the item is dropped into it's new location. Code (Vue.js): new Vue({ el: ...
0
votes
2answers
17 views

v-cloak does not work in vue.js?

There is a div in my page that for show the error message.When I refresh the page,it will appear for a while then it disappear. I added v-cloak but it doesn't work. this is the code, showErrorMsg is ...
0
votes
1answer
24 views

how to get the changed value when change the form with vuejs form binding?

how to get the changed value when change the form with vuejs form binding? such as: the data bind to form: {a:1, b:2, c:3} after changed, it will be: {a:2, b:2, c:3} and how to get the changed ...
0
votes
3answers
82 views

Javascript object data binding with Vue

I have a JavaScript object that I am attempting to bind to a Vue view. I am running a function to update the JavaScript object using AJAX and I was expecting Vue to bind to the JS object and update ...
0
votes
1answer
38 views

Why aren't the changes to my variable being visible outside of this function?

The following code is a D3 snipped put inside a VueJS instance. The snippet creates circles and lets you drag them. new Vue({ el: 'body', data: { x: '', y: '' }, computed: { ...
0
votes
1answer
17 views

vuejs set a radio button checked if statement is true

I am trying to make a radio button checked using vuejs v-for only if my if-statement is true. Is there a way to use vuejs' v-if/v-else for this type of problem? in php and html I can achieve this by ...
3
votes
1answer
34 views

vue-resource Headers from the cross-origin response is not fully available.

response.headers() seems to parse the wrong header response when working with CORS. check this out: // REQUEST OPTIONS /mohsenin/loans HTTP/1.1 Host: mohsenin.app Connection: keep-alive ...
1
vote
1answer
115 views

Laravel 5.2 CORS, GET not working with preflight OPTIONS

The dreaded CORS Error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/mysite/api/test. (Reason: CORS header ...
0
votes
0answers
15 views

webpack-dev-server can not reload when an obj changed

export default { data() { return { userName: 'naraku', itemTotal: [1,2,3,4,5,6,7,8,9], nickName: 'ljs' } }, methods: { notify: ...
1
vote
1answer
52 views

VueJS - Components within components

I have hopefully a very easy question: I'd like to link components from within components in VueJS. What I have so far: create.js (which will be rendered with webpack to create.min.js) var Vue = ...
0
votes
1answer
24 views

Separate templates in vuejs, using webpack

I'm looking with interest at VueJS. I've seen the documentation about defining resources per component, but I would rather have template files separate from js files in my development environment. ...
0
votes
2answers
30 views

vue.js Giving a value to a href in a <a> tag

Sounds dumb but I can't find a way to pass a variable data defined in the href: ComponentFile.vue I tried all of those: <a href=" url ">{{ url }}</a> <a href=" {{ url }}">{{ url ...
0
votes
4answers
31 views

Losing autofus on Vue.js toggle of v-show

Strange, the autofocus attribute of my inputs don't work when I am changing the element being displayed See the fiddle attached: https://jsfiddle.net/e53Lgnnb/6/ Code: HTML: <body> <!-- ...
0
votes
0answers
24 views

Brunch.io Configuration For VueJS Components

I have a VueJS component which contains JS, CSS, and a Template. I’m working inside a Phoenix/Elixir skeleton. I need to configure Brunch to concatenate the JS to vendor.js, the CSS to vendor.css ...
0
votes
0answers
24 views

Vue.js Access v-for $index within a component

I'm using Vue JS to create a form which allows a user to add or remove rows as needed. Within the container I've created a custom Dependant component which has a title that reads Dependant n where N ...
1
vote
1answer
20 views

Add class in drop area (file input) when dragging an external image over (dragenter) in Vue.js

I've built a simple Drag & Drop image preview over the file input in Vue. It's works fine but when the image is dragged over the dropzone I want to add a class so it will highlight the area, which ...
0
votes
1answer
34 views

Vuejs: v-model array in multiple input

I'm amazed by what vuejs brings to the table, but I'm hitting a wall at the following. I have an input text field with a v-model attached, and every time someone hits the "add" button, another input ...
1
vote
1answer
37 views

Vue.js Vue Filter versus Vue Validator

I have a form, on which I am trying to use Vue's "currency" filter on certain inputs that are then validated using Vue Validator (https://github.com/vuejs/vue-validator). HTML <validator ...
1
vote
2answers
35 views

Calling functions inside Vue.js template

My template: <template id="players-template" inline-template> <div v-for="player in players"> <div v-bind:class="{ 'row': ($index + 1) % 3 == 0 }"> ...
0
votes
1answer
27 views

Vue.js: event after v-for is done

I am trying to build a simple chat app with Vue.js. My problem is that the message area needs to scroll to the bottom when a new message is written. I looping through the messages with v-for ...
0
votes
1answer
12 views

How to prevent Vue to interpreted custom tags?

I have got Vue App. But I need to to add to it some custom tags, that come from another JS framework. How to prevent Vue to try to interpreted it? <slider floor="100" ceiling="1000" step="1" ...
0
votes
0answers
15 views

Can I use Angulart as component (template) in Vue application?

I have got already written component in Angular. And I do not like to rewrite it. Can I use it's as template in Vue? I mean something like: var guestContent = Vue.extend({ template: ` ...
0
votes
1answer
24 views

Vue.js delegate event handler to parent component?

I have a global component on my VM, like this Vue.component('dropdown', function () { template: require('./templates/Dropdown.template.html'), components: { clients: ...
0
votes
1answer
56 views

Vue.js model binding to a jquery input

How do you bind an input using vue.js when the input is rendered using a jquery plugin such as datepicker. In my example below the two way binding doesnt work for the jquery colourpicker. When I ...
0
votes
1answer
19 views

Understanding components and props

I'm having problems figuring out how to use components and props. More specifically, I'm trying to update the data in a component and have it change the component. I have an array of objects which ...
0
votes
2answers
30 views

Create vue components with raw html

I know how to create a vue component constructor with simple html: var Foo = Vue.extend({ template: '<p>This is foo!</p>' }) But how to create it with a piece of DOM like this: ...
1
vote
1answer
37 views

Bootstrap row class each third element with vue template [duplicate]

<template id="players-template"> <div class="col-md-4" v-for="player in players"> <div class="panel panel-default"> <div class="panel-heading"> <h3 ...
1
vote
1answer
59 views

How to dynamically upload image in vue.js?

See the code: codepen I want to post the data by form; There is a add-image button,When I click the button first time and select the image,then show the image info in the page. When I click the ...
0
votes
1answer
30 views

vue.js and laravel 5.2, storing data to db

--EDIT-- This is working code now, use it as working example for your requests, please do comment if any modifications are to be made. --EDIT-- Im trying to build a simple one pager with contact ...
0
votes
2answers
39 views

Vue template conditional rener

<template id="players-template"> <div v-for="player in players" v-bind:class="{ 'row': $index == 0}"> <div class="col-md-4"> <div class="panel panel-default"> ...
2
votes
1answer
67 views

Logout from site cause error: 400 - Bad Request

I am using vibed.org framework. When I am processing logout function, I am getting strange error. Here is my App.d code: void main() { auto router = new URLRouter; ...
-2
votes
1answer
40 views

Vue.js / Algolia - Debugging

Looking for help debugging some code i've been staring at for 3 days. It's Vue.js / Laravel / Algolia. I feel that there's an error somewhere in my model but I can't see to get the it to fire. Any ...
0
votes
2answers
20 views

Render component template outside it with vue.js

I have a template: var playersList = Vue.extend({ props: ['players'], template: '#players-template' }); Vue.component('players', playersList); new Vue({ el: 'body', methods: { ...
0
votes
1answer
39 views

Why Won't This Vuejs “Hello World” Example Render On My Computer?

I'm trying to use Vue with a Phoenix/Elixir project. After a great deal of troubleshooting I still could not get Vuejs elements to render. So I decided to test the simple "hello world" example in raw ...
2
votes
1answer
34 views

Understanding component props in VueJS

I'm trying out vuejs by following along with the laracasts series of webcasts on this. In https://laracasts.com/series/learning-vue-step-by-step/episodes/8, Jeffery Way discusses custom components. I ...
0
votes
2answers
38 views

trying to reuse components in vue.js

i'm fairly new in vue.js and i'm trying to do an app where you can find books but i'm stuck at the moment to reuse components. When i open the app, the bookList component is used to show the most ...
0
votes
2answers
30 views

Vue JS, checkboxes and computed properties

I am having some problems using vue, checkboxes and computed properties. I made a very small example showing my problem: https://jsfiddle.net/El_Matella/s2u8syb3/1/ Here is the HTML code: <div ...
0
votes
0answers
32 views

javascript exporting imported variable/component

this is my following code hotel component : hotel.vue -------- <template> my template </template> <script> </script> ------------------------------------------- exports.js ...
0
votes
1answer
34 views

VueJS inside Laravel, can't pass data using props

This is the code (very simple) <div class="container" id="vueApp"> <div class="content"> <div class="title animated flipInX">BIG TITLE</div> ...
0
votes
0answers
9 views

Vueify: Command line usage to get rid of vue-hot-reload-api

I have this line of script: "browserify -t vueify -e components/comp1.vue components/comp2.vue | uglifyjs -o ../public/dist/js/build.js" But it is appending vue-hot-reload-api to the build file. Is ...
0
votes
1answer
26 views

How do i pass a var from v-for back through onclick to a method?

How do i pass a var from v-for back through onclick to a method? HTML snippet: <div v-for="image in images" class="addImg"> <img class="img-thumbnail" ...
2
votes
1answer
39 views

Accessing Vue methods from anonymous function

I'm just having a play with Vue.js (pretty new to javascript too) and trying to access the events in my Google calendar. I keep getting 'undefined' when looking in the console. new Vue({ el: ...
3
votes
1answer
35 views

Vuejs event on change of element value?

I have an element that I want to watch for a change like this: <span id="slider-value-upper" class="lower">50</span> Is it possible to do this cleanly with vuejs? I tried looking in the ...
2
votes
2answers
52 views

Vue.js event to fire after data is updated

I have a Vue.js app of which I have a couple of components for, just to handle some repetitive tasks. I'm also fetching data from an AJAX request. What I'd like some input on is if there is an event ...
0
votes
1answer
27 views

Setting initial value for computed property with vuejs

I'm trying out vuejs by following along with the laracasts series of webcasts on this. In https://laracasts.com/series/learning-vue-step-by-step/episodes/6, Jeffery Way has put the code in the ...
1
vote
1answer
47 views

Dynamically create a html structure in v-for

I am currently facing an issue with vue.js where I want to dynamically create html tags inside a v-for loop. The usecase is as follows: The resulting html should look something like this: <div ...
0
votes
1answer
84 views

Vuejs + Materializecss select field

I have this code in my template: <div class="input-field col s6"> <select v-on:change="selectChaned" v-model="item.size"> <option value="" disabled selected>Choose your ...
1
vote
3answers
80 views

jQuery and Materialize not updating VueJS select value

I have been working on this issue for a few hours now and it's really eating at me. When I use the combination of Materialize/jQuery and VueJS, to makea select, and then I try to select the desired ...
0
votes
0answers
30 views

How to send JSON?

I would like to send to server JSON. I do it with next code: var JSONObj = { "bookname ":"VB BLACK BOOK", "price":500 }; this.$http.post('http://127.0.0.1:8080/login', ...