类组件+自动化的依赖注入(可选) = 极致的代码体验
需要reflect-metadata 的支持
yarn add @abraham/reflection injection-js 项目入口需要引入 reflect-metadata
import '@abraham/reflection'tsconfig.json 需要增加配置:
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "useDefineForClassFields": false
  } 
}yarn add vue3-oop 因为esbuild不支持装饰器的metadata属性,所以需要安装 vite-plugin-ts 插件使用原始ts编译
Angular文档