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
2answers
12 views
HTML Tags containing Vue.js v-if and v-for directives flash at loading
I use Vue.js to send data to a basic and very simple API that subscribes an e-mail address to a newsletter via the form below and to display some messages (e.g.: state and errors).
I use in ...
0
votes
0answers
8 views
Draggable table tr is not moved in vue.js
I use vue.js 2.0 and I made draggable table using Vue.Draggable.
It has no error, but when I try to drag tr, it is not moved. But using div then it moved. Did I have something missed?
index.html
<...
-2
votes
0answers
13 views
Vue 2.0 with Vuex cannot work
I tried implementing website by using vuex but the error showed
Uncaught TypeError: Cannot read property 'getters' of undefined
I have searched a lot about this problem but still doesn't work. Can ...
0
votes
1answer
16 views
add <tr><td> tag happen trouble using vue.js
I have a table when I create a data it will update
and I want using Vue.js to do
so I to see Vue.js Components and try
<div id="app1">
<table class="table table-bordered">
<tr>...
0
votes
4answers
40 views
How to display button link with vue.js?
My view is like this :
<div class="panel panel-default panel-store-info">
...
<div id="app">
<AddFavoriteProduct></AddFavoriteProduct>
</div>
.......
1
vote
0answers
15 views
Vuex actions targeting with deep hierarchical data?
Is it possible to structure vuex in a way which I can execute an action like buildings[0].apartment[1].room[2].dispatch('paint', 'white');
If not what's the way to go about executing an action ...
1
vote
1answer
24 views
Express.js net::ERR_CONNECTION_CLOSED
I'm running a Universal Javascript application on Heroku.
My Vue.js app is being loaded by Express.js and requests are proxied to https://localhost:3000/api.
I am trying to make a simple POST ...
0
votes
1answer
18 views
Delete an item of a computed list in Vue.js
I would need to display a list of items, and be able to erase one of them when needed.
<tr v-for="(todo, key, index) in todo_list">
<td><input v-model.trim="todo.priority" type="...
0
votes
0answers
13 views
Typscript import Vue.js with require.js
I have a small problem with this class:
import {Vue} from "../../../libs/vue/vue";
/**
* Created by Joshua on 24.01.2017.
*/
export class ToolbarVue {
public static load() {
new Vue({
...
0
votes
3answers
23 views
Using Vue.js to loop through with v-for adding 1 each time inline
I am looking to loop through questions.questions each time adding on like you would but I guess I need to do this inline as I think wish to use the number created to update item as the key in the ...
0
votes
1answer
29 views
reverse array issue in VueJs
i get conversations message via facebook graph api and i need to reverse data.
in computed reverseChat function i try return this.chat.data works but not reverse() when i try JSON.parse(this.chat)....
0
votes
0answers
16 views
Vue 2 v-model data binding with nested property
I have a bound select to nested data:
<select class="form-control" v-model="user_profile.sport.sport_id">
<option v-for="sport in sport_information.sports" :value="sport.sport_id"&...
0
votes
1answer
18 views
Vue.js v-for loop from an object key and nested array
I have quiet a complex v-for loop inside another v-for. Basically displays a list of questions and a list of answers for that question. I plan on getting the key for the question and using that for ...
0
votes
1answer
28 views
How do I set initial state in Vuex 2?
I am using Vue.js 2.0 and Vuex 2.0 for a small app. I am initializing the the store in the 'created' life-cycle hook on the root Vue instance by calling an action that retrieves the initial state from ...
0
votes
0answers
17 views
Registering component in Spark with vue
My view file is at
C:\laragon\www\evacguide-spark3\resources\views\vendor\spark\kiosk\emergency_plan_template.blade.php
My JS file is at
C:\laragon\www\evacguide-spark3\resources\assets\js\spark-...
0
votes
1answer
12 views
How to access Vuex module getters and mutations?
I'm trying to switch to using Vuex instead of my homegrown store object, and I must say I'm not finding the docs as clear as elsewhere in the Vue.js world. Let's say I have a Vuex module called '...
0
votes
1answer
27 views
require.context not a function when trying to run Mocha tests
I'm trying to run tests using the Mocha.js + JSDOM frameworks, but I'm having trouble getting Mocha to start up. This is in the process of testing a React app using the Vue.js library. I keep getting ...
0
votes
1answer
13 views
In the webpack-simple Vue.js template, how can I access the Vue app from the console?
I've created a Vue.js app using vue-cli with the webpack-simple template, and it works great. In the provided main.js, I changed the new Vue(... line to var vm = new Vue(..., so that I could access ...
2
votes
1answer
33 views
Push to vuex store array not working in VueJS
I'm using Vuex to show a list of users from 'store.js'. That js file has array like this.
var store = new Vuex.Store({
state: {
customers: [
{ id: '1', name: 'user 1',},
]
}
})
I ...
0
votes
1answer
23 views
How to properly fetch data from API in vuex?
I'm working on my Vue.js application and having a trouble with fetching data via API with vuex-router-sync.
As I saw in every tutorial or sample, it is common thing to dispatch the store action on ...
0
votes
0answers
9 views
Vue2: How is reuse existing directive in my custom directive?
Code for my custom directive:
Vue.directive('position', {
// When the bound element is inserted into the DOM...
inserted: function (el) {
// exist directive v-sors
}})
3
votes
2answers
30 views
How to use an attribute selector with vue.js?
I would like to apply a computed style to an input form. The documentation explains how to do that, but only for simple styles.
I need to apply the equivalent of
input[type="text"], textarea {
...
-2
votes
0answers
13 views
regarding spark-laravel while making the view part by vue.js
vue.js?3de6:2658 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
(found in component )
&...
1
vote
1answer
20 views
Vue JS 2 Data Object Changes However Method Doesn't Run
I have the following Vue JS component that I am having an issue re-rendering on data changes.
Vue.component('careers-list', {
template: `
<div id="career-list">
<div class="context"&...
1
vote
1answer
30 views
Input field live validation using vuejs
I got an input field, which I want to be live validated. As its only one single field, I would like to avoid using a whole library for vue form validations.
There are three things I would like to ...
1
vote
0answers
16 views
VueJs only show google map when location is set
So I'm trying to build a simple app that shows distance to locations on a Google map, from a user's current location.
I'm using Vue.js 1.0 and the vue-google-maps plugin.
I'm trying to center the ...
0
votes
1answer
25 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-...
1
vote
1answer
31 views
Using “this” in Vuejs 2.0
I am new in VueJS.
I am having a small problem that i could not figure it out. Hope some one can give me a hint.
I am creating a voice search button, basically when i click the voice button then it ...
2
votes
2answers
27 views
CSRF token using SPA
I'm using Vue js for the SPA and Laravel for the backend. It all works fine but once a form has been submitted the crsf token obviously hasn't refreshed so when I go to then submit another form I get ...
-2
votes
1answer
21 views
Passing down props resulting from an async API call : getting undefined
I started using single file components in Vue to try and be more modular with them, and I have difficulties passing down props when they are set by an async response from an API.
Here is exactly what ...
0
votes
1answer
25 views
Can't get webpack to work client-side with Babel
Full Code here
I'm trying to implement Vue Single File Components using express/handlebars. According to that page, I went & installed Webpack (and then Babel).
Superficially, Webpack is working:...
2
votes
1answer
35 views
vue JS not propagating changes from parent to component
I am pretty new to Vue Framework. I am trying to propagate the changes from parent to child whenever the attributes are added or removed or, at a later stage, updated outside the component. In the ...
0
votes
1answer
32 views
Vue 2 - receive event arguments and scope variable in event handler
In Vue 2, I'm trying to use a custom event handler that receives arguments from a component and receives the current index (from v-for) as an argument.
I've found several ways to do this (hat-tip to ...
0
votes
0answers
34 views
Property Undefined on Vue Component
Getting an error that project is undefined when trying to render out some text using {{project.projectSummary}} in my ProjectContainer component. I'm guessing when the component is initialized project ...
1
vote
1answer
42 views
Vue.js 2.0 Multi-step Wizard
I am working on a multi-step wizard using Vue.js 2.0.
I have based this on an example I found using vue 1.0.26.
I have updated the code and think it is 90% there but can't figure out how to fix it, ...
0
votes
1answer
22 views
Vue JS data object not available within my methods
I'm getting a little bit confused by Vue JS and how it is working. I have the following component:
Vue.component('careers', {
template: `
<div class="context">
<div v-for="career in ...
1
vote
2answers
52 views
Handle click in VueJS and jQuery
I'm new in Vue, and I'm really in doubt about something. Well, I'm in doubt about the way we handle click event in Vue and jQuery. For me, at this moment, jQuery seems to be more simple to achieve.
...
1
vote
2answers
35 views
Vue JS v-for not iterating over array
Hi guys I am using Vue JS to try and loop through my data. Here is my whole JS file:
var contentful = require('contentful');
var client = contentful.createClient({
space: 'HIDDEN',
accessToken: '...
0
votes
1answer
39 views
bootstrap-datetimepicker with vue.js not working properly
I am trying to use bootstrap-datepicker with Vue.js
Trying to create a simple datepicker component.
The problem is, when I write into input, component's data is updated.
But when I use datepicker gui, ...
0
votes
2answers
28 views
v-model doesn't support input type=“file”
I can not use v-model with file input, Vue says I must use v-on:change. Ok so I can use v-on:change, but how can I bind the "content" of the input file to a data property?
Let's say I want to bind it ...
3
votes
1answer
27 views
Vue js - Update index value doesn't update the second component's view
I have this pretty simple Vue js page as below:
<html>
<head>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
...
10
votes
3answers
353 views
In Vue.js, is there a way to keep component templates out of JavaScript strings?
I just worked through the Guide on Vue.js's website, and I have a bad feeling about templates for components. It seems strange to me that they are specified in strings; sure, maybe this works for ...
3
votes
1answer
23 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. (...
1
vote
1answer
18 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
27 views
Losing 'this' scope in a Vue + Vuex + Phaser reactive call [duplicate]
I was trying to make a game using Vue + Vuex, but in the middle of the project I realised that the most interactive part of the game had to be made with Phaser, then I decided to use Phaser for that ...
1
vote
1answer
25 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
1answer
27 views
Initializing materialize elements in Vue.js
How can I initialize the Materializes' select or modal elements in Vue.js? When I add the following code in my document ready the elements do not work.
<script>
$(document).ready(...
0
votes
3answers
52 views
Filter list with Vue.js
I just go started with Vue.js and here is what I'm doing: I am rendering a list of products, and each product has a name, a gender and a size. I'd like users to be able to filter products by gender, ...
2
votes
1answer
32 views
VueJS Reactive Binding for a Plugin - How To?
I am working on a Vue plugin for Pouch/CouchDB which will be open sourced, but as long as i can figure out an issue i am having:
Currently i am trying to make the plugin closely to resemble Vuex, ...
0
votes
1answer
19 views
Vuejs custom properties on root element
While developing my app I have had a wrapper (simplified for this example) which is the root of all my elements in the site. However I needed to include a component with custom properties alongside ...