Tagged Questions
Vue.js is a library for building interactive web interfaces. It creates data-driven user interfaces with a simple and flexible API.
0
votes
1answer
25 views
how to pass object vuejs
In My laravel + Spark + Vue js project, I have used https://github.com/Vanthink-UED/vue-core-image-upload, They have code like
export default {
props:{
cropBtn: {
type: Object,
default: ...
0
votes
0answers
10 views
On-demand rendering of precompiled Vue.js components (webpack 2)
I'm trying to on-demand render vue components. Application consists of 4 parts, each should be rendered to the DOM only after calling some function, something like renderProducts()
I'm using webpack ...
0
votes
2answers
56 views
Using jquery method in vue?
How would I go about useing a jquery method on a vue object? Used to using some simple methods so not sure how to change it in vue.
Example: Remove commas from input value
this.purchase holds the ...
6
votes
2answers
925 views
What is a proper way of end-to-end (e2e) testing in Vue.js
Of cause I can use selenium-standalone with xpath to test an app. But testing SPA could be challenging sometime.
But, for example angularjs's team provides protractor for this purpose.
The reason ...
0
votes
1answer
46 views
Access to props inside javascript
I just start to learn vuejs 2 but I have an issue, I'm passing a props to a child component like this :
<div class="user">
<h3>{{ user.name }}</h3>
<depenses :user-id="user....
0
votes
1answer
26 views
Pass object on other component Vue js
I'm beginner in Vue.js and I'm kinda confused how to pass an object in other component...
My problem is I have two component file named Component A and Component B.
Component A has three buttons and ...
0
votes
1answer
20 views
Setting value in vue.js select gives `undefined` value
When vue component receives update via websocket it sets new value for <select>.
Related code
window.VueBus.$on("updated", (channel, key, value) => {
let ...
0
votes
3answers
33 views
Vue.js create dynamic AJAX response based multiple components
I am trying to create an SPA using dynamic server response.
For e.g. data returned is:
components: [
{
name: "Parent1",
data: {...},
children: [
{
component: {
...
1
vote
0answers
21 views
How to make a sidenav below the toolbar in vue material?
So I am using vuejs with vue-material and I have a problem.
So this is what it looks like without the fixed sidenav.
And when I add a sidenav..
As you can see the toolbar is under the navbar which ...
1
vote
1answer
23 views
Vue2 Laravel5.3 How to send data from child to parent on event
What I am trying to achieve here is that when I click on the item in Item-card-product-choices.vue it will trigger selectPC with argument productChoice.id and this will also trigger parent to listen ...
1
vote
1answer
35 views
How to put variable in a href on the vue js 2?
When I run this : {{nextPage}}
The result
http://chelseashop.dev/search-result?page=2
But when I put in a href like this :
<template>
<nav aria-label="Page navigation">
&...
1
vote
1answer
26 views
VueJS dynamic property name not updating value
I am trying to implement an associated array combined with accessing the property within the value, the key is based on the value of the campaign object.
<li v-for="campaign in campaigns">
&...
0
votes
3answers
415 views
Axios can't set data
Here's my data:
data: function(){
return {
contas: [{id: 3,
nome: "Conta de telefone",
pago: false,
valor: 55.99,
vencimento: "22/08/2016"}]...
2
votes
1answer
29 views
How to get value in vue.js from select?
Im trying to get value of select region in vue.js but i get an empty value.
alert(this.property_credentials.district);
Any suggestion how can i get value from select ?
<select v-model="...
3
votes
1answer
36 views
Calling multiple methods on an event handler
I would like to do this
@click="update_value && selected = true"
Clearly it fails and so does this:
@click="update_value"
@click="selected = true">
How do I run multiple methods from a ...
1
vote
1answer
129 views
Vue js with vuex computed properties with v-for and v-model
I need to use v-for with v-model. I read the docs and there is no example of how to use it with v-for without performing mutation outside the mutation handler.
How can I use v-model inside v-for ...
2
votes
1answer
47 views
Having trouble adjusting height of the div items when overlaying a grid on an image
I'm using Vue.js & vuetify to make a SPA.
I have a component that has a background image onto which I'm overlaying a grid. The image adjusts its aspect ratio when I change the width of the page....
1
vote
1answer
32 views
Limitations of beforeRouteLeave?
I'm using Vue.js with vue-router, and have a question about the 'beforeRouteLeave' navigation guard. I am using it for dirty-checking of a product object in my ProductDetail component, when the user ...
2
votes
3answers
117 views
+50
Vue js add dynamic fields in list with remove and sort not working
I am using Vue js 1.0.25.
I want to create a list using dynamic textboxes. The basic idea is on clicking Add Answer button, it should create a dynamic text-box along with its index number like Ans 1 ...
1
vote
1answer
4k views
VueJS - model binding not working with inputs using jQuery plugins
I am working on converting a form to utilize VueJS. The form has an input for a date of birth that uses eonasdan/bootstrap-datetimepicker (http://eonasdan.github.io/bootstrap-datetimepicker/).
The ...
0
votes
2answers
28 views
How to best tackle sharing of state between components in same view
I have a projects view that contains 3 components, <project-item>, <project-list> and <project-view>. All of these components need to be aware of the selected projects.
<project-...
1
vote
2answers
2k views
Vue.JS: How to call function after page loaded?
I have got next Vue component.
Login as calling Login function.
checkAuth -- is calling checking Authorization status between page refresh.
But how I can call checkAuth without pushing on button?
...
1
vote
1answer
28 views
vue - select option change triggers vuex mutation error
I'm using vue2.
I want to get select option object in v-for
HTML:
<select
class="custom-select"
@change="onPlanSelected($event)"
v-model="selectedPlan.objectId">
...
3
votes
2answers
29 views
How to change a specific (this) button class when click on. Using Vue.js 2.0
When clicked the any of the buttons they are all turns active. So what i want is just the clicked one should be changed.
var vm = new Vue({
el: '#toolBtns',
data: {
isActive: false
},
...
-4
votes
1answer
55 views
Why is my route returning 500 error?
I'm trying to write my first Vue component and make it post some data to my Laravel backend. For some reson the post returns a 500 error. Why is this? And yes, the csrf token is part of the headers ...
1
vote
2answers
905 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 ...
1
vote
1answer
12 views
Unable to access values in VueJS template
I can't access the user's email in my template. Here's what I did:
Vue.component('officemates', {
props: ['officemate'],
template: '<li>{{ officemate.name }} | <a href="{{ officemate....
2
votes
1answer
18 views
How do you realize the “in-out mode” transition effect when using dynamic route matching in Vue.js?
Is it possible to make the transition effect operate in "in-out mode" by dynamic route matching of Vue.js?
I would like to have a professor if possible.
When I had this trouble, I was able to find ...
1
vote
1answer
22 views
Vue.js 2.0 Dynamic Props Docs
js 2.0 and I'm stock in dynamic props.
See Image attached
My HTML code like this:
<div id="app">
<div>
<input v-model="parentMsg">
<br>
<child v-...
0
votes
0answers
14 views
Having to explicitly remove '.key' before setting/updating data in Firebase
I've created a Vue/Vuefire component for editing an existing Widget and saving the edits to Firebase.
There are some reactive properties on the Widgets that should not be saved to Firebase, like ...
0
votes
1answer
21 views
Vue.js v-for items won't render
New to Vue js and I'm building my single page app here: fiddle. I'm having trouble with my for loop (I believe).
const store = {
items: [{
todo: 'Clean Apartment.',
},{
todo: ...
2
votes
1answer
24 views
Listening for multiple keyup events in Vue 2.0
I am developing a messaging app and i need to list multiple event listeners for the message box (textarea). When the user press enter (@keyup.enter), the message will send automatically. However, we ...
2
votes
1answer
29 views
Vue.js - event handling with on-mouse-click down (and not up)
With Vue.js 2 when I add in an @click event to an element and attempt to click something, the event isn't triggered until after I have completed my click (press down -> up).
How do I trigger an event ...
3
votes
0answers
46 views
How to work with Typescript in .vue files using VS Code?
I'm using Visual Studio Code, Vue 2 (webpack template) and Typescript.
This is my App.vue component:
<template>
<div id="app">
<navbar></navbar>
[content ...
0
votes
2answers
23 views
v-bind href Retargeting to Localhost INSTEAD of Actual Link
The current button is binded to the data from v-for="book in books". The url in the database is equal to www.google.com.
<md-button v-bind:href="book.url" target="_blank">SEE ORIGINAL</md-...
1
vote
1answer
20 views
How to use router in actions.js of vuex?
This is code from main.js where I`ve configured my router
enter code here
const router = new Router({
routes,
mode: 'history',
saveScrollPosition: true
});
sync(store, router);
const ...
0
votes
1answer
35 views
Vue router - Handle query params
I have a <search-bar> component that have some dropdown that i will use as filter search. When I press the submit button i run the following code:
search() {
let query = {
status: this....
0
votes
1answer
38 views
Vuejs form submit not working
I want to submit the values in my form but each time I press the submit button I get the following error:
Uncaught TypeError: login is not a function
at Object.submit [as fn] (eval at Yr (vue.min.js:...
10
votes
2answers
9k views
Vue display unescaped html
How can i manage to get html interpreted inside a mustache binding?
At the moment the break () is just displayed/escaped.
Small vue app
var logapp = new Vue({
el: '#logapp',
...
0
votes
0answers
34 views
laravel 5.3 and Vuejs Ajax call on select box
i want a newly added record to be viewed on a select box once a new record has been inserted in the table, here is my laravel html code
<div class="form gorup">
<select class="form-...
0
votes
0answers
19 views
Database Saving Issue Vue.js and Rails
I'm trying to create a nested form using Vue.js inside a Rails application. I'm using a nested form to save ingredients to a recipe. Right now everything in the ingredients saves but the name of the ...
1
vote
1answer
22 views
Laravel vue js integration - No values in blade file
I try to integrate vue.js with laravel 5.3. I call "gulp" which creates the main.js file in the public folder. I can see in the browser that the js file is loaded but the value of "message" is not ...
0
votes
1answer
18 views
Why onclick event doesn't work with vue-router?
i want to use vue.js with vue-router, but..
in App.vue:
<template>
<div id="app">
<hello></hello>
<router-view></router-view>
</div>
</...
1
vote
1answer
15 views
VueJS Accessing JSON Data
I am accessing data via an API I would like to display in a list. I am testing VueJS right now and have trouble displaying it properly.
The data is:
{
"data": [
{
"userReference": "R100"...
0
votes
0answers
11 views
Testing single file vue components with tape?
I have tried..
compiled js from dist/static/js
different options from vue-template-compiler
..with no luck. Even after .$mount vm.$el is undefined. I keep getting error messages that I should create ...
1
vote
1answer
28 views
Vue Router beforeRouteLeave doesn't stop subcomponents
I have a simple question. I just want to cancel sub-component when route changed. Here is a sample. There is a home component which is the parent. And it has a subcomponent. I just want to stop ...
1
vote
1answer
30 views
Trying to display a component template
I have a vue component, the /people is a json of all the people on the website like so:
<template>
<div class="col-md-2 col-sm-4 col-xs-6" v-for="people in persons">
...
1
vote
0answers
21 views
proxyTable not used with axios
I am using cross-env npm package to run my dev server. I was using vue-resources before, but I read that it is not recommended anymore, so I switched to axios library. Unfortunately now proxyTable ...
1
vote
1answer
41 views
Extend vue.js component from third-party library
I'm using component ElDatepicker from element-ui and I want to change it's template and event handler method.
I'm trying to do something like this in single file component:
import Vue from 'vue';
...
1
vote
2answers
19 views
how to get dynamic data into array and append it to dom vue.js
I want to append my the data that i clicked, but I get the same output as undefined.
<template>
<aside>
<ul>
<li v-for="link in links" > </li>
&...