I’ve already seen the answers to this question, but it’s not the solution I need, since it’s for jQuery, and I need something for vue.js. So far, I was able to detect single character presses using the ff. code: The code above successfully prevents the textbox from accepting ArrowLeft, Home, and Control key presses. The problem: I’m trying to figure
Tag: vue.js
VueJs 2.0 emit event from grand child to his grand parent component
It seems that Vue.js 2.0 doesn’t emit events from a grand child to his grand parent component. This JsFiddle solves the issue https://jsfiddle.net/y5dvkqbd/4/ , but by emtting two events: One from grand child to middle component Then emitting again from middle component to grand parent Adding this middle event seems repetitive and unneccessary. Is there a way to emit directly
Vue.js devtool change not showing up
I am currently working with moment.js inside a Vue component but I am not seeing certain changes show up in vue devtools. My example: I am guessing this has something to do with the fact that I am calling a method on my moment data property instead of manipulating it directly like a number. An example like this works perfectly
Accessing Vuex state when defining Vue-Router routes
I have the following Vuex store (main.js): I also have the following routes defined for Vue Router (routes.js): I’m trying to make it so that, if Vuex stores the user object, and it has the authenticated property set to false, is has the router redirect the user to the login page. I have this: The problem is I don’t know
Vue props that aren’t explicitly declared
I am making an attempt at something similar to redux-form but in Vue & with Vuex. Basically it should make the handling of forms more streamlined and make you write less boilerplate. The problem i’m having is when i’m trying to pass props dynamically to a component from a HOC. I’m not quite sure how to do it. In React
Vue.js Axios bug HTTP request change my array but don’t show change
I have a very strange problem in vue.js/axios. Scenario 1 : clear my products variable BEFORE send an HTTP request (see “<<<<< SCENARIO 1” mark). Then set products variable with a new array. It works but we see a flicker (due to the HTTP request duration). So I decided to clear the products variable IN the request. Scenario 2 :
Is it possible to import *.vue files in a folder?
I hate repeating things in code. For now I am importing vue files like this in my main.js. Is there a way to do same thing with less lines? Could be great if I can assign variable name from filename. Can PHP help about it? But then how to compile main.js? I did not figured out. Answer I use this
Vue.js – components data do not update
I have a Vue list that is based of an array and each array item renders a component where I bind the array item properties. This component has a mixed data, based on the binded properties The problem is that when I change the initial list array in any way, the mixed prop of the component maintains it’s original update
Vue.js – How to properly watch for nested data
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 some child component through a v-for directive, below a simplification of my implementation: … then inside <script> tag: item objects are like this:
Vue.js with Rails not working
I am trying to send an AJAX call to Rails Controller to fetch some data and use Vue.js to output it. But it doesn’t seem to be sending any kind of request to the Controller. What am I doing wrong here? Vue.js does work without AJAX call app/assets/javascript/calculator.js app/controllers/calculator_controller.rb app/views/calculator/index.html.haml Answer Instead of ready try mounted: