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 | vue.js jobs

0
votes
0answers
10 views

vue.js named views load on app initiation

I'm new to vue.js and cannot figure out how to load and render a route when initiating a vue app. For example (see below link) how can I render the components of the "path: '/'" when the app loads. ...
1
vote
1answer
13 views

Vue.js Parameterised variable names

I'm trying to parameterise variable names so they can be passed as properties into my component. In the example below I want to use this to pass the names of the item variables into the array so I can ...
0
votes
0answers
15 views

Importing Vue components in Typescript file

I have been trying to use Vue.js with Typescript and I came across this repo https://github.com/YingLiu4203/TypeScript-Vue-Example. I faced issues here that i am getting error while importing. I am ...
0
votes
2answers
15 views

Load new JSON data and replace the old one in VueJS

I'm using a v-for loop with data fetched from JSON file. Is there a way to re-render the DOM and whole v-for loop after loading a new JSON file and replacing the old one? What I'm trying to achieve is ...
0
votes
0answers
10 views

Deploying a Vue.js app on DigitalOcean

I made an app using Vue.js on the frontend and Slim PHP on the backend and I want to deploy it on a DigitalOcean droplet. So far, I've managed to do the following: Created a Ubuntu 16.06 droplet ...
0
votes
0answers
10 views

Vue-resource headers are not passed

I'm trying to send a simple POST request through vue-resource. It requires a specifi header, which I'm passing though the headers option, but i'm still getting a 401 error, with a missing header ...
0
votes
0answers
8 views

Connecting Laravel Echo with vue.js to node.js socket.IO server

I've read through the laravel and Lumen documentation on broadcasting events, and it all seems very comprehensive IF you want to use pusher, it might be just me but the docs seem some what sparse if ...
0
votes
0answers
12 views

Bus.$emit not working

