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.

0
votes
0answers
10 views

Getting issue in vue-responsive-grid-layout drag and drop is it allow responsiveness for xl screen if allow then how

Getting issue in responsiveness of grid when using drag and drop i installed one library i.e vue-responsive-grid-layout is there we can use responsiveness for xl screen size
0
votes
3answers
34 views

CSS - Set total width of all child elements equal to their parent

I'm trying to create a square that contains rectangles that each contain a word. The total width of each child rectangle should equal the parent, but the problem is that I don't know the order or ...
1
vote
3answers
18 views

What should be structure of Vue component? in which order functions should be added?

Is there any systematic structure for Vue component? In which order computed , methods, components, mounted watch etc should be written?
1
vote
1answer
15 views

VueJS: How to have first form select input determine what to show in second select input?

I have a form with two select inputs. What the user selects in the first select input (product_id) is going to determine what options to show in the second select input. Being sort of new to ...
1
vote
0answers
29 views

Trying to figure out how to access environmental variables in Vue.js

I created a .env file and put this inside of it: VUE_APP_TEST='Hello' Then in one of my components I tried console.log(process.env.VUE_APP_TEST), however, I get undefined in the console. Not sure ...
0
votes
1answer
14 views

Assigning a field name from a method to Firestore document

Let's say I have a collection called 'users'. When someone clicks the upvote button, I want it to update the user document with an entry that's the slug from the page they are viewing. However, I'm ...
0
votes
2answers
20 views

vue default redirect causing maximum stack error

So I have this section of my vue-router that's causing an issue: { component: Tutorial, name: "tutorial", path: "/tutorial/:page?", redirect: "/tutorial/0", }, If I remove the ...
1
vote
1answer
24 views

Loading spinner doesn't work during first GET request which is executed on mounted

In the code below you can see that If isLoading is true, I render a spinner component. By default isLoading is set to false and before every GET request, I set it to true and at the end of the GET ...
0
votes
0answers
19 views

Utilising an OO PHP approach with Vue.js

I have a bit of experiences using PHP frameworks like Laravel to act as a backend API to a Vue.js frontend. However I am current involved in a project at work which is using a purely plain PHP backend,...
0
votes
2answers
18 views

Event on table td

