No description
  • Vue 52.4%
  • TypeScript 32.9%
  • CSS 11.5%
  • JavaScript 2.3%
  • Dockerfile 0.9%
Find a file
2026-03-28 10:17:47 +03:00
app chore: initial commit 2026-03-28 10:17:47 +03:00
vite-config chore: initial commit 2026-03-28 10:17:47 +03:00
.env chore: initial commit 2026-03-28 10:17:47 +03:00
.env.development chore: initial commit 2026-03-28 10:17:47 +03:00
.env.production chore: initial commit 2026-03-28 10:17:47 +03:00
.gitignore chore: initial commit 2026-03-28 10:17:47 +03:00
components.json chore: initial commit 2026-03-28 10:17:47 +03:00
Dockerfile chore: initial commit 2026-03-28 10:17:47 +03:00
eslint.config.js chore: initial commit 2026-03-28 10:17:47 +03:00
nuxt.config.ts chore: initial commit 2026-03-28 10:17:47 +03:00
package.json chore: initial commit 2026-03-28 10:17:47 +03:00
pnpm-lock.yaml chore: initial commit 2026-03-28 10:17:47 +03:00
pnpm-workspace.yaml chore: initial commit 2026-03-28 10:17:47 +03:00
README.md chore: initial commit 2026-03-28 10:17:47 +03:00
tsconfig.json chore: initial commit 2026-03-28 10:17:47 +03:00

Nuxt4模版示例

依赖

  • Typescript
  • 状态管理 pinia + pinia-plugin-persistedstate持久化
  • 样式库 tailwindcss
  • 工具库 es-toolkit vueuse
  • 代码风格 eslint @antfu/eslint-config
  • 动画 lottie-web
  • UI库 shadcn
  • 视频播放器 DPlayer
  • GZIP压缩 vite-plugin-compression2

全局状态管理pinia

stores/user.store.ts

示例使用setup语法. 持久化插件,默认使用cookie,不然服务端使用token认证会出问题.

api封装

composables/useHttp.ts

简单封装fetch,使用拦截器请求添加token认证,错误拦截处理,使用hook方式导出