Questions tagged [vue-class-components]

132 questions
18
votes
2 answers

Vue 3 Typescript Class Component - Type 'typeof import(.../node_modules/vue/dist/vue")' is not a constructor function type

Hi I'm using Vue 3 with Typescript and Class Components. I just copy-pasted the example from the docs but it looks like there is an issue with Typescript: TS1238: Unable to resolve signature of class decorator when called as an expression. This…
Tom
  • 1,358
  • 2
  • 14
  • 36
18
votes
2 answers

what will happen for vuejs projects based on class components in vuejs v3.0?

I wanna upgrade my vuejs project to typescript based on class components, but i read in vue issue's https://github.com/vuejs/rfcs/pull/17#issuecomment-494242121 : Update: the Class API proposal is being dropped. so what will happen to existing…
SeyyedKhandon
  • 5,197
  • 8
  • 37
  • 68
10
votes
1 answer

Property does not exist on the type in vue-class-component

I got an error in my TypeScript component file that a prop doesn't exist, but I declared the prop exactly as described in the vue-class-component documentation example. Property 'propMessage' does not exist on type 'MyComponent'.Vetur(2339) How do…
Jon Sud
  • 10,211
  • 17
  • 76
  • 174
9
votes
2 answers

How to setup Webpack so that will be able to use Pug in both Single File Components (.vue) and "vue-class-component" classes?

According Vue.js documentatin to use pug pre-processor in Single File Components, pug-plain-loader (not pug-loader) required: { test: /\.pug$/, loader: 'pug-plain-loader' } What if besides Singe File Components (.vue files) I also need to…
Takeshi Tokugawa YD
  • 670
  • 5
  • 40
  • 124
9
votes
0 answers

How to build a es6 vue-component library using vue-class-component

I am trying to create a vuejs component library in typescript with vue-class-component and vue-property-decorator with the following requirements: The library components should be written in class-style typescript. The library components should be…
8
votes
1 answer

What access modifiers should I use for the class-component in Vue?

I'm wondering what modifiers should I use for properties and methods in Vue classes? (I use vue-class-component package). public, private, protected? Or should I turn off the linter rule that says I need to set an access modifier? Here is an…
8
votes
1 answer

vue-class-component: Super expression must either be null or a function, not undefined

Ok, it's a weird usecase, but in any case. I have a controls component, that includes menu component, that also includes a controls component but without menu (strange stuff, but that's design). What I do. Controls component: import {Component,…
Terion
  • 2,396
  • 3
  • 28
  • 42
7
votes
1 answer

Reactive Vue Chart.js component using Typescript

Using vue-property-decorator (or actually its Component and Prop of vue-class-component) and vue-chartjs-typescript, I am trying to make a BarChart-component with the properties chartData and options. The following code actually works when serving…
Neman
  • 1,237
  • 2
  • 13
  • 16
7
votes
2 answers

vue-class-component : how to create and initialize reflective data

I'm using vuejs with typescript and vue-class-component. I'm trying to create a custom component with reactive data. Here is my code: