vue.js (pronounced "view") is a progressive JavaScript framework that centers around declarative rendering.
0
votes
0answers
5 views
Vuejs html is not linking
i got a html file with vue js in it. The problem starts when i try to separate the script and the html file. <script src="java/test.js" type="text/javascript"></script>
<script src="...
0
votes
0answers
4 views
VueJS: fetch data in loop to build full data
I have list of schools. Each school have additional info. What is best solution to fetch data for each school by ID to build array like
[{school:{id:1, additional:[]}}]
before render schools
...
0
votes
1answer
14 views
Vue - input with multiple checkboxes
I'm rendering some checkboxes based on an array and using a data attribute as the v-model. I'm using Vue2.
However, I end up having all checkboxes checked for some reason, when the value of the v-...
3
votes
1answer
21 views
Conflicting components in scope
I am trying to abstract a Google Places Autocomplete input component in order to use it multiple times.
However, data and methods overlap when I instantiate more than 1 of the following component. (...
0
votes
0answers
14 views
vueifying X-Templates components
With vueify, we can get the HTML template as well as JS nicely combined and minified into a single file. However, our VueJs components were written using X-Templates and now we are in the process of ...
1
vote
1answer
24 views
Accessing Vuex in v-bind
I would like to access a value from a Vuex store module within v-bind.
<input @blur="validate_field"
name="firstName"
placeholder="First Name"
:class="{fail: this.$store....
0
votes
0answers
12 views
Setting up vue-cli alongside nodejs
I'm about to start on a little personal project and I would like some advice on how to stucturing it. How would I approach setting up express to serve vuejs generated by cli?
3
votes
1answer
29 views
Performing multiple requests Axios (Vue.js)
I am trying to perform two, non-concurrent request, but would like to use data from my first request before performing a second request. How can I achieve getting the data from the first request then ...
0
votes
0answers
21 views
Vue-js display some content object [on hold]
Bonjour,
(désoler mon anglais est faible, mon français aussi d'ailleurs).
J'aurais une question sur Vue-js, je souhaiterais afficher certains élément d'un object.
Petit soucis est que sur la doc ...
1
vote
0answers
30 views
Is it possible to include Vue Admin (Bulma) into Laravel?
I am pretty new to Vue.js and Js in general. I am using the Bulma.io CSS Framework and found the Vue-Admin Package which provides Vue Components in Bulma Styles.
I would like to use it but I am not ...
1
vote
4answers
58 views
How to sort li's in reverse
I'm trying to sort an unordered list in reverse (vueJS 2.x), but I can't seem to find any documentation on filters like there used to be in vue 1.x (similar to the way Angular 1 did it)
e.g:
<li ...
0
votes
1answer
18 views
Vuejs add multiple lines to a template?
I would like to know how best to arrange new lines when constructing a Vuejs template. The code I have as is does not work, as it breaks the JavaScript container. Vue.js wants me to put the entire ...
1
vote
2answers
56 views
Does Vuejs have similar API to remote asynchronous http calls (Ajax) as jQuery?
I know that Vuejs can be more effective than jQuery for DOM manipulation and user interactions handling. What about remote asynchronous HTTP (Ajax) calls? I'm searching for a Vue.js core API to do ...
-1
votes
0answers
33 views
Javascript vuejs object undefined - weird scenario
Inside vuejs mounted method I have following code:
data () {
return {
loadedItem: {labels: []},
}
},
...
mounted: function(){
var loadedItem = this.loadedItem; // neccessary ...
1
vote
0answers
21 views
Adding bower components to vue webpack
Is there any way to add bower_components to vue-webpack.
I tried some way it does not work.
webpack.base.conf.js
http://pastebin.com/Gae193xP
Component file
<script type="text/babel">
...
0
votes
0answers
23 views
How can I inject data get in router.beforeEach in my vuejs component?
I use router.beforeEach to protect some view. I fetch my user before entering in my vue. I want to use this user in all my authenticated pages. How can I inject data get in router.beforeEach in my ...
2
votes
1answer
24 views
Vue2 error when trying to splice last element of object
I have a Vue2 app wit a list of items which I can choose and show, or delete.
When deleting the last element in the list (and only the last one) - I get Vue warn - "[Vue warn]: Error when rendering ...
1
vote
0answers
74 views
How to get values in controller from form data?
In vue.js i have this:
var data = new FormData();
data.append('name',this.property_credentials.name);
data.append('default_image',this.$els.fileIntroImage.files[0]);
When i do this i have ...
0
votes
1answer
46 views
Form data is empty after using append?
I have a problem to append anything in form data. Its always empty. How can I append image file and some other data?
var data = new FormData();
fileResult = this.$els.fileIntroImage.files;
...
1
vote
1answer
21 views
Vue 2 Laravel 5.3 Infinte Update Loop
There is no console log error but anything that I put in updated() hook [in the current code getCartItems/] will be rendered infinitely for some reasons that I do not know. even I set it as alert('hi')...
1
vote
2answers
25 views
Remove repeated elements from v-for in VueJS
I'm using the following code to display categories from an array. The array may contain duplicate categories. Is there any way I can only select unique elements in VueJS?
<li v-for="product in ...
0
votes
2answers
33 views
vuejs v2 pass data to component and update parent when changed
What I want to build is a Form which can detect errors from its Inputs. The inputs are rendered (in my current setup) in a section in the form. But after hours of work, it doesn't work.
What is the ...
0
votes
1answer
28 views
How to handle image file in vue.js?
In my view i have this:
<input type="file" @change="onFileChange">
In vue i have this:
onFileChange:function(e) {
var files = e.target.files || e.dataTransfer.files;
...
1
vote
1answer
33 views
vue v-if/v-else does not remove style from buttons
I am using vuejs2 for my webapp with bootstrap.
I have two blocks with v-if and v-else, so only one of those renders. I have bootstrap button in each of these blocks. When I press the button from ...
0
votes
2answers
85 views
Search a list while typing in textbox VueJS 2
I have a list of users from an array. And I want to filter them based on the search box(name) at the top. I saw that there are filters in VueJS 1. But not available in VuesJS 2. How can achieve this ...
-2
votes
2answers
44 views
Injecting into <head> in Vue.js
I have a few EXTERNAL scripts that need to be loaded on various pages, such as Google Places Autocomplete, Facebook APIs, etc.
Obviously it does not make sense to load them on every route, however ...
0
votes
1answer
50 views
How can I periodically update my component in VueJS
I have a component in Vue that looks like this:
<template>
<div id="featured_top">
<i class="i-cancel close"></i>
<div v-for="item in toplist">
<div ...
0
votes
3answers
37 views
Gulp [Vue warn]: Failed to mount component: template or render function not defined
I have read over several SO questions about this with no luck.
I'm trying to run Vue with Gulp and no webpack but I keep getting the error.
[Vue warn]: Failed to mount component: template or render ...
0
votes
1answer
28 views
Passing vue slot generated inputs to root vue instance
Is it possible to pass a slot generated input fields value to the root vue instance?
Here is my blade code:
<template slot="update">
<td>
<div>
&...
0
votes
1answer
34 views
How to dynamically import a component
I'm trying to create a generic form field in Vue that can be configured to use various different widgets for input. I'd like to have a directory of inputs and then import the correct one and use it in ...
0
votes
0answers
55 views
Vue2.x how to use computed attribute in components?
child component get the value from parent component,use ref in child component and the parent component use $refs to get the child component instance.But if child component get the parent component ...
0
votes
2answers
47 views
Vue.js: How to get the offsetX from the “currentTarget” when mouse moving over its child elements?
For instant:
<div class="synonym-list-wrapper" @mousemove="onMouseMove($event)">
<ul class="synonym-list" ref="synonymList" :style="{transform:'translateX(' + translateX + 'px)'}">...
0
votes
1answer
28 views
Display a specific element of an array after a query
I'm in trouble to display a specific element in an array with vuejs 2.
After this query I obtain an array with 20 elements :
this.$http.jsonp('https://api.instagram.com/v1/users/self/media/recent/?...
0
votes
1answer
41 views
How to use dynamic style in vueJs
Is there any way to get data as props in vueJs component and use the value inside section?
something like :
<my-component color="red" >
and to use red as a dynamic value inside section of ...
-1
votes
0answers
23 views
transition on functional component within router-view does not work?
see jsfiddle.net/faisalhakim47/qaL09rvn/31/.
it works when one of the component is functional and the other is not functional. It is intended behaviour?
1
vote
1answer
29 views
Vue2: Why do I get infinite $http.get requests when I assign property from response?
I make $http.get call to back-end where I process data and return a result, and I want to assign property to this dynamically (the property is declared in data list):
watch: {
send_amount: ...
2
votes
2answers
40 views
Do Vue watched properties cache just like the computed properties?
In the Vue docs it is mentioned that computed properties are smartly cached as opposed to using regular methods:
In comparison, a method invocation will always run the function whenever a re-render ...
1
vote
2answers
54 views
vue-axios `catch` function doesn't trigger when expected
I have a Vue app in a single file component which allows the user to lookup a github username and see the fullname, login, and country the user is from.
Here is my component:
<template>
<...
0
votes
2answers
17 views
How does one handle ' in user-supplied data in vue.js?
So I have a block of user-supplied text I'm pulling in from a CMS. However, in that string is a simple ' which blows up the whole string and returns an error. I'm trying to locate a solution to keep ...
3
votes
2answers
36 views
How to use vue-datetime-picker in single file component
I am trying to use vue-datetime-picker
<vue-datetime-picker class="vue-picker4" name="picker4"
:model.sync="result4"
type="time"
...
2
votes
1answer
41 views
How to filter comments with vue.js?
In my view i have this :
<select class="sort_by">
<option selected disabled>SORT BY</option>
<option value="name" >Name</option>
<option ...
0
votes
3answers
39 views
Vuex: accessing store directly or passing properties?
I'm migrating a pure Vue application to Vuex, and I'm not sure about the best way to pass data to the components downstream. The Vue way is to pass them as properties:
<component :my-prop="myProp"/...
0
votes
0answers
15 views
Merging API and client app for Heroku deployment
I have a VueJS client app which consumes a PHP / Laravel API. They are developed separately and have their own GIT repos.
I'd like to deploy both to Heroku as a single application so they can share ...
1
vote
1answer
36 views
Vue Js - issue with axios Performing multiple concurrent requests with laravel
alright I have small issue may be but I can't figure it out.
if I pass only one http request using axios all work good.
but when I use multiple request I get result in console log but can't able to ...
1
vote
2answers
40 views
How do I watch all keys in a data object in Vue 2
My data object:
data: {
selected: {
'type': null,
'instrument': null
},
My template:
<select v-model="selected['instrument']" @change="switchFilter('instrument', $event)"&...
1
vote
3answers
42 views
Treeview with nested inputs with VueJS
I'm trying to build a treeview component comporting inputs in order to change my source json.
The binding part seems to work fine but the hide/show action on branches is broken :
HTML :
<div id=...
1
vote
1answer
16 views
Do something after response is finished?
What im trying to do is add in array some data after response is finished.
Im trying to check if reponse is ready but without success:
this.$http.post('/blog/article/' + articleid + '/comment', ...
0
votes
2answers
34 views
How to add active class to specific element?
I have this methods :
methods: {
replyBox: function(e){
e.preventDefault();
this.isActive = !this.isActive;
);
},
In view i have this:
<...
1
vote
0answers
19 views
Call method from another component VueJS version 1
I want to call the method from another component in let's say parent component... So, let's say I have notie.vue and there's my method named 'flash' and I want to call that after API request when I ...
0
votes
2answers
34 views
className not working in VueJS method
I want to change the classNames of all elements with the class on "link". I am using a method which is called via a click action on the element. I tested out getting a length from the function and ...