vuejs /vue-class-component

ES / TypeScript decorator for class-style Vue components.

★ 5,744⑂ 425👁 81⑃ 176● 465▤ 24
TypeScriptMITCreated 2015-06-25
Download: v7.2.6v7.2.6 ↓7.2.62020-09-17
+0
Daily
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

Latest release

v7.2.6 v7.2.6 2020-09-17
Bug 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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON