Skip to content
Back to skills

Vue Composables

ASecurity

提供标准化的 useTable, useRequest 等 Hooks,用于简化列表页和异步请求的逻辑复用。

  • 840 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 7, 2026
devopstypescriptgovue

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add TencentBlueKing/bk-bcs --skill vue-composables --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vue Composables?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vue Composables
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tencentblueking-vue-composables/badge)](https://www.skillsdirectory.com/skills/tencentblueking-vue-composables)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: eng-vue-composables
name: Vue 3 组合式函数最佳实践 (Composables)
category: engineering
description: 提供标准化的 useTable, useRequest 等 Hooks,用于简化列表页和异步请求的逻辑复用。
tags: [vue3, composables, hooks, useTable]
updated_at: 2026-01-09
---

# Vue 3 组合式函数最佳实践

为了避免在每个页面重复编写分页、Loading 和请求逻辑,我们推荐使用 Composables。

## 1. useTable (列表页神器)

封装了分页、加载状态、数据获取的通用逻辑。**一行代码搞定所有表格逻辑**。

**使用方式:**
```typescript
const { loading, data, pagination, handlePageChange, handleLimitChange } = useTable(getHostList);
```

**配合 bk-table:**
```html
<bk-table
  :data="data"
  :pagination="pagination"
  v-bkloading="{ isLoading: loading }"
  remote-pagination
  @page-change="handlePageChange"
  @page-limit-change="handleLimitChange"
>
  <bk-table-column prop="name" label="名称" />
</bk-table>
```

> 📦 获取完整 Hook 实现:`skill://vue-composables/assets/useTable.ts`


---
## 📦 可用资源

- `skill://vue-composables/assets/useTable.ts`

> 根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.