I have a Vue 2 project, and I’ve written a simple function for translating months in dates, which I would like to import in one of my components, but I’m getting an error: export ‘default’ (imported as ‘translateDate’) was not found in ‘@/utils/date-translation’ The relative file path from the src folder is correct, and I am exporting the function like
Tag: vue.js
How to use filter to search in multiple key values of objects in an array?
I have an array of wines containing objects with data for each wine: I can figure out how to search — case insensitive — for a wine object, while specifying which key of the object to search in, like this: Returns: However, if var search = ‘Winery 3’ or var search = ‘red’ then it will obviously return no results,
Vuelidate: validate on click, not when field touched
I’m kinda new to vuelidate, and everything works fine, except I have no clue how to run validation only when the button Submit has been clicked. Right now it marks touched field red when you start providing any input and I’d like it to wait with that, till user wants to submit filled form. Here’s what I’ve got up to
Directive v-if doesn’t work when changing tab
I’m trying to build a simple listing system that shows a list of items for different platforms, each platform is on a seperate tab . I created the tab switching logic via VueJS from scratch . What I’m doing: Basically I have two platforms : twitter and facebook, when user click on one of the tabs, the frontend send an
Get element where Event is binded
I am binding an event to an element either using @click property in Vue (it behaves the same as javascript .onclick property). The problem I have is when the event is called by propagating from the child DOM nodes click events I get the child DOM element as target property and I cannot find a way a clean way (without
Charts.js with vue not drawing charts after fetching data
This is how json response looks like [[61,57,34],[1,1,3]] I want to use the first array for labels and the second for data. If I set labels and data inside app manually it works though. eg labels: [“q”, “w”, “e”] data: [1, 5, 10] component on page The data seems to be loaded but there’re no chart bars on page. Answer
Vuejs transition on table rows
I’m trying to have a transition (animation) on html table row (vue.js) with no success. Here’s the full example I am expecting that the hidden table row should appear with transition/animation on opacity property when it appears, but nothing is happening, how am I supposed to do so? This is perfectly working on another element like span or other. Answer
For loop and strange Vue behaviour
I’m working on a project where I want to add some more input fields when clicking on a button. So I tried jQuery.append but then there was a problem with v-model not being detected. So I tried to achieve the same thing using Vue if-statement and I figured out it could be done much simpler by just adding objects to
How to determine whether a checkbox is checked or not in Vue js
I just want to determine whether a checkbox is checked or not in Vue js 2. In jquery we have functions like $(‘input[type=checkbox]’).prop(‘checked’); which will return true if checkbox is checked or not. What is the equivalent function in Vue js. Here is the scenario with code. Please note i am using laravel with its blade templates. The js part
Vue.js To add class active when click and remove the previous one
I want to achieve this active link on my div element here you can see the example that i want to do with my code http://jsfiddle.net/fiddleyetu/9ff79/ in here using vue.js i can’t do the active link on my div elements here is my code for the elements on which i have to do the links active js Answer I’m new