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
0answers
11 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
9 views
Registering component in Spark with vue
Here i placed my view file
C:\laragon\www\evacguide-spark3\resources\views\vendor\spark\kiosk
named as emergency_plan_template.blade.php
Here i create my js file
C:\laragon\www\evacguide-spark3\...
0
votes
1answer
8 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
25 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
11 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
19 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
0answers
12 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
28 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
9 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
17 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
13 views
VueJs only show google map when location is set
So im trying to build a simple app that show's distance to locations on a google maps,from a users current location.
Im using vuejs 1.0 and the vue-google-maps plugin.
I m trying to center the ...
0
votes
1answer
22 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
27 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
26 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
18 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
24 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
28 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
33 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
40 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
21 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
50 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
34 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
36 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
27 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>
...
9
votes
3answers
338 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
22 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
15 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
25 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
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
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
51 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
31 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 ...
3
votes
1answer
33 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
27 views
Unable to view vue component on logged in profile
I have a vue component which can be seen on other users's profile but not on logged in user.
when I visit other user's id i can see that component but when I come back to my id it disappears
profile ...
-3
votes
0answers
33 views
Is there some vue-like solution for pure project
With .vue we can put style, script, template to one file.
It's good for component management.
But some times need a tiny(size is important) like embedded SPA.
Frameworks should be banned and focus ...
0
votes
2answers
33 views
Manipulating the data value in Vue.js
How can I set the value of name to the property personOne in object? So that name will have the value of Alex.
var app = new Vue({
el: '#app',
data: {
name: '',
object: { "...
2
votes
1answer
25 views
error in unit test vue.js karma : undefined is not a constructor ()
This is my first unit test and I'm getting an error message that couldn't find why I get it in the forums so far.
This is my unit test:
import LoginPage from 'src/pages/Login'
describe('Login.vue', ...
0
votes
0answers
24 views
Don't “require” an already imported library using Laravel's Elixir and Webpack
This question is more webpack related, but since I'm using laravel's elixir tool I need some help to accomplish what I want.
In my project, I have 2 files, a vendor.js with vue + jQuery and another ...
0
votes
1answer
32 views
Laravel 5.3 & vuejs fragment instance issue
I'm running a Laravel 5.3 application which supports VueJS out of the box with webpack. I'm having an issue making using vue-multiselect, which displays:
[Vue warn]: Attribute "v-model" is ignored ...
0
votes
2answers
28 views
VueJS api call leaving data undefined
I am learning VueJS 2.0 and I am connecting to an API where I want the value of some data to change on input change. Here is what the output says using the dev tools:
canadianDollar:undefined
...
0
votes
1answer
16 views
Check permissions before vue.js route loads
does anyone know how to check a user's permissions before a vue.js route is rendered? I came up with a partial solution by checking permissions in the created stage of a component:
created: function (...
0
votes
0answers
22 views
unable to see vue component on logged in profile
I have a vue component which can be seen on other users's profile but not on logged in user.
when I visit other user's id i can see that component but when I come back to my id it disappears
...
0
votes
1answer
62 views
Vue router - API Data not fetching on redirect
I'm building an application with JWT Login and i check if the user is logged in (when visit /) and then i redirect to Dashboard:
let routes = [
{ path: '', component: Login,
beforeEnter(...
0
votes
1answer
18 views
How to get a specific value from vue.js asp.net-core-mvc result set
I've made an implementation of vue.js in an .net-core mvc project which will return data from a controller. So let's say that the result is:
[{"id":1,"uniqueStr":"string1","ttlValue":"something","...
0
votes
0answers
38 views
Vue.js component updates inconsistently
I'm just experimenting with Vue.js and have encountered what seems to be inconsistent behavior by Vue.js updating a component. (The commented out <span> triggers the behavior I expect.)
The ...