Tagged Questions
0
votes
1answer
18 views
How to solve error “Uncaught (in promise) TypeError: Cannot create property” ? (vue.js 2)
My code is like this :
<!DOCTYPE html>
<html>
<head>
<title>Laravel</title>
<link rel="stylesheet"
href="//cdn.bootcss.com/bootstrap/3.3.6/css/...
0
votes
1answer
39 views
Why in the browser does not show anything ? (vue.js 2)
I get from here : https://github.com/JellyBool/laravel-vue-pagination
Then, I clone it and I try on the my localhost
But, after it executed, in the browser does not show anything
I edit code on the ...
1
vote
2answers
32 views
How to disable value on the select option ? (vue.js 2)
My component is like this :
<div id="demo">
<div>
<select class="form-control" v-model="selected" required>
<option v-for="option in options" v-bind:value="option.id"&...
0
votes
1answer
38 views
Vue.js does not render correctly using template
I am working with Vue.js and Django. My goal is to display a list of bins, which I get over a REST API.
Here's my JavaScript-Code:
Vue.component('bin-detail', {
template: '#bin-detail',
props: ['bin'...
0
votes
0answers
19 views
Update data in component with different content vue.js
I got 10 users (for now) in my list in sidenavigation. I show them like this:
<md-list-item class="md-inset">
<router-link exact to="/user" @click.native="saveID(row.id)">
<...
0
votes
1answer
13 views
How can I access data from a parent route into the childs route?
I have 2 route components:
1) A people product list component
2) A product detail component
The list shows the products and then there is a router-link to that product using history in the router ...
-2
votes
0answers
24 views
Problems pagination with vue and vue-router
I got a problem when building SPA with vuejs using vue-router.
Everything works great without pagination. But when i go to next page. It is not update new Route
Somebody helps me out, please!
Here ...
0
votes
1answer
21 views
How to display the value of select option on value input text ? (vue.js 2)
My code is like this :
<div id="demo">
<div>
<select class="form-control" v-model="selected" required>
<option v-for="option in options" v-bind:value="option.id">{{...
0
votes
2answers
18 views
How to create a dynamic class value in a component in VueJS?
So I created a simple component:
Vue.component('m-textbox', {
template: `
<div>
<div class="input-field col s12 m6 l6">
<input :id="id" type="text" :value="value" @input=...
1
vote
1answer
25 views
Property mutation in Vuejs
So I have a multiple codes like this:
<input id="data" type="text" v-model="data">
<label for="data">Data</label>
And I tried to make a property out of it so that I won't repeat ...
1
vote
1answer
22 views
How to display response on the option select ? (vue.js 2)
My component vue.js is like this :
<script>
export default{
name: 'CategoryBsSelect',
template: '\
<select class="form-control" v-model="selected" required>\
<...
0
votes
0answers
18 views
How to solve “Uncaught (in promise) TypeError: response.body.forEach is not a function” ? (vue.js 2)
My component vue.js is like this :
<script>
export default{
name: 'CategoryBsSelect',
template: '\
<select class="form-control" v-model="selected" required>\
<...
1
vote
1answer
9 views
twemoji not working in .vue component
I am trying to use twemoji in my nuxt.js starter project. But it doesn't work.
Component:
<template>
<section class="container">
♠️ 🏁 ♥️
</section>
</...
1
vote
1answer
14 views
change value of bind in a list when triggered vue js
I'm very new to vue js. I tried passing parameter to get the index of the list when clicked but i still can't update it's attribute value.
I want to update the value of isState to "1" when click
...
0
votes
0answers
20 views
Components of Vuestrap not working with Vue2
In a single file component in the project created by vue-cli, i want to import some components of vuestrap:
import Vue from 'vue'
import alert from 'vue-strap/src/alert'
import dropdown from 'vue-...
0
votes
0answers
24 views
How to perform a transition on a simply component load with Vue.js
This is what the Vue.js documentation state:
Vue provides a transition wrapper component, allowing you to add
entering/leaving transitions for any element or component in the
following contexts:...
1
vote
1answer
23 views
Vue.js - How to properly watch for nested properties
I'm trying to understand how to properly watch for some prop variation.
I have a parent component (.vue files) that receive data from an ajax call, put the data inside an object and use it to render ...
0
votes
1answer
27 views
Keep list components alive in Vue
I have a list of components that I render using v-for. Not all the components are shown simultaneously. I page the the array of rendered components by using slice.
These components shouldn't be ...
0
votes
4answers
32 views
vue 2 parent get children component data
I'm using vue2 to develop my project.
When the component mounts (or beforeMounts), it fetches initial data from vuex, and put it to component's data. After the user clicks the button, it triggers the ...
0
votes
0answers
42 views
Why is my view not rendering data from my vue component?
I am trying to get a list of products from an api with a mixture of vue components and the vue-router setup. I am able to console.log data out inside the function that gets the data but I am unable to ...
0
votes
1answer
35 views
Pass object on other component Vue js [on hold]
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
3answers
84 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: {
...
0
votes
2answers
31 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
1answer
25 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-...
1
vote
2answers
25 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>
&...
0
votes
0answers
24 views
Vue.Js load modal from within component
I have a vue.js app with several different components, in one of them my 'feed' component i want to load a modal for a form.
in Feed.vue I have
<template>
<button id="show-modal" v-on:...
0
votes
0answers
24 views
Vue.js and Twig weird collision
Hello I have this code in my symfony 3 project :
TWIG TEMPLATE:
<div id="fileManagerContainer" class="AppContent">
{% verbatim %}
<!-- item template -->
<script type="...
2
votes
1answer
29 views
Vue-multiselect inconsistent reactive options
So I'm building an application using Laravel Spark, and therefore taking the opportunity to learn some Vue.js while I'm at it.
It's taken longer for me to get my head around it than I would have ...
1
vote
0answers
18 views
Browserify hangs with 100% cpu usage when trying to compile .vue component
Gulpfile
const elixir = require('laravel-elixir');
const gulp = require('gulp');
const watch = require('gulp-watch');
require('laravel-elixir-vueify');
require('laravel-elixir-vue-2')
function ...
2
votes
3answers
85 views
Smoothly animate v-show in VueJS
I was trying to animated two divs using transition in Vuejs. Below is the code (jsfiddle) that I've used. But don't know why it's not working
https://jsfiddle.net/k6grqLh1/16/
vue
<div id="vue-...
1
vote
1answer
26 views
Merge Vue props with default values
I have an options prop in my Vue component that has a default value.
export default {
props: {
options: {
required: false,
type: Object,
default: () => ({
...
0
votes
2answers
18 views
Vue.js Safari mobile and compatibility
I have a Vue.js component that works fine on Firefox, Chrome but Safari and Safari mobile browsers it fails.
The console returns:
Object.values is not a function
Is there a solution to this ...
1
vote
1answer
34 views
Cannot pass file to Laravel controller with VueJS
I have a simple form with a file upload and a text input as below:
<form v-on:submit.prevent="createStatus" method="post" enctype="multipart/form-data">
<div class="Image-input__input-...
1
vote
2answers
91 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
27 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>...
0
votes
1answer
35 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
51 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
42 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>
&...
-1
votes
1answer
52 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{
...
1
vote
2answers
43 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. ...
1
vote
1answer
25 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
2answers
39 views
How to run vue-cli build command when specified files modified?
I can build my js file with this command
vue build main.js --dist dist --prod --lib
It is ok but I want to do it automaticaly when I change js or vue files. I don't want to use browserify, webpack, ...
0
votes
1answer
21 views
create a component inside a component, getting erorr: “Failed to mount component: template or render function not defined.”
trying to make a component (tag: simple-div-container) that on a button press will create 2 (tag: simple-div) components, inside each new simple-div there will be a simple-div-container.
so i can ...
0
votes
1answer
38 views
Vue 2 component re-render after switching dynamic component inside it
I have a main component that import two other components:
admin page
login page
in the main component I have:
<template>
<div id="app">
<component v-bind:is="currentView">&...
0
votes
1answer
28 views
How to load the <script> part of a Vuejs single file component before <template>
In connection to the question I asked here, I have realised that my issue maybe because the template is being loaded before the script and when it gets an error that the variable is not defined, it ...
0
votes
1answer
36 views
Update a child's data component to the father component in vue.js using .vue webpack(vue2)
I am testing the components of vue.js and I encountered the problem of updating a parent component when the child changes.
I have generated the project with vue-cli (webpack), and I am using ...
0
votes
0answers
40 views
Vue2 router do not work when type manually
I have such code:
created: function() {
if(!localStorage.hasOwnProperty('auth_token')) {
router.replace({name: 'login'});
} else {
if(router.history.current.name == 'login') {...
0
votes
1answer
37 views
Vue.js method called multiple times using $emit and $on when it should only be called once
I'm using a bus to allow components to interact with other components via the method described in this link: https://forum.vuejs.org/t/create-event-bus-in-webpack-template/4546/2 .
I have a method ...
1
vote
1answer
27 views
How to access a method from vuejs component?
I am building a Tic Tac Too game with vue.js framework. I have declared a vue component called grid-item, when this item is clicked I want it to call the handleClick method.
when I run the code ...
1
vote
1answer
23 views
Vue 2, Cannot reference Prop Object in template
Problem: Although from the Vue DevTools I am passing the prop correctly and the router-view component has access to the data that it needs and in the correct format, whenever I try to access any of ...