Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Filter by
Sorted by
Tagged with
1 vote
0 answers
142 views

I have a component OverviewMapView.vue written in Vue 3 with a Map component from MapBox and the component is defined with vue-class-component. I want to write unit tests for it but at this point ...
Su2000's user avatar
  • 11
1 vote
0 answers
386 views

this is my sample vue code <script lang="ts"> import { Component, Vue, toNative,Prop,Inject,Watch,Provide } from 'vue-facing-decorator' @Component class Demo extends Vue { title=&...
buddhi chamalka's user avatar
0 votes
1 answer
453 views

I'm trying to migrate vue2 to vue3 which is "Class Style Component". It is using vue-i18n. Can I use vue-i18n in Vue3? package.json "dependencies": { "vue": "^...
Thunderbird's user avatar
0 votes
0 answers
221 views

I have created a Lit component in typescript. It is being exported as a named export. I am not able to register it in Vue 2 class component. Here are the issues I am facing: Issue 1: import { ...
veteran95's user avatar
0 votes
1 answer
2k views

what are the solution that screenshot , how to do it I want to know how to add component to App.tsx file what are the solution that screenshot , how to do it I want to know how to add component to ...
shiran sandaruwan's user avatar
1 vote
0 answers
92 views

I am busy migrating to [email protected] from [email protected] and found that during the upgrade for some reason vue-chartjs chartOptions is not working. I defined my lineChart like this in html: <line-chart v-if=&...
tomthedude's user avatar
0 votes
1 answer
2k views

Precondition: Vue3 + typescript + vue-class-component Im trying to append a dynamic created div to a div element inside of the template tag on focusin on an input template Element. I tried two ways to ...
Dackelkotze's user avatar
2 votes
0 answers
77 views

So from the backend I get a array of objects that look kind of like this ItemsToAdd { Page: MemberPage Feature: Search Text: "Something to explain said feature" } So i match these ...
novafluff's user avatar
  • 911
3 votes
0 answers
374 views

I need to test Line class. But I see only this error TypeError: Line_vue_1.default is not a constructor in Jest test. If I test class that extends only Vue - it works fine. But if it extends ...
Ulia Savi's user avatar
1 vote
1 answer
1k views

I'm attempting to mix composables into a class based component setup, as part of a slow migration from Vue 2 to Vue 3. However, I am struggling to referenced return values from the setup function ...
Micheal J. Roberts's user avatar
2 votes
1 answer
897 views

I just created a simple test component like this: <template> <div>{{ value | currency }}</div> </template> <script lang="ts"> import { ...
Daniel Santos's user avatar
0 votes
1 answer
998 views

I am using class-based vue components and am trying to access a parent's (of a parent's) method within a child component for various reasons. The syntax is as follows for the definition of my class-...
Dainank's user avatar
  • 2,613
0 votes
1 answer
792 views

I have a logical component that doesn't have a template, but only stores the active/not active state. So. It works, but without ID. I use the id when necessary to make the block's state consistent ...
ATLANT's user avatar
  • 93
0 votes
1 answer
463 views

Disclaimer: I'm a beginner in using Vue.js, and being used to Angular I went the Class Component way. I know that not the proper Vue.js way, but this is a fun pet project, so I elected to do it in a ...
Dremor's user avatar
  • 831
0 votes
1 answer
655 views

I have vue class component like this export default class MyText extends Vue { @Prop({ type: String, default: 'id-rt' }) id!: string; // ERROR: Expected indentation of 8 spaces but found 4 ...
coure2011's user avatar
  • 42.8k
0 votes
0 answers
516 views

I have a Vue component that has Container that I use v-if to control its visibility. I set isModalOpen to false ant first but When I create a function to toggle the property to true but it seems it's ...
MAXWEL OCHIENG's user avatar
0 votes
1 answer
305 views

Having the code, I am getting State: undefined and clicking the toggle button does nothing. How to get the default value from @Prop to some data correctly using @Component? <script lang="ts&...
coure2011's user avatar
  • 42.8k
0 votes
4 answers
3k views

My parent component has a child component called with reference passed to it: <child ref="childRef" /> Now from the parent component I want to run the function which is inside child ...
The50's user avatar
  • 1,198
0 votes
1 answer
1k views

I read a code, where it allows user to download attachment <template #link="{ item, rowdata }"> <attachment-link v-test-id="'attachment-link'" :inventory-...
hades's user avatar
  • 4,774
1 vote
1 answer
547 views

I realized that my application was much slower to build with vue-cli (either a build production or a simple dev server). I import bootstrap this way in a SCSS file that re-writes some rules that is ...
Kylian Lion's user avatar
1 vote
1 answer
1k views

The production environment reports an error, but the development environment is normal. error: Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start ...
Kael's user avatar
  • 11
0 votes
0 answers
522 views

I am not able to use this mutation to change the state of a value in Vuex pages/example.vue <template> <div class="pa-md-10 mx-md-10"> <v-row> <div> ...
Austin Hallett's user avatar
0 votes
1 answer
427 views

I'm writing application using Vue 2/typescript and vue-property-decorator. In my component I use beforeRouteEnter/beforeRouteUpdate hooks. My component has method findProjects, and I want to invoke ...
Shaci's user avatar
  • 316
1 vote
1 answer
426 views

I am building an application using Nuxt. I am playing with vuex for the first time. I have followed a bunch of tutorials to get this set up, but I am running into issues accessing the store and I am ...
Austin Hallett's user avatar
2 votes
0 answers
2k views

I'm trying out Vulidate with Vue 3, but I can't get it to fit into my typical pattern using the vue-class-component & Typescript syntax. I see this similar question, but I expect there have been ...
ScumSprocket's user avatar
0 votes
1 answer
919 views

I am trying to use the composition api plugin on a vue2 project + class components + typescript. The composition itself works fine, but the does not seem to be working. composition api: https://...
Anish's user avatar
  • 3,232
1 vote
1 answer
1k views

If I asked "How vue-class-component works", most likely this question has been marked as too wide. By the way, I checked it's source code, but did not understood how it works, so I need to ...
Takeshi Tokugawa YD's user avatar
1 vote
1 answer
1k views

I am using Vue3(class type components) with typescript. Please find below code export default class MyClassextends Vue { $refs!: { locationSearch: any; }; $root!: { $on: any; }; } ...
Sagar Jajoriya's user avatar
1 vote
1 answer
4k views

I am using Vue 3 with class based components and Typescript. If I try to use a component inside another component I get this error: [Vue warn]: Failed to resolve component: Button If this is a native ...
Danny_DD's user avatar
  • 806
3 votes
2 answers
6k views

<script> import * as Vue from 'vue' import Component from 'vue-class-component' @Component export default class HelloWorld extends Vue { //my operation } </script> It's a simple ...
Daffodil's user avatar
0 votes
0 answers
882 views

When using the Composition API with Class Components in Vue 3 and when using Typescript, how can properties be defined in the setup method? For example: export default class Test extends Vue { ...
Arnold Zahrneinder's user avatar
2 votes
1 answer
469 views

I am working on project upgrade from Vue 2 to Vue 3. The code base changed according to Vue migration documents: https://v3-migration.vuejs.org/breaking-changes/introduction.html#overview. I have ...
skyline's user avatar
  • 23
3 votes
1 answer
1k views

Heads-up: We are using Vue 2 and are not planning to switch to the Composition API (yet). This question is about vue-class-components. Question: The documentation of vue-class-components states that ...
Markus Weninger's user avatar
1 vote
2 answers
1k views

We've built a project for the last 8 months using vue 3 and and the class components, but as it seems like it's no longer maintained, we'd like to gradually switch to the composition API, and more ...
ATM's user avatar
  • 160
0 votes
1 answer
733 views

I am building my first NuxtJs project and I am also using Vue Class Component to write my components as classes. I am facing trouble in accessing the beforeRouteEnter component hook after applying Vue ...
Arthur Borba's user avatar
1 vote
1 answer
3k views

I got the error Module not found: Error: Can't resolve './decorators/Emit' when tried to import some functionality from the library vue-property-decorator... Well, I did not ask this question if the ...
Takeshi Tokugawa YD's user avatar
1 vote
1 answer
74 views

Basically I'm trying to create a function that dynamically defines class that extends another class from passed object. Something like this: const ObjectMixin = function<T>(obj: T): new () => ...
Alex l.'s user avatar
  • 283
2 votes
2 answers
204 views

I use vue vue-class-component and it works fine: import vuetify from '@/plugins/vuetify' @Component({ components: { vue2Dropzone }, vuetify }) But when I try to add new component ...
Kirill's user avatar
  • 1,492
0 votes
0 answers
585 views

I have an issue within a complex project: Somehow, Vue re-renders all children at every change We use vue 2.5.17 with typescrip, class components and decorators. I created a new, clean component ...
Ciprian Iacob's user avatar
0 votes
1 answer
2k views

I am trying to access a child component method. Usually this is fine this.$refs.searchInput.reset() To keep typescript happy this is required. (this.$refs.searchInput as HTMLFormElement).reset() I ...
TommyD's user avatar
  • 1,043
6 votes
4 answers
4k views

I have a Vue.js v2.6 project with TypeScript v.4.3 "under the hood". My problem: I cannot find any documentation that clears up, if it makes sense to use access modifiers in Vue components ...
jasie's user avatar
  • 2,472
0 votes
1 answer
797 views

<script lang="ts"> import { defineComponent, ref, nextTick, unref, onMounted } from 'vue'; import { useScript } from '/@/hooks/web/useScript'; const BAI_DU_MAP_URL = 'https://api.map....
大盗不操戈's user avatar
2 votes
1 answer
1k views

I'm trying to add PayPal buttons to an existing checkout page. However, I've had quite a bit of trouble because our project uses Vue.js class components, while examples that I've come across don't (...
ML72's user avatar
  • 155
0 votes
1 answer
1k views

Currently I use Vue 2 with Typescript, but I can't add options to the component <script lang="ts"> import { Component, Vue } from "vue-property-decorator"; import HelloWorld ...
Chung Nguyễn Trần's user avatar
0 votes
2 answers
1k views

I have a parent component ChangeInfo, inside it is a child component ShowWorkInfo. Inside the ShowWorkInfo component, I have several input forms to update the job information. I created a variable ...
thinh6699's user avatar
6 votes
1 answer
16k views

So I've read this article a couple of times and as I understand, I can use v-model, instead of props, to pass values from a parent to a child component and automatically emit event when prop's value ...
Igor Nikiforov's user avatar
0 votes
1 answer
223 views

I seem to break the reactivity of my objects, and the v-if's don't work. My array is an array of Parse Objects, which require me to use .get() to get the values, which is working on initial load on ...
Lengo's user avatar
  • 342
0 votes
1 answer
1k views

I was using typescript in a vue2 class based components. sampleData prop is not reactive in a component while using a custom type KeyValuePair. export type KeyValuePair<T> = { [key in string | ...
VasanthThoraliKumaran's user avatar
0 votes
1 answer
462 views

I've adopted my project with @vue/composition-api // main.ts import Vue from 'vue' import VueCompositionApi from '@vue/composition-api' Vue.use(VueCompositionApi) But when setting setup() in a Class ...
Newman's user avatar
  • 33
0 votes
0 answers
356 views

i want to use "ngx-doc-viewer" package in vue project. But i can not understand how to use this in vue 2 class style with typescirpt project . Here is the link ngx-package i am thinking ...
Binoy Sarker's user avatar