# Module Spec：vab-avatar（用户头像下拉）

module:
  id: vab-avatar
  name: VabAvatar（用户头像/用户名下拉）
  type: ui
  entrypoints:
    - library/components/VabAvatar/index.vue

public_api:
  concept:
    - "右上角用户头像下拉：个人中心/外链/退出登录，并在退出后跳转到登录页（携带回跳参数）"

dependency_closure:
  runtime:
    - "store-user：avatar/username/logout()"
    - "vue-router：useRoute/useRouter"
    - "utils/routes：toLoginRoute(fullPath)"
    - "i18n：translate()"
    - "Element Plus：el-dropdown/el-dropdown-menu/el-dropdown-item/el-avatar"
    - "VabIcon"

acceptance:
  - "下拉可见时箭头激活态切换"
  - "点击退出登录会调用 userStore.logout() 并跳转 toLoginRoute(route.fullPath)"

pitfalls:
  - "依赖 userStore 提供 avatar/username；新项目需保证字段一致"