I create Vue table component and i have items and columns. items: [ { 'id':'1', 'title': '<input type="text">', 'description': '<input type="...
0
votes
0answers
26 views

Toggling class in calendar component by element Id highlights same date in every month

I've written a simple calendar in Vue. The days of the month are displayed by using a v-for which creates an array of $refs. Each date element is also given an unique ID. I want to highlight a day by ...
0
votes
0answers
25 views

Vue/Vuex watcher dynamic/async component loading

I have a base component within which I have a dynamic component with a v-for that displays based on a computed property. All I've really tried doing thus far, which was an incorrect methodology, was ...
0
votes
0answers
8 views

Increment values is not working in Firestore using example code

On this page of the documentation for Firestore, the supplied code does not work in my Vue project. https://cloud.google.com/firestore/docs/manage-data/add-data#increment_a_numeric_value Firestore ...
1
vote
2answers
20 views

Cleanest way to reset form and easily maintain as it grows

I am creating an input form with VueJS and the form contains about 10+ input fields. I have a reset button that, when clicked, will "reset" the form's value to either an empty string, null, or boolean ...
0
votes
0answers
14 views

Update Vuex only if data is new (different from existing)

I use vuex store in my application to store news items from feed. Idea is that if user will navigate to other page and come back on the feed page, posts from store should be visible and loading new ...
0
votes
1answer
29 views

How am I meant to render different buttons based on a record in database when having a separated front & back end

I have a separated front and back end. The front-end is JavaScript with Vue.js and the back-end is PHP with Laravel. The authentication is token based. I have created a functionality which allows a ...
1
vote
0answers
12 views

How to prevent browser from ‘back button’ when file upload is initiated by iframe and parent page has been routed using html5-history API?

I have an iframe (implemented using vuejs) inside a parent page (a .net C# page). iframe has a file upload feature and user can press back button (or refresh) while upload is in progress. Parent page ...
0
votes
1answer
14 views

Filter nested loop in Vue

New to Vue, and I want to loop through each category and then display posts. <section v-for="(category) in (categoryList)"> <h2>{{category.title}}</h2> <div v-for="(post) ...
0
votes
0answers
11 views

scrollIntoView() safari Vue JS fix

Using scrollIntoView() for Safari iOS and Safari appears to not jump the user to the top of the page. I'm loading a multi-step form into an iFrame of a site. Every time the user clicks the next step ...
0
votes
1answer
12 views

How to fix the error when installing vue-cli

when I run the command npm install -g vue-cli I get the following warning, apparently I have no errors but when executing vue init webpack my-project or vue --version this pops up
0
votes
0answers
11 views

How can use my images from external json file in vueJs2?

I have a external json file and I want to get images from it to my component this is my json file: { "items": [ { "id": "1", "name": "test1", "src": "../images/1.jpg", "alt": "test1" }, ...
0
votes
1answer
9 views

vuejs vue-multiselect can't display selected item pass value array of selected objects

I have a field component that is utilized by both edit or create component. in field component i used Vue-multiselect 2.1.4 plugin to show dropdown with multi-select options here is my code <...
0
votes
3answers
43 views

Cant get variable in data

I created a function that should set a var equal to a variable in data. export default class App extends Vue{ data() { return { evidence: 0 } } handleFileSelect(evt: any) { ...
0
votes
0answers
36 views

Setting a Form Value in Vue Js

I am using Struts 1.x in my application. Recently i used Vue js.So, I use the same jsp page for Adding and updating (in this case company). So When i click edit, the details are fetched the page is ...
0
votes
1answer
17 views

vue good table - 3 requests to the service

I use vue-good-table object to render table in Vue.js. I use paging and sorting serverside. My code: <vue-good-table v-if="authorizations" id="...
-1
votes
1answer
14 views

How to build a voice calling system with Electron + Vue

I want to ask how to build a voice calling system with Electron + Vue.The system interface allows you to enter Numbers to make a phone call. How do I make a successful voice call
0
votes
0answers
26 views

Get select data from json file from external domain using vue js

I have below code to display list of cities from a json file. Json file is from an external domain. Display.vue HTML <select v-model="selected"> <option v-for="option in results" v-...
0
votes
0answers
28 views

How do I load a Vue template from a hosted html file (no webpack, etc)

I am trying a new way of writing my ui and I am using straight ESM loading with Vue. As such I am trying to load my HTML files like I would with say Webpack. I have a simple example of what I am ...
1
vote
1answer
20 views

How to use include paths with Vue CLI, when trying to import sass modules?

I'm starting a new project using the Vue CLI, and this is my first time using it. I'm using a CSS framework (Spectre), which I installed via NPM. I'm now trying to import only parts of it. I have ...
0
votes
1answer
23 views

How to access scoped keyframes from JS

I have a scoped "keyframes" named move-left, I have to access it in JS, but HOW? I tried to remove the scoped in , it will work, but I want it to be scoped, How can I access it you know, vue-loader ...
0
votes
0answers
16 views

Vuetify checkbox true-value seems to be bugged?

I have been attempting to use the true-value and false-value props on the v-checkbox element. I have attempted on this codepen and it would not work: https://codepen.io/anon/pen/pmaZpd?editors=1010 &...
0
votes
1answer
31 views

Is there a way to add the “paste” option in any element when right click

I want to enable the paste option of the context menu (right click menu) when someone right clicks in a div. It seems that it only appears in inputs and textareas, but the "paste" event is global. I ...
-1
votes
1answer
5 views

Can`t save .pdf document which sended from .Net api

I got an Api which return File, i write response into this.getPDFBuffer, here you can see it. Main problem is that if I use my function it downloads an empty file, but if i use Postman to perform an ...
0
votes
1answer
28 views

Get BootstrapVue Dropdown (b-dropdown) to show when clicking a button

Using Vue.js 2.6.10 and BootstrapVue 2.0.0-rc.20 and trying to programmatically display a dropdown when clicking a separate button in a single file component. <template lang='pug'> div b-...
0
votes
1answer
22 views

Implementing dependency injection using Vue and Typescript

I tried using vue-injector but it compile with my version of Vue (2.6.10) and Typescript (3.4.5). I see very few other options. On the pure typescript side I see things like Inversify and TSyringe ...
0
votes
0answers
28 views

Upload file using vuejs and laravel

I want to upload pdf file using vuejs and laravel but I got an error: Call to a member function store() on array. my vue component: <div class="form-group"> <input v-model="form." type=...
0
votes
1answer
11 views

Cannot read property 'register' of undefined service worker Nuxt JS

I'm trying to implement a custom built service worker into my Nuxt JS site. I'm getting an error after generating the site as follows: Cannot read property 'register' of undefined function Notify (...
0
votes
0answers
10 views

Alias components in jest and dependencies

When trying to run my unit test I get an error with my weback aliases Error: Cannot find module '@/components/Menu' from 'Header.vue'  So I try and map the alias in my package.json "...
0
votes
2answers
35 views

Is there a method to use rgba color [0, 15, 31, 0.4 ] to style a TD element in vue js

I have this code and the goal to is style the TD element: <table > <tr> <td v-for="(color, index) in colors" :key="index" :style="{...
0
votes
1answer
8 views

Quasar's QDate locale prop doesn't works

I try to localize QDate instance in my Quasar Vue.js application. But locale prop doesn't works. <template lang="pug"> q-date.no-borders(today-btn :value="temp" @input="update" :locale="...
0
votes
0answers
29 views

Vue component throwing error: Cannot set property 'render' of undefined

I am getting the following error in the console: Uncaught TypeError: Cannot set property 'render' of undefined at normalizeComponent (componentNormalizer.js?2877:24)... The error does allow my ...
0
votes
0answers
26 views

Using vue-router with vuetify components

I have created a vue project using vue ui command along with the vue-cli-plugin-vuetify plugin. By default it have Home and About vue components in the src/views folder with the defined routes in src/...
1
vote
1answer
20 views

Vue Quasar modal put in component in message

I have a q-btn. When i click on it, it will pop up a modal. <q-btn @click="handler(userA)" round color="primary" icon="perm_identity"/> This handler below is in my ...
0
votes
2answers
65 views

What is the correct way to remove a v-for element in Vue?

I have an app with panels you can drag around that are all generated from a basic array of names like so: <template> <div id="wrapper"> <nametag v-for="(name, i) in guests" ...
0
votes
1answer
20 views

Unable to get reference to scoped variable from method

I am refactoring some Vue code for displaying a Google map. Instead of calling Google Maps from the index.html, I am calling it from mounted. All is good until I try and reference the google ...
0
votes
0answers
23 views

Define directive in child component and call it in parent component Vuejs

I have a custom Button component with custom style directive (v-style) to add some classes: directives: { style: { bind(el, binding) { const style = binding.value; ...
0
votes
0answers
17 views

Animate Canvas from Vue

I am trying to implement this post, which draws and animates a stick figure, into Vue. draw(timestamp, wave) { if(Date.now() < (timestamp+900)) return requestAnimationFrame(this.draw); ...
0
votes
0answers
13 views

packaging a vuejs component so that it can be imported in angularjs project

Currently have a vue project set up with webpack. I can build the entire project into a single JS file – I can import that JS file into an angularjs project and use the component <my-component ...
0
votes
1answer
26 views

Cannot read property 'indexOf' of undefined when using Vue Carousel

I'm using the latest version of Vue Carousel in my Nuxt JS application. It seems that I get errors on each of my blog posts whenever using the universal mode for Nuxt JS. If I take out Vue Carousel ...
-2
votes
1answer
21 views

Nuxt JS LocalStorage in Universal mode not working

I'm working on a Nuxt JS application which utilises LocalStorage. When compiling in SPA mode it functions correctly, however I need to switch my project to universal mode to get my SEO meta titles and ...

http://mssss.yulina-kosm.ru