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. Consider also using the main [vue.js] tag in addition to this one.
24,503
questions
0
votes
1
answer
20
views
Apply condition class to v-col
I'm trying to apply condition class to my v-col
<v-row v-for="(rule, index) in ruleDetails" :key="index">
<v-col
:class="{
'md-4': rule.width == 'large',
...
0
votes
0
answers
7
views
Vue Apollo Query error module build failed
so basically i want to do a query using Apollo Query in Vue 2 CLI. but it is not working, i dont know what is the problem. maybe someone can help me? i have stuck for 3 hours withour any progress
here ...
0
votes
0
answers
12
views
Dynamically update combobox list based on API response
I have a combobox of cities
<v-combobox
v-model="city"
:items="cities"
item-text="name"
label="City"
v-on:keyup="getCities(city)&...
0
votes
1
answer
11
views
Nuxt i18n : how to avoid duplicated translation keys
I'm using Nuxt, Nuxt i18n and in component translations :
<template>
<div>{{ $t("Hello world") }}</div>
</template>
<i18n lang="yaml">
fr:
Hello ...
0
votes
1
answer
18
views
Minify + Obfuscate Vue.js Codes [closed]
I'm on vue.js v2, and I understand the concept:
If it's sensitive, it shouldn't be in the front-end (FE).
With that in mind, I don't have any sensitive codes on the FE, I just want to make it harder ...
0
votes
1
answer
29
views
When I type to fast on input it renders the wrong div
I'm have to show two different dropdown in my input.
I'm doing it by having an shouldShowWarningBox method that it's called every time the input is updated by the user an updates the value of ...
1
vote
0
answers
5
views
How to import and use bpmn file in vue component with aid of raw-loader
I'm new to bpmn-js and try to import and use a .bpmn file in a vue.js component (BPMNViewer.vue). My research only brought up to use the raw-loader. So I'm kind of at a loss here.
<script>
...
0
votes
1
answer
15
views
Vue JS: How to bind v-text to a variable
I have a button, the text on which will be different in different situations.
Currently, I have defined it as follows:
<v-btn v-if="isVariableX" v-text="this.$getText('BUTTON_TITLE_X'...
0
votes
0
answers
17
views
How do I resolve this vue error? TypeError: Cannot read properties of undefined (reading 'NormalModule') [closed]
I am trying to upgrade an existing Vue 2 project to a Vue 3 project. After solving all initial syntax errors, I keep getting this error when I run vue serve or npm run serve
Please how do I resolve ...
0
votes
1
answer
23
views
How to pass a variable by prop and not allow child to change it ( vue 2 )
I'm passing a prop to a child component, and coping the prop value to a data() variable. The problem is that when I change the values of data() variable, the values on parent change to, and I dont ...
1
vote
1
answer
48
views
Count total of v-if output in v-for
I have a code like
<template>
<div v-for="(item, i) in items" :key="i">
<div v-for="(subitem, index) in subitems" :key="index" v-
...
0
votes
2
answers
44
views
Display a list when i click next or previous button in VueJS
I would like to manage a case in js view. I have a list of employees who arrive in a department and also leave the department. My list returns me 3 objects (entries and exits) for the current week, ...
2
votes
0
answers
29
views
Nuxt 2 & Vuelidate 2 not working properly
I have installed vuelidate 2 to validate forms in my NuxtJS project. I followed instructions for installation and setup according to vuelidate documentation. This is how my setup files look until now:
...
0
votes
0
answers
30
views
CORS issue in Vue3 for POST request, GET request working just fine using Laravel backend [closed]
Here is CORS related question nr 13563. I am developing a Vue3 application, running on localhost:8080. I have a frontend Laravel 8 dev machine running on http://10.0.0.98.
All API endpoints are ...
0
votes
1
answer
20
views
Issue upgrading XState's Reddit sample from Vue 2 to Vue 3
After reading the XState documentation I followed the Reddit sample found at the official guide, here:
https://xstate.js.org/docs/tutorials/reddit.html
I was trying to upgrade to Vue 3 the sample ...
-1
votes
4
answers
69
views
How to change color of checkbox values
I want to change color of checkbox values like if it's checked it shows text in green if its unchecked it shows color in red here is simple input type
but I am not sure how I color these true-value ...
2
votes
1
answer
16
views
Create a newline from computed string
I would like to know how to add a newline in a computed string with the concatenation of string values. I need the values to be this.
1111 Ave, Apt 107
Iowa mycity, myzip
Here's what I have.
...
1
vote
2
answers
48
views
What does () mean if set as a interface property?
In the Vue.js source code (packages/reactivity/src/effects.ts), I found this:
export interface ReactiveEffectRunner<T = any> {
(): T
effect: ReactiveEffect
}
What does () mean in the code?
0
votes
1
answer
34
views
New url is not opened in a new tab
I have this code :
<b-btn
variant="primary"
class="btn-sm"
:disabled="updatePending || !row.enabled"
@click="changeState(row, row.dt ? 'activate' : '...
0
votes
1
answer
14
views
Can I run laravel (admin dashboard) and vue (front-end) in a single domain
I have done a project which admin dashboard is done by using laravel+vus (vue (v2.6) inside laravel(v8)) and front end is done by independent vue(v3) js(getting data from laravel api).can i run this ...
0
votes
1
answer
36
views
Here i have a toggled the div but i want to toggle on perticuler div not all
First picture without clicking on edit button
Second picture when i click on edit button
So here i want is when i click on which ever divs edit button at that particular div should get text field with ...
0
votes
0
answers
16
views
How to write mutations in Vue-Apollo using Graphql-Neo4j as backend
I am stuck with the Vue-Apollo documentation: How to send mutations to my grahql-node4j server backend. For some reason the querying part works but I can't mutate new data to my neo4j backend.
I ...
0
votes
1
answer
34
views
routers and components in vue.js
My component information is not displayed!!!
the router is working great and I test it to many times but there is nothing in components when I run the project.
They all seem to have nothing in them ...
0
votes
1
answer
22
views
Unable to catch Network Error when sending request using Inertia + Vue
While sending a this.$inertia.patch request I'm unable to catch a Network Error. I'm turning off the backend server to emulate a lost connection. The console shows: Uncaught (in promise) Error: ...
0
votes
0
answers
24
views
Vue test can't find store in child components
I have a parent component and there are several child components. Some children use Vuex store. When I try to mount parent component like below in Vue test, I'm getting an error "Cannot read ...
0
votes
2
answers
60
views
Replace nested array for new array
I have an array inside another array:
Structure:
First Array
[
{
Second Array
[
{
}
]
}
]
So I want to replace all Second Array for new array that I have so I try this:
this....
0
votes
1
answer
26
views
Vue.js computed boolean incorrect
I need a computed property for whether startDate is less than endDate. For some reason when I code it as below, the computed property always computes as false even though the expression is correct. ...
1
vote
0
answers
29
views
Render directive conditionally
I've been struggling all day to find a way to conditionally render a directive on an element.
I ended up on this page: https://vuejs.org/guide/extras/render-function.html but then I wasn't able to ...
0
votes
1
answer
15
views
Vue v-model.lazy modifier does not work. Why?
Here is my code:
<!DOCTYPE html>
<html>
<head>
<title>My first Vue app</title>
<script src="https://unpkg.com/vue@2"></script>
</head&...
0
votes
3
answers
21
views
Access component parameters inside caller component
I have a component which I call inside another component as:
COMPONENT 1
<template>
<FiltersComponent />
</template>
export default Vue.extend({
components: { FiltersComponent }
...
1
vote
1
answer
38
views
Using a method with v-model in vue
I have a question about using vue's v-model with a method instead of computed. I know we can't exactly do that based on what I see here: How to bind a v-model with a method in Vue.js. But I know it ...
0
votes
0
answers
11
views
Unexpected behavior with watcher and axios response in vue
Today I came across an unexpected situation that I could solve, but I would like to understand what's happening.
I have a form for which I use a watcher to track any changes (deep).
If there are ...
0
votes
1
answer
27
views
how to work with v-select inside b-table?
I'm working with v-select elements inside a b-table but i've a problem when i put the "responsive" property in my b-table. It looks as if the v-select is contained within the table even when ...
0
votes
0
answers
24
views
vue2: Uncaught TypeError: Cannot read properties of undefined (reading '_init')
[I have similar problem like this one but I didn't get to solve it.]
I'm using vue@2.6.11 and vue-custom-element to build custom web component.
Everything works fine when I build locally. However, I ...
0
votes
1
answer
30
views
Basic variable declaration and memory in Javascript/Vue
I have a very basic question about declaring variable in Javascript/Vue.
function myFunction () {
let myVars = this.myVars;
forEach(myVars, (var) => {
// Do something with var
}
}
VS
...
0
votes
0
answers
19
views
Vee Validate debounce async validate
Vue2, VeeValidate v3 (validate default mode: Aggressive), lodash debounce
I have a function to check username exists in the system.
I have tried to validate the code:
extend('test', {
validate: ...
0
votes
0
answers
21
views
Vue not updating DOM with vee-validate errors while testing
I am trying to test whether validations error show up. They do show up in the browser. However, my tests are failing.
This is my code:
import {shallowMount, createLocalVue} from '@vue/test-utils'
...
0
votes
0
answers
12
views
how to serve a vue js app with express and node?
i have a vue js project created with
vue create vue-js-client-crud
and built it with command
npm run build
file : router.js
import Vue from "vue";
import Router from "vue-router"...
0
votes
0
answers
8
views
TypeScript and Vue2 (Nuxt2) Computed properties not being properly understood by Typescript compiler
First off I am definitely new to typescript and I am trying to get one of my employer's Nuxt2/Vue2 frontends on Typescript. But there is one problem I am having that I can't seem to find anywhere.
So ...
0
votes
2
answers
33
views
Vuetify - combobox badges with a removable button
I have a combobox:
<v-combobox
v-model="selectedCategories"
:items="attributeCategories"
item-text="name"
item-value="id"
label="...
2
votes
1
answer
33
views
Vuejs/Nuxtjs Unable to scope the styles to specific component when used with @import?
I am developing an application using Vuejs/Nuxtjs. I would like to import some styles from the external CSS file and would like to include those styles only to that particular Vuejs/Nuxtjs component. ...
1
vote
2
answers
65
views
Nuxt3 + Pinia + VueUse -> useStorage() not working
Setup: I'm using Nuxt3 + Pinia + VueUse.
Goal:
I want to save a state of a pinia store to localstorage via VueUse: useStorage.
Problem:
For some reason no item is created in localstorage. I feel like ...
0
votes
1
answer
24
views
Calling only children button not parent in a list-group bootstrap vue js
My question is how can I click on children button (b-form-spinbutton) without trigger on the list group item?
<b-list-group class="slots-list pr-2" >
<b-list-group-item v-for=&...
0
votes
0
answers
16
views
how to make x-frame-bypass in vue.js?
I'm trying to open a website that should show me a table.
The website is running on this url: "https://:16311/ibm/console//webtop/eventviewer/eventViewer.jsp".
My application is running on ...
0
votes
0
answers
19
views
Vuex registerModule using with vue-router
I am converting my huge modules to dynamic module via registerModule of vuex.
I've faced a huge problem. Let me explain.
I have 2 pages, lets say Route A and Route B and i have a module like MODULE_X.
...
0
votes
0
answers
19
views
gridjs-vue can't render HTML
I'm using gridjs-vue 4.0.0 with vue 2.0.
For some reason I can't render a HTML in the content.
Here is my code:
import Grid from 'gridjs-vue'
export default {
components: {
...
0
votes
0
answers
22
views
How to loop for bind slots with Vue.component?
How can i loop for bind slots with Vue.component ?
What I want to do is create a global component which is a button with an overlay. I want to bind all the slots of the button in question to parent ...
0
votes
0
answers
10
views
Import Module from external cdn into Vue component
I'm trying to import a module that is only available through a CDN into my Vue 2 app component.
The CDN is available through something like this: https://cdn.myscript.com/myscript.min.js
In my ...
1
vote
1
answer
29
views
Docker deployment ignores the styles under the assets folder of Vuejs/Nuxtjs app but works perfectly locally using npm run dev
I have a web application developed using Vuejs/Nuxtjs. The web application has a Vue Component page named Design.vue under pages/Design.vue. This Vue component uses the styles from the assets/css/...
0
votes
0
answers
35
views
nuxt application is not working in internet explorer
I have the nuxt application which works fine in chrome and all other browser but it is getting failed in the internet explorer.
I tried so many solutions on the internet but had no luck yet so asking ...