vuejs /vue-class-component
ES / TypeScript decorator for class-style Vue components.
★ 5,744⑂ 425👁 81⑃ 176● 465▤ 24
+0
日增长
5,744
stars
425
forks
81
watchers
176
prs
465
issues
24
releases
README
[DEPRECATED] Vue Class Component ⚠️ Notice This library is no longer actively maintained. It is no longer recommend to use Class-based components in Vue 3. The recommended way to use Vue 3 in large applications is Single-File Components, Composition API, and . If you still want to use classes, check out the community-maintained project vue-facing-decorator. Additionally, if you're interested in migrating out of class components, you might find the CLI tool vue-class-migrator helpful for the transition. --- ECMAScript / TypeScript decorator for class-style Vue components. Document See https://class-component.vuejs.org Please note, documentation for v8 is not ready yet. Check out the readme in the respective branch or see v8 proposals in the issue list Online one-click setup for contributing Contribute to Vue Class Component using a fully featured online development environment that will automatically: clone the repo, install the dependencies and start the docs web server and run yarn dev. Issue reporting / pull requests See contribution guideline License MIT
Top issues
#584[vue3] When is 8.0 releasing?61 comments · 2022-01-11#406[Vue v3] Changes for @Component decorator and Vue base class61 comments · 2020-03-19#569Deprecate vue-class-component60 comments · 2021-10-08#465Class style `props` definition31 comments · 2020-10-04#416Composition functions support and `this` value changes29 comments · 2020-04-26#632So ... still going to be supported for vue3 or ded?13 comments · 2023-01-21#505this.$t is not a function in a class component13 comments · 2021-01-13#223Feedback for ES decorator proposal13 comments · 2018-02-13
Latest release
v7.2.6 v7.2.6 2020-09-17Bug Fixes
make mixins helper type compatible with previous usage (454) (bdcec69)
This is a fix to retain backward compatibility to the old mixins type. Although it is recommended not to manually specify mixin types via the type parameters of mixins. e.g.
ts
// NOT recommended
@Component
class MyComp extends mixins(Foo, Bar) {
// ...
}
Because you can pass any type to the parameter even if it is not matched with the actual mixin structure.
If you want to specify a generic type parameter for your class component, you can extend it before passing in mi