@composy/lottie-vue
@composy/lottie-vue
Lottie 动画的 Vue 3 适配层,提供 Lottie、LottieAsync、vLottie
指令和多个组合式函数,底层能力来自 @composy/lottie-core。
安装与使用
pnpm add @composy/lottie-vue
<script setup lang="ts">
import { Lottie, useLottieProgress } from '@composy/lottie-vue'
</script>
<template>
<Lottie src="/animations/loading.json" :loop="true" />
</template>
目录与构建
packages/vue/
├── src/ # 组件、指令和组合式函数
├── .ldesign/builder.config.ts # @composy/builder(rolldown)配置
├── .ldesign/tsconfig.esm.json # ESM 类型检查配置
└── .ldesign/tsconfig.cjs.json # CJS 类型检查配置
pnpm --dir packages/vue run build
pnpm --dir packages/vue run type-check
pnpm --dir packages/vue run type-check:cjs
pnpm --dir packages/vue run lint:check
构建输出为 dist(压缩 UMD 和 CSS)、es(ESM 声明)、esm(保留 ESM/样式源)和
lib(CJS)。exports、main、module、types、unpkg 与 jsdelivr 均指向实际产物。
License
MIT
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.2 | 3.5.32 | MIT | |
| 0.0.1 | ^3.5.32 | MIT |