Questions tagged [vuejs2]

Use this tag for questions specific to version 2 of Vue.js, an open-source, progressive Javascript framework for building user interfaces.

1
vote
0answers
30 views

how to add types for vue plugin?

I try add self plugin for vue with type script. But at moment when i use my method from vue prototype, my method $auth does not exist on type myComponent. I also add .d.ts for plugin, but i think he ...
0
votes
0answers
24 views

Vue doesn't render data

I had a complex data structure and Vue handled it fine. Then I refactored it and suddenly nothing seems to work. I verified that the data structure was correctly assembled but nothing displays. Vue ...
0
votes
1answer
26 views

VueJS: Is there an easy way to validate email and password on client side based on the server side's validator?

I'm new to VueJS. I'm creating signup and login page and users are supposed to send the email and password to the back-end (I'm using Django) to check if the data is valid. I'd like to show error ...
0
votes
0answers
11 views

How to pass path option to dynamic import of component in Vue plugin

Salut! Trying to write a plugin for Vue.js which could make easier to manage SVG icons in the project. So basically I try to achieve icon usage without registering icons with dynamic import. It can ...
1
vote
2answers
19 views

How do you access exported vm (main vue instance) object from a component?

If I start my vue instance from a main.js file //main.js var vm = new Vue({ el: '#app', render: h => h(App), router, data: { } }); export { vm } app.vue itself is a router ...
0
votes
1answer
11 views

How to call a function after vue-lazyload finishes loading?

I'm using this component: https://github.com/hilongjw/vue-lazyload Given the below code how can I call the function callMe once the image (imgUrl) is loaded? <template> <div class="hero-...
-1
votes
0answers
10 views

jQuery Datatable vs vue based Datatable in Vue project

Me and my team are currently working on a VUE project, deciding how to install Datatables. One want to use vue based Datatable, the other the classic jQuery Datatable. I'm worried about the ...
1
vote
1answer
29 views

Trying to load json through Vue Axios

I'm trying to include a local JSON file from the static directory called blogs.json which has a load of blogs inside it. I'm currently loading the blogs via Vue Axios which is a module I'm including ...
0
votes
1answer
16 views

Vue js sent multiple select box values (array) to text area and append the value

I have a scenario and I will really appreciate any help. As shown in the image, I have only multiple select box on the left where there are numbers and on the right this is text box, what I want to do ...
0
votes
0answers
14 views

Display multiple selected files (images and videos) in vuejs

I am using the following code to display files but it always shows the file that is selected at the end. var input = event.target; if (input.files && input.files[0]) { var reader = new ...
0
votes
1answer
44 views

Vuejs : using the same array of data for two different lists of inputs

I have created a fiddle to explain what I want : https://jsfiddle.net/silentway/aro5kq7u/3/ The standalone code is as follows : <script src="https://cdn.jsdelivr.net/npm/vue"></script> ...
0
votes
1answer
21 views

Vuex update state by using store actions

I have two functions in my store, one that gets data by calling API and one that toggles change on cell "approved". Everything working fine, except that when I toggle this change it happens in ...
1
vote
0answers
13 views

How to put different position to randomly added image? Vue.js

javascript: const vue = require("@/assets/images/vue.png"); const bootstrap = require("@/assets/images/bootstrap.png"); const bulma = require("@/assets/images/bulma.png"); export default { name:...
0
votes
1answer
21 views

blank the field on Submit (vee-validate vue)

I'm creating a form in Vue having validation of Vee-validate. I want to make field blank on submit. But it is giving an error when I make the field blank on submit. Can someone please help me to ...
0
votes
1answer
35 views

VueJS change content of component slots globally

I want to use component for selectbox. But I need change texts in slots (eg. Whoops! Nothing here.). I know how to change component slots in template" <v-select> <span slot="no-options"&...
0
votes
3answers
28 views

Vue js Bind dynamic id when adding text box dynamically on button click

I am able to add textbox dynamically on button click. My problem is i cant set dynamic id and value. <div id="app"> <div> <button class="button btn-primary" ...
0
votes
0answers
11 views

Vue file upload as form param

We know that we can upload a file to a REST service with as a form field using axios (example here). We would like to use a ready-made file upload module such as q-uploader but have no idea how to get ...
0
votes
1answer
15 views

Disable nuxt link based on boolean

I can't seem to find a good way to disable a nuxt-link based on a data variable. Could anyone suggest something? I've tried looking at doucmentation but I can't come up with anything. Say I have a ...
0
votes
1answer
22 views

Vuetify Datatable Actions Row

Is it possible to left align the rows per pages and page navigation and put a button in its place in the same row?
2
votes
2answers
41 views

Vuejs how to declare a component in HTML before the #app

For some reason I need to render a component in html, right before the div with the id #app which is needed by Vue.js to run. Is that even possible?
0
votes
1answer
25 views

Firebase storage getDownloadURL creates infinite loop

When trying to retrieve the URL from an uploaded file from firebase storage I get an infinite loop which locks my browser. HTML <div class="row" v-for="(item, idx) in data" :key="item.id"> &...
0
votes
0answers
36 views

VUEX: Vuetify Expansion panel slot doesn't update after add an item

I have a data table made using Vuetify. When a user clicks in an item (the row), it shows an expansion panel with updates about the item where users can add new updates. The expansion panel have a ...
-2
votes
1answer
27 views

make two vue methods synchronous

I currently have two vue methods: (1) this.get_saved_searches() (2) this.update_default_select_option() How can I make method(2) only run when method(1) is finished?
-3
votes
0answers
13 views

Vuex js. passing a selected drop down value between components

I need to emit a selected drop down value from one component and use the drop down value on click of refresh button in the parent component basically. Vuex and vuetify are used. component1: <div&...
0
votes
1answer
33 views

vue computed property not able to get data

I am currently experiencing an issue where the computed() property is not able to get data. Although data was already initiated in created() property. Am I doing it wrong? Please advise how I can fix ...
0
votes
1answer
27 views

Binding a button to a model?

I have binded a checkbox (output from options data in a loop): <input type="checkbox" v-model="option.active"> options: [ { name: 'one', active: false, }, { ...
0
votes
0answers
17 views

Performance issues vueJS and multiple Canvases in Electron

I'm working on a piece of software that contains n canvases where n is an array of tiles (where each tile is composed of an 8*8 set of arrays of raw hex, I won't go into details on that front, but ...
0
votes
0answers
21 views

Vue js post request with laravel getting 419 error and unhandled promise exception

My cors is set and i can also see bearer token when i make request but i m unable to sort out what is the issue in my code or which thing is missing whenever i make post request i get unhandled ...
0
votes
0answers
12 views

Vue chart js with stepped line middle

I am having a problem with vue chart js and steppedLine property When I set it to middle it doesnt work: https://codepen.io/anon/pen/drQpYj datasets: [ { label: 'Data One', ...
0
votes
3answers
33 views

Vue js select option not appearing due to v-model

Ok so i am working on some code which allows a user to change the store they belong to. I am using a tag and in it i have a v-model. in the tag i use a for loop to give the stores the user can ...
0
votes
0answers
6 views

Jest test fails when searching for an element with a classname?

I have a Vue component on which i am testing to find an element with a classname but the test is failing. Here is my .vue file. <template> <div class="github-card"> <transition name="...
0
votes
0answers
17 views

vee-validate and vue-i18n integration when using custom rule

This is a question about the integration of vee-validate and vue-i18n + additional error message for a custom rule. I could get every single detail to work alone, but not the whole combination (this ...
0
votes
1answer
57 views

How to add a boot message before initializing a Vue component?

I have a Rails application. In the main layer I wrap the HTML code of the controllers in #app: body #app = yield Vue components in the HTML (Slim) Rails application code I describe as follows: ...
0
votes
0answers
22 views

Google API driving calculator by Source and Time [on hold]

I want to know if Google API have any options to return the lists of destinations by starting point and time duration. For example function like that: google_distance(origins ="Paris", time="30") ...
1
vote
3answers
96 views

How to access this variable from my store / state in my vue router?

I have setup my routes.js file to import my state from my store. This is working as when I console.log(state) it outputs my store to console successfully: I then define my route as below: routes.js ...
1
vote
3answers
28 views

How to use the same variable when using .vue component in external .js files?

I have a .vue single file component which has too many lines so I'm trying to seperate it into .js files. I can achieve this with help from this thread. However, I'm still stuck whentrying to use a ...
2
votes
3answers
35 views

Incorrect order of Vue components after copy operation

I have several accordions (every one is a single Vue component) and they are expanded by default. There's also a 'copy' function allowing to make a duplicate of every component. Vue.component("...
1
vote
1answer
26 views

Laravel passport: Manually create access token

I'm building an SPA using VueJS and Laravel. I'm using Laravel passport for logins which works fine. However I would like the ability to send users magic links to log in with. However I'm not sure ...
0
votes
2answers
43 views

Apply mask to input

I need a mask for input that needs to have the format of dddd-ddd (Portuguse zip code), I don't feel like importing a library just for this input. This is what I have right now: new Vue({ el: ...
0
votes
0answers
12 views

Add OptinMonster Script to nuxtjs site

Basically I need to add the script to the head of my index.html, <script type="text/javascript" src="https://a.optmnstr.com/app/js/api.min.js" data-account="58972" data-user="52420" async></...
0
votes
1answer
38 views

Where i may put authorization logic in vue.js?

I creating authorization component for firebase. And found many post about how may create authorization service, most part of that post was about create some global const or the very interesting way - ...
0
votes
1answer
23 views

Datatable v-for to produce checkbox or input based on data

Wondering how I can get my datatable to build a column that produces either a checkbox or input based on a value from data. This is the what I have but I have a good feeling there is a way better way ...
0
votes
1answer
19 views

laravel blade template and vue.js spot combination for layout

up untill now i used the blade template for making my master layout and i used to make some thing like this code in my layout.blade.php <div class="m-grid__item m-grid__item--fluid m-wrapper"> ...
0
votes
0answers
3 views

Trix editor jumps to beginning of content

I have embedded vue-trix into an application I am writing. Things were working pretty well but the following strange behavior has started: Whenever I type characters anywhere in the editor buffer, ...
0
votes
1answer
18 views

VueJS: how to write path with parameter correctly

I'm following a tutorial and the paths with parameter are not working. data() { return { id: this.$route.params.id, element: { title: '', description: '', ...
0
votes
1answer
10 views

Vuejs router and beforeEach hook

I’ve encountered an issue with beforeEach hook of vue-router : I checked the authentification of the user with a router.beforeEach hook in my main.js like this : router.beforeEach((to, from, next) =&...
0
votes
1answer
21 views

Vuetify Navigation Drawer Drag To Resize

So I have gotten it to where the the 'drag to resize' works - it just feels a little laggy... does anyone know why this may be, and how to fix it? I have tried forcing a refresh using vm.$forceUpdate(...
0
votes
0answers
24 views

Nuxt JS page content flicker when changing pages

I'm using Nuxt JS v2.4.5 with Bootstrap Vue, I have a fixed header and a page footer that are located inside of my default.vue file. When I scroll to the bottom of a page and click a link in the ...
0
votes
0answers
17 views

how to create a checkbox with select all feature in vuetify?

I want to create a checkbox with the select all feature. In detail, when I input query string, I want to select all candidates string matching the query string by click SELECT ALL button. I have done ...
2
votes
0answers
44 views

On which window / document event should a component be initialized?

Small example component (for all following examples): <template> <div> <h1 v-on:click="handleClick">Test</h1> </div> </template> <script lang="ts"> ...

http://mssss.yulina-kosm.ru