I am working on Laravel + spark + vue js. Following is my code app js Vue.component('spark-emergency', { data() { return { emergencies:[], deleteEmergency:[], ...
1
vote
1answer
15 views

What is the right way to create reactivity (default) properties in Vuejs/Vuex?

Im struggling to find the right equilibrium between creating default properties of an object and keeping them 'reactive'. Important note I am using Vuex for my store. I already checked: https://...
4
votes
1answer
33 views

In vue.js 2, measure the height of a component once slots are rendered

I am looking for a way to read the height (clientHeight) of a component after its slots are rendered (in the DOM) and then set the result to a reactive data for further computations. According to the ...
1
vote
2answers
61 views

Data variable not updating from method in VueJS

I'm using the following code to get visitors zip code(pin code) from HTML5 geolocation API. However, I want to get that zip code and update it to a data variable 'pincode'. Below is the code I used, ...
2
votes
1answer
19 views

Vue component not loading the data

I'm testing Laravel 5.4 with Vue Components. But the Problem is Vue Components not displaying in View page. Here is my Vue File : ChatMessage.vue <template> <div> <p>...
3
votes
1answer
16 views

Vue 2 Laravel 5.3 Eloquent unable to retrieve data from object

Vue2 has been reading eloquent pretty well so far for me but except this point where I struggle to debug. Shop-show.vue <template> ..... ..... <div class="row"> {{shop.user.id}}...
0
votes
1answer
8 views

what is capture mode on an event listener

In the vue docs under Event Modifiers, there's an example of a modifier called capture which states the following: <!-- use capture mode when adding the event listener --> <div v-on:click....
1
vote
1answer
16 views

State mutated by getter

I'm trying to write a getter that returns a simple number from state, decremented by 1 const getters = { getCurrentView: state => { return types.PAGES_OBJECT[state.currentViewNum] }, ...
0
votes
1answer
19 views

Laravel 5.3 and VueJS 2 Authenticating

Im using Laravels default auth to lock down some paths in the routes/api.php file. Route::get('/projects', 'ProjectController@index')->middleware('auth:api'); I log the user in via a PHP form (...
1
vote
0answers
16 views

How do you create a nested binding scope in vue.js?

A Vue instance can allow you to create nested view models. For example, consider the following new Vue({ el: '#app', data: { form: { firstName: "Joe", lastName: "Bloggs" } }...
0
votes
1answer
16 views

Using a simple vue.js/webpack setup, how does one configure the dev server to proxy everything EXCEPT a few .js and .vue files?

So some quick background on the site's current setup: My company's site currently runs off of a CMS. All pages are generated and routed via the CMS, so there are no .html files anywhere. It's all ...
0
votes
0answers
17 views

How to get a one page application (Vue.js) indexed by search engines

I'm building a one-page application using Vue.js and Webpack for bundling the client-side (HTML, JS, all in one file). It seems that search engines, such as Google, are having trouble indexing the ...
0
votes
1answer
14 views

Express router not catching requests, while static serving does work

I'm trying to combine JSON API endpoint serving with the standard project created by vue-cli webpack template. Trying to hook /api endpoint to my JSON API router. This doesn't work (/api requests ...
0
votes
1answer
16 views

Vue prop type validation object schema

In React you can define that a prop is an object and then also define the types of that object's properties, i.e the shape. In Vue it seems the only way you can check to see if an object is of a ...
0
votes
0answers
24 views

VueJs + Chart.js - Avoid ref for reactive updates

I am currently learning VueJs and fiddling around with Chart.js (https://github.com/apertureless/vue-chartjs). I tried to make a doughnut have reactive behaviour, but I only got it to work using the ...
0
votes
1answer
16 views

Vue.js pass callback through a prop.

I've got a component that looks like this: <template> <div> <pagination class="center" :pagination="pagination" :callback="loadData" :options="paginationOptions"></...
1
vote
2answers
23 views

Vue.js link in a tag

How do I link properly to another page with vue 2 ? I have a bootstrap table and every row has to link somewhere else how could I do this? If I do it like this: <tr @click="url(forum)">data</...
0
votes
1answer
28 views

Vue template or render function not defined yet I am using neither?

This is my main javascript file: import Vue from 'vue' new Vue({ el: '#app' }); My HTML file: <body> <div id="app"></div> <script src="{{ mix('/js/app.js') }}">&...
-1
votes
1answer
40 views

How to solve : [Vue warn]: Error when rendering component on the vue.js 2?

My component code (SearchResultView.vue) is like this : <template> ... </template> <script> export default{ props:['search','category','shop'], created(){ ...
0
votes
2answers
34 views

Vue-Select event trigger without Node.js

I am using Vue.js and Vue-Select without node.js. I am importing them directly into my html file like so: <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.js"></script> &...
0
votes
1answer
34 views

Updating custom component's form after getting a response

I'm trying to load in a Tutor's profile in a custom component with Laravel Spark. It updates with whatever I enter no problem, but the is always empty when loaded. The component itself is as follows:...
0
votes
1answer
13 views

Vue.js component to display password field

Let's say, I have <input type="text"> I want to allow user to enter password inside this input. Problem: how to display one value and to store another? To display modified value is very ...
-1
votes
1answer
51 views

How to display value of objects in vue.js 2?

My code is like this : <script> export default { props:['search','category','shop'], created(){ ... }, data(){ return{ ...
0
votes
1answer
26 views

vue.js save data in a new array with submit and display it in another table

I need to make 2 tables in which I can select data in one table and with submit show it in another table. Then with remove button to put it back to the first table. This is what I came up with so far. ...
0
votes
3answers
35 views

Class Binding ternary operator

I have some rather cumbersome logic I would like to apply to an element class. :class="{sportTypes.sports.indexOf(sport) > -1 ? 'is-primary' : 'is-outlined'}" The above doesn't work, while the ...
2
votes
1answer
34 views

VueJS - Mustache syntax showing up for a split second

I am trying to learn vue and created the sample below purely for test purposes: import App from '../comp/app.vue'; import Two from '../comp/two.vue'; const routes = [ { path: '/', component: ...
0
votes
1answer
4 views

Vue.js: Why won't my data display in this list containing multiple component types?

I am trying to get to a point where I can have multiple component types being rendered within a single parent. It's not something which is easy to search for answers on. I know that it is ...
0
votes
1answer
25 views

Getting x from remote sources and mirroring on to a list

Currently I have this, if with the full app it will create a post with my chosen parameters, however I am very new with vue.js, My aim is to be able to have a text file of such (or other way of ...
0
votes
1answer
41 views

CSS frameworks in Vue.js

I would like to integrate Bulma into my Vue.js project. I have previously included included the CDN script tag into my <head>. However after that, I followed these official instructions for ...
0
votes
1answer
18 views

Vue,js 2.0 — Errors Incorrect when installing a package

DevTools tells me it has detected Vue 2.1.6 I tried to install a package and received these errors and I am unsure how to continue > npm install vue2-google-maps --save > /Users/jgravois/...
0
votes
1answer
26 views

trouble adding jquery to webpack

i am new to webpack. i got installed through https://github.com/vuejs/vue-cli I donl't quite understand how to add jquery dependency. i have tried just about every tutorial i could find and nothing ...
0
votes
3answers
26 views

How can I update the data bound in this textarea using Vue.js?

I defined a textarea using Vue.js like this: <textarea type="textarea" v-model='myvalue'> {{myvalue}} </textarea> The data is defined here in a single component file (.vue file): ...
0
votes
2answers
34 views

Can't stop Vue JS (v2) from reusing components

I have a Vue app that conditionally displays sets of the same component, I'd like to tie in to the created or mounted methods, but Vue keeps re-using earlier components and not triggering the methods. ...
0
votes
3answers
34 views

Vue.js v-if not reacting to variable change

i'm playing around with vue.js and have some struggle in using v-if correctly. i'm trying to have a conditional template rendering inside a template. in the created method, the variable isloaded is ...
0
votes
1answer
31 views

Vue.js component stops working after returning error from server

I have big component which works like x-editable plugin: when user cliks on field it becomes editable, when user clicks outside - field becomes simple text and request with new data is sent to server ...
1
vote
1answer
21 views

Vue.js workflow from Vue.js 1 to 2

I have followed the Vue.js lessons from laracasts when Vue.js 1 came out and I used to do something like this: import Comments from './components/Comments.vue'; import Upload from './components/...
0
votes
0answers
16 views

webpack resolve alias for styles(stylus) as well in vue.js components

On a vue.jsproject in my webpack.config.jsfile i do have this: ///..., resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.common.js', 'assets': path.resolve(...
0
votes
0answers
23 views

Difference of two identical data points in model in a Vue.js component

In a Vue component, the data property items (Array) exist. During application usage items are added to this list, and item is an object. Vue.component('list-of-people', { template: '<ul>\...
0
votes
1answer
24 views

Vue.js - Push to object without tracking

I've got an object called Attendees and another object called TempAttendee. A form is bound to TempAttendee and when the user submits that form, it takes TempAttendee and pushes it to Attendees. The ...
1
vote
2answers
56 views

Separation of frontend and backend with Laravel and Vue.js

We are planning to develop a web application for job applications. In the first two years we expect the traffic to be about 3'000 - 6'000 visitors per day. At a later stage the traffic will grow up to ...
0
votes
1answer
14 views

Specify a root path for imports?

I'm converting my ongoing Vue.js app over to use vue-cli/Webpack and imported modules Something I'm finding rather tedious at the moment is specifying the relative paths for imports accurately. E.g. ...
0
votes
2answers
32 views

How can I use Laravel's baseurl on the vue.js 2?

I have 2 component Component 1, The name is SearchResultVue.vue component The component is like this : <template> ... <span class="pull-right" v-show="totalall>8"> ...
0
votes
0answers
23 views

Error WordPress REST API V2 call with Vue.js

I am getting the following error, when I make a call to WP REST API with Vue.js and axios. XMLHttpRequest cannot load http://my-wordpress-site.com/wp-json/wp/v2/posts. The 'Access-Control-Allow-...