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.
vuejs2
26,437
questions
0
votes
0
answers
8
views
Material design icons
I want to fill a DevExtreme DxSelectBox with icons.
I was wondering if there is a way to use the entire material design icon list as my DxSelectBox datasource (without me copying every icon one by one ...
0
votes
1
answer
28
views
How to pass a function with a parameter to v-select?
How to pass a function with a parameter to v-select?
Tried to do it this way, but nothing works...
I tried doing it through template, but it didn't work either. Maybe I'm doing something wrong.
I need ...
0
votes
0
answers
19
views
Handling Emits with Vue.extend in TypeScript
I'm following the Vue 3 migration guide and trying to declare all the $emit events in the emits array. My component is written in TypeScript, and I'm still using Vue.extend. However, I'm encountering ...
0
votes
1
answer
27
views
vue.js and Element Plus - use el-select with key
I intend to make a drop-down menu that can have three values: The first can be 'Father' or 'Mother' depending on the condition returned by the autoGender(index) method. The second is always 'Father'. ...
0
votes
1
answer
26
views
Adding attribute to HTML elements to whole code
I'm using Nuxt 2 in my project with Storyblok datasources as translations and e.g. I've:
<span v-text="$t('labels.cartSell')" /> and I need to add something like data-translation="...
0
votes
0
answers
9
views
Render Dynamic Dependant DropDowns with VUEJS 2.6.11 and BootstrapVue
I have an application written in VueJS 2.6.11 and BootStrap Vue 2.1.0
What I am trying to do is mimic the following functionality and can't seem to wrap my head around it. I know how to do it in ...
0
votes
1
answer
16
views
Fusion chart throwing error in Lazy loaded route vue
I have an existing project vue, in which case everything was running fine.
we decided to optimize the bundle size of the app because it was too large and implemented lazy loading routes,
e.g
const ...
0
votes
0
answers
28
views
declaring a class and passing it as props to a child component followed by calling methods of this class
I declared a variable in data through a class, passed it as props to a child component, and called the class method in the child component, changing the variable in the class. Is it worth doing this ...
0
votes
0
answers
13
views
Firebase Hosting Issue with Vue2.js
So i have been hosting my vue project using firebase hosting and recently
it stopped working. I get back a white screen with these errors on the live url Log
The stylesheet https://hodl-f3ae3.web.app/...
0
votes
0
answers
24
views
Laravel vue3 meta tag layout not loading
this is my routes file
const routes = [
{
path: '/',
name: 'home',
component: Home,
meta: {
layout: 'home',
pageTitle: TITLE.HOME_PAGE_TITLE,...
0
votes
1
answer
40
views
Dependency Conflict in Vue.js Project: vue-tel-input and vue Version (2.6.14) Compatibility
I'm encountering a dependency conflict in my Vue.js project when attempting to install the vue-tel-input package. I've done some research on the compatibility of these versions but I'm still facing ...
0
votes
0
answers
40
views
Vue Components Not Rendering After Turbo Form Failure
I'm using @hotwired/turbo, rails 7, vue2 and everything seems to work well except when forms fail and a 422 is returned. The form rerenders with errors, but none of the vue components render. All of ...
0
votes
0
answers
15
views
Is it possible with nodejs + vue to host a webapp in dynamic virtual path?
I have a nodejs/expressjs application with a vue2 application.
In my node ENV VARS, I'm capable of setting BASE_URL and host the nodejs application under that virtual path.
BASE_URL: /myapp/
Will ...
0
votes
0
answers
19
views
How to use vue2/vue3 in sharepoint framework (vuespfx)
I tried to use vuejs in SharePoint framework according to the information found on the Internet, but it still failed. The version of the case framework I found was 1.8, and my current version was 1.19....
1
vote
1
answer
23
views
auto suggest for vuejs v2 component with external js file for script part
I am using vue.js v2, I like to separate my JS from my template.
<template>
</template>
<script src="./script.js">
</script>
Having JS code inside this script tag ...
0
votes
0
answers
20
views
Vue2.x vue custom element when i passed param like 111. the dot at the end was removed. Is it well known issue? How to fix it
Vue2.x vue custom element when i passed param like 111. the dot at the end was removed. Is it well known issue? How to fix it.
Step
npm run build vue file
use file from /dist in php project
Problem ...
0
votes
0
answers
25
views
Mounted lifecycle hook - difference between Vue 3 and Vue 2
my company migrates project from Vue 2 to Vue 3 and we’ve encountered some troubles with lifecycle hooks. Some external plugins (compatible with Vue 3) have troubles with mounting / unmounting. We ...
0
votes
0
answers
37
views
How can I update days of week in vue2?
I am new to VueJs. I have this modal:
<b-modal
:id="`Rel${object.id}`"
ref="editModal"
title="Update data"
centered
hide-footer
:myobject=&...
0
votes
1
answer
36
views
why the photos are not displaying
Problem Statement:
I have a Vue component that should display random cat images fetched from https://cataas.com/cat. The component structure is straightforward, iterating over an array (catImageUrls) ...
0
votes
1
answer
26
views
I need to resolve vue function to find soccer players by club
I need to get the players by club. When I select a club in the first dropdown, I see every player from the league, I want to see only players from the selected club:
<template>
<div>
...
-1
votes
0
answers
98
views
I want to npm run build my vue2 project but its not letting me
when in 'run' the command npm run build in my vue2 project i'm getting this response back:
morrisjansen@Morriss-MacBook-Pro hyundai-sass-vue-api % npm run build
[email protected] build
vue-cli-...
0
votes
1
answer
17
views
How can I call the handleEdit in order to update data in vue.js
I am new to vue.js and I try to update data. I wrote this html for icon in order to update data:
<i class="mdi mdi-pencil"
@click.prevent="$bvModal.show(`Rel${object.id}`)...
1
vote
1
answer
28
views
Vuejs 2 & tinymce not working when importing from node_modules
I'm using tinymce editor and I'm trying to create a RichTextBox component in my vuejs2 project.
I'm having an issue however that the imports that tinymce requires are not working when trying to import ...
0
votes
0
answers
33
views
Drop event on div is Inconsistent in chrome
My drop events fires on Firefox every time but it is inconsistent in Chrome, where it works inconsistently. What should I do to make it consistent?
I tried setting the child pointer-events to none but ...
0
votes
3
answers
75
views
How can i convert 12-hours to 24-hours in vue.js?
I am new to vue.js. I wrote this code:
<li class="list-inline-item me-3">
<h5
class="font-size-14"
data-toggle="...
0
votes
1
answer
27
views
How to get the count of total rows from ag-grid with serveur side row model (datasource) using vue js?
I'm using ag-grid and vue, with the server side row model.
I would like to display the count of all the rows, and not only the displayed rows but really the count of all the rows from database. This ...
0
votes
0
answers
36
views
Detect a blog Post and get the view count with Intersection Observer on the Nuxt app
I want to count the post view on a page of my Nuxt app when user scroll to it .
I have a list of posts on a page and I am using Intersection Observer to count Post views. When a user scrolls to a Post ...
0
votes
0
answers
29
views
RangeError: Maximum call stack size exceeded - Vue 2 app, Vite, Webpack, embedded within Shopify
TL;DR - how to narrow place with error when there is infinite recursion during creation of new Vue element / component, but it happens only when certain condition is satisfied - when built JS file is ...
0
votes
0
answers
35
views
How can I paginate by month in vue.js?
I write a project in django and vue.js. In vue.js I have this:
<div class="row">
<div class="col-xl-4 col-sm-6 mb-3" v-for="object in ...
0
votes
2
answers
32
views
Vuex mutation does not return the latest value of the state
Currently I am working on a functionality where mutation updateConversationBasedOnAssignedUser updates the state current_action.
updateConversationBasedOnAssignedUser uses async/await call using Axios ...
0
votes
1
answer
25
views
How to access child refs in vue
How can I access $refs that is a child of another $refs?
My code looks like this, and what I want to do is to be able to access the ref 'ipsum' with a syntax similar to what I have tried. Of course, I ...
1
vote
1
answer
40
views
How can i use refs in vue on multiple elements?
How can I use refs in my vue component (preferably in a loop) to manipulate multiple dom elements in my template? Let's say for example that I want to apply an animation with GSAP on every <p ref=&...
0
votes
0
answers
29
views
Get the Post view count when scroll to a post or view a post vue js?
I have a page listing all the posts one by one. I want to add a count post_view incremented by 1 when the user scrolls to a post or views a post. I am kind of confused about what should be the scroll ...
0
votes
0
answers
30
views
Tiptap Editor Extend Link for Atom
I was creating a small comment box using tiptap editor and I wanted the link to be directly not editable, the documentation says if the atom for any extension is true, you cannot directly edit it ...
1
vote
1
answer
109
views
Is it possible to pass a generic type argument to Vue props?
I've got a generic component receiving
props: {
options: {
type: Array as PropType<unknown[]>,
default: () => []
},
labelKey: {
type: String,
default: &...
0
votes
1
answer
80
views
Vue2 and Vue3 on the same web page
For a very niche and specific reason I need both major versions of VueJS (2 & 3) to run concurrently on the same web page and each run their own plugins independently of each other. This will all ...
0
votes
0
answers
26
views
Issue using vuetify's v-toolbar component in native dialogs
I maintain a vuejs2 / vuetify 2 project that can't be updated for current versions due to large codebase, and also I'm slowly migrating this project's dialogs for a native HTML implementation, I feel ...
0
votes
0
answers
20
views
Reducing editor lag in Vue2
When editing a large amount of content, the editor will lag and be very slow. I tried replacing multiple versions and removing some plugins, but it did not work.
<template>
<div class="...
1
vote
1
answer
28
views
Vue 2 + Axios - Show / Hide div as result of Axois request result
I have a div in my html page
<div class="ui-alert" v-show="isCaptchaError"> ... </div>
isCaptchaError - initialized in my Vue instance:
const form = new Vue({
el: '...
0
votes
1
answer
25
views
VueNumberFormat to use in browser (UMD)
I want to use VueNumberFormat (vue 2 library) in browser.
I load libraries in my html page
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src=...
0
votes
1
answer
33
views
pnpm patch successfully patches the project, but the patch does not take effect when the project is running?
I found a problem with el-form, so I decided to patch element-ui in my project.
[email protected], [email protected], pnpm, element-ui@^2.15.14
I ran pnpm patch element-ui@^2.15.14
The root directory patches file ...
0
votes
0
answers
43
views
form validation before showing confirm modals
Description
I'm currently working on a Vue.js project using BootstrapVue to create a form. Imagine a button that performs two actions:
Validation Check using Vuelidate: It checks if the form has any ...
0
votes
0
answers
18
views
Securely store token in the browser to use in "two" clients
Context:
I have an .NET Core API that generates JWT and use it to authenticate users, and "two" client applications that use the token to send requests to the API using the token.
My problem ...
0
votes
1
answer
34
views
Vuex and Vue Router - double condition on beforeEnter not working
I have double condition in beforeEnter and nobody can enter to right place. Is there a limit in conditions or what? :(
my code in the router file:
const routes = {
path: `${routerConfig.preRoute}/...
0
votes
1
answer
58
views
error component is not defined when using child tag in vue instance
I've just started to learn vuejs and I've tried to run a little code applying what I've learned by creating a basic component inside the vue instance using Vue.component('nameOfComponent', { });, yet ...
0
votes
0
answers
27
views
Vue 2 whitespace handling in template
I have an project vue 2.7.14 + vite 5.2.11. I find out that template add extra spaces when use next formatting:
<span>
{{ text }}
</span>
The result I get is:
<span> text </...
0
votes
0
answers
69
views
ChartJS and Vue-ChartJS: Scales in chart options do not work
I just started using ChartJS and VueChartJS and begin with a simple bar chart. The problem is that the scales in chartOptions do not affect the UI.I used ChartJS 4.4.2 and VueChartJS 5.3.1.
Here's my ...
0
votes
1
answer
46
views
In Vue.JS, How to pass and change props value into nested components?
My requirement is very basic and easy, but not sure why even ChatGPT keeps giving me answer that has warning messages.
I am using Vue 2.
I have three nested components: GrandParentComponent, ...
0
votes
0
answers
30
views
How to detect swap of same compomponents?
When I'm switching visibility(v-if) of the same components with different content, components doesnt destroy and mount.
I need to detect this switch in parent or in child
<select v-model="...
0
votes
1
answer
29
views
Vuejs. Cannot set properties of undefined (setting) [duplicate]
data() {
return {
qty_to_order: null,
}
},
methods: {
showQty(product_id) {
this.carts.filter(function(cart) {
if (cart.product_id =...