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

1
vote
2answers
29 views

Why is v-for not working in this VueJS todo app?

I'm building an extension that has an advanced todo app, The user add todo tasks, those tasks will be saved on localStorage, when the extension has a certain state (called "work") , it shows those ...
0
votes
1answer
9 views

Vue.js how to set :id prefix string?

class="tab-title" v-on:click="tab" v-for="(tabTitle,index) in tabTitleList" :id="index" I found this example in an vue community, but in my situation, I want my "id" has a prefix, not just a ...
0
votes
1answer
17 views

How to setup a centralized state for a mapbox map in Vuex?

I just started using vuex with vue. I do (roughly) understand the docs. I have a specific issue for which I am not sure whether I should use vuex and if so how to go about. I have an app in which ...
-3
votes
0answers
14 views

What can replace the websocket to connect with IOS?

when i reload page, websocket aways close, and can't reconect. ``English poor, could you understand?
0
votes
1answer
16 views

How to use npm package: vue-material with laravel 5.3?

I try to install a packages from https://www.npmjs.com/package/vue-material-datepicker but its showing error again again my question is how to add any npm packages in laravel 5.3 from scratch
0
votes
0answers
37 views

Vue image uploading

I have a simple vue component with form, i already can add some data to the database with that form. But now i need to upload some images and i'm stuck on this. I found a component vue-upload-...
1
vote
1answer
23 views

Using SASS in Vue components the right way

In my Vue component, I changed the language from the default CSS to the explicitly set SCSS, like this. <style lang="scss"> div.bordy{ border: solid 3px red; } </style> I also changed ...
5
votes
3answers
52 views

How to trigger a vue method only once, not every time

I'm handling a rotate even on change: <div @change="handleRotate"></div> <script> export default { data: { rotate = 0 }, methods: { handleRotate () { this.rotate ...
0
votes
1answer
24 views

Binding Input in Vue not working

I would like to call a function with a value when a user starts typing in an input box. I have tried two approaches. The first approach is trying to use two-way binding to a model. However, after ...
0
votes
1answer
35 views

vue.js: how to handle click and dblclick events on same element

I have a vue component with separate events for click/dblclik. Single click (de)selects row, dblclick opens edit form. <ul class="data_row" v-for="(row,index) in gridData" @dblclick="...
0
votes
1answer
15 views

Vue-router reload component

I have a few routes that each load 3 components. Two of the components are the same on all routes. When I move between those routes I want to pass new data and on some init event of the component I ...
0
votes
0answers
13 views

Rendering a list based on a shared property in Vue

I'd like to render out a list of components based on whether the type property is of a certain type. For example, if resource.type === 'article' then render all of the resources with type article, etc....
0
votes
2answers
472 views

"Failed to mount component” error on Laravel 5.3.10 + Vue.js 2.0.1

I have been working on Laravel + Vue.js. I would like to develop Vue components onto Laravel Blade template, but when I tried doing that, the following error occured, and it doesn’t work well. * For ...
4
votes
2answers
30 views

How do you update a specific child element on click using Vue.js?

If you've got a list of items with click events attached, how do you apply a specific change to a clicked child element using Vue.js (2.0)? Here's an example: HTML: <div id="root"> <...
1
vote
2answers
13 views

webpack 2 exits with code 3221226505 when importing external css (in vue.js component)

I'm trying to use Google's Material Components for Web in my project. The problem is that when I'm adding the import statement, webpack doesn't output anything but exits with code 3221226505, ...
1
vote
0answers
7 views

Do we have router.reload with vue-router

I see in this pull request: Add a router.reload() Reload with current path and call data hook again But When I try following from vue component: this.$router.reload() I get this ...
1
vote
1answer
29 views

Vue.js : removing item from list after added a new item caused a bug

<li v-for="(l, i) of lineList" :key="l._id"> data () { return { lineList: [] } }, methods: { query() { axios.get(domain + 'line') ...
1
vote
1answer
22 views

why items are not loading in blog.vue?

I am loading template from blog.vue in app.js, but with this it displays only header row of table not table rows as ajax call is not made. If i comment require('./bootstrap');, it does not display ...
4
votes
1answer
19 views

Vue.js on focus textbox on load

How to focus on load using VueJS? If using jquery, all i should do is: $(document).ready(function() { $('#username').focus(); }); Is there a vue-way or not?
0
votes
0answers
23 views

get content slot as string with Vue js 2

I need get string inside slot before that slot is compiled. Is posibble? Example <div> <slot> <component-test text="test1"></component-test> </slot> </...
1
vote
1answer
29 views

How to handle mouse up when the mouse leaves the div?

I'm creating an element that can be dragged, rotated, and scaled. It's basic structure looks like this: <div class='interactable' @mousedown='handleDown' @mouseup='handleUp'> </div> <...
1
vote
1answer
29 views

redirect to different page with success message after payment - Vue JS

I have a payment modal that opens up, once the user fills it out, and if the payment is successful, I want to redirect to a different page, with a success message. Im using Laravel 5.3 and Vue JS. ...
2
votes
1answer
28 views

Can't Target repeated component in DOM - Vue.js

Excuse any syntax errors, It works perfectly, but I could have made an error copying over. Problem: I have a component, 'dropdown', that is repeated three times with v-for='(item, index) in ...
0
votes
0answers
16 views

Vue router shows lazy-loaded route components only once

I'm using Laravel 5.3 as a backend and Vue combo (Vue 2.1.6 + Vue-Router + vue resource + gulp/webpack etc) as my frontend. My project is a single page application (SPA). Everything worked fine ...
0
votes
1answer
18 views

Vue passing multiple props

I am building a website using the PHP framework Laravel. I want to created a vue component that will be used for creating and editing a record. I have gotten this to work with passing one property to ...
0
votes
0answers
11 views

Vue single file component and SugarSS from PostCSS with Webpack

I'm trying to use SugarSS in Vue single file components and Webpack 2, but no luck so far. Here's my component file: <template lang="pug"> h1 hello! </template> <script> export ...
0
votes
0answers
8 views

Forcing Vue component to re-render

So this must sound a bit strange, but I made a Vue application that acts as a documentation for our main application built in angular. One of the things I want the documentation to do is display some ...
0
votes
2answers
39 views

javascript run function only once per button click

I use vue.js to handle some button clicks and run a method. So a button like <button id="signup-photo-button" v-on:click="photo">{{ photoButton }}</button> will run this method just ...
0
votes
1answer
16 views

vuejs variable in html attribute

So I am trying to set the src of an element to a js variable and its just not working. I have tried a few ways and I cannot get it to work. Here is one way <source src="{{ this.show.podcastUrl }}" ...
0
votes
0answers
143 views

VueJS2 with vue-resource creates infinite loop…?

I am using vue-resource with vuejs2 I have built a few components for some of my models.... in this case, I am using retailerOrder which has a one to many relationship with BillOfLadings. The ...
1
vote
1answer
24 views

Laravel, jquery/vue.js time difference

Welcome ! I can't find anything what will match to my code. How to do time diff with jquery or vue.js? It'll substract arrival field from departure input field and automatic show time in total time. ...
3
votes
1answer
19 views

Returning promise from api and putting into global data

Sorry if this is obvious but new to vue and my js not so great..... I'm trying to get some data from an api and then put that data into a global object so it can be passed down to some child ...
0
votes
1answer
29 views

Using Vue and Angular 1 Together

Can we use AnguarJs with Vue? As Vue is more like a library than a framework so what are pros and cons of using them together?
2
votes
0answers
19 views

How to import external template in vue js?

I am beginner to vue js, not sure i am asking correct or not. I want to make following type of structure for my Laravel 5.3 - Vue Js App. my-vue.js Vue.component('my-component', { template:...
0
votes
2answers
27 views

Vue order list view

I've been working with vue js 1.27 on a project and I need to be able to sort a list by numeric values, Alphabetic and reverse order. I've been trying this all day with not really much progress. I'...
0
votes
2answers
32 views

Why is Vue.js Chrome Devtools not detecting Vue.js?

I have the following code with a simple working Vue.js application. But the vue.js devtools is not responding. It was working well a few days ago, now it's not working anymore what could possibly be ...
0
votes
0answers
11 views

Error while importing a data provider that uses VueResource before Vue.use(VueResource)

I was trying to import the store in the bootstrap file of Vuejs 2 app, inside the store, I'm using a data provider which uses VueResource... Doing so, I must import the store which uses VueResource ...
0
votes
2answers
24 views

Script file inclusion in Laravel 5.3

How to include Script files like vue.js and app.js in Laravel 5.3 ? Is there any special way to include them ? I am including them like below. <script src="http://127.0.0.1/addbook/node_modules/...
1
vote
0answers
18 views

Echoing pice of html including vue.js directive with php?

Is there a way to echoing a piece of html code from server including a vue.js directive ? For example : $a = "<a href="javascript:;" id="removeMagazin" value="'.$v['id'].'" class="fa fa-remove" ...
0
votes
1answer
18 views

router-link to path with index [duplicate]

I have 10 filters in table and I want that each name goes to specific link. My table row <md-table-row v-for="(row, index) in manage" :key="index"> I need something like this in first table ...
2
votes
1answer
28 views

Proper way to attach class to user input

I have a WYSIWYG editor (Tinymce) where I allow users to post a youtube video. To make a video content responsive I want to attach class "video-container" around "iframe" tags that's inserted when ...
1
vote
1answer
25 views

Vue.js mixin does not work correctly in component

This is my mixin in Vue.js: var myMixin = { data () { clockInt: '', clock: '', currentTime: new Date() }, mounted () { this.intervalSetup(); }, ...
0
votes
0answers
16 views

Instantiating components in parent component

I'm having some trouble finding the "Vue" way of dynamically adding/removing subcomponents to a single-file Vue component. I have a collection of input-fields with some logic as a seperate Vue ...
1
vote
0answers
14 views

Intermittent Axios Get Request Failure

I have a laravel and vue js application, I'm having intermittent issues with a get request with Vue JS & Axios, I can hit the route directly in my browser and it works fine the data is returned. I ...
3
votes
2answers
46 views

How to separate vue js file code from laravel blade?

I am currently working on Laravel 5.3 and Vue Js, i have following structure of application. resource/view/layouts/plane.blade.php (works as master.blade.php) resource/view/layouts/dashboard.blade....
1
vote
1answer
36 views

How can I get the list value in a component?

For example, I have import a component named <pic-upload> in the template, like <template> <pic-upload></pic-upload> </template> export default { data: () => ({ ...
0
votes
1answer
31 views

How can I abstract the following pattern? (using Vue.js)

I am learning Vue.js. I like that it is lightweight. I am creating a user interface where there are "Device" objects. Each Device has inputs and outputs that can be accessed by mDevice.inputs or ...
1
vote
0answers
19 views

Vue.js component falls outside of bootstrap modal

I have a Cart component that contains a table inside it. When I place the Cart component inside of my modal, the table from the Cart component horizontally overflows outside of the modal. Can someone ...
1
vote
0answers
36 views

VueJS 2 and Vue Resource - Chrome Crashes (infinite loop?)

Using VueJS2 with vue-resource Building a trait for handling CRUD functions. My model data is stored in data at key selectedClientModel (for example), and so, the component that uses this Trait ...
1
vote
0answers
18 views

trumbowyg editor with vuejs

I am using the trumbowyg editor control in my vuejs spa. From the documentation I know that I can use the following code to set the contents of the editor. $('#editor').trumbowyg('html','<p>...