Pular para o conteúdo
Skillpedia
Sites e telas (frontend)29 mil · #9841

getting-started

O que ela faz

Esta habilidade mostra como criar e exibir uma tabela de dados em um aplicativo Vue com o TanStack Table. Serve para desenvolvedores Vue que querem uma tabela que possam estilizar e controlar.

Quando usar

  • ✓Quando você está criando um componente Vue que mostra registros em uma tabela.
  • ✓Quando os dados da sua tabela Vue mudam com o tempo e precisam ser atualizados na tela.
  • ✓Quando você quer adicionar recursos de consulta ou de virtualização a uma tabela Vue.

Link da skill

https://github.com/TanStack/table/blob/main/packages/vue-table/skills/getting-started/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/TanStack/table/blob/main/packages/vue-table/skills/getting-started/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Estou criando uma página Vue que lista meus usuários em uma tabela. Como eu configuro?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

Ela oferece um componente de arquivo único que define as colunas, cria a tabela com useTable e percorre os cabeçalhos, as linhas e as células no template.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Vue Table setup and integration

Before starting, run intent load @tanstack/table-core#core for the shared headless model and stable-input rules.

Setup

<script setup lang="ts">
import { ref } from 'vue'
import { FlexRender, tableFeatures, useTable } from '@tanstack/vue-table'

type Person = { name: string; age: number }
const features = tableFeatures({})
const columns = [
  { accessorKey: 'name', header: 'Name' },
  { accessorKey: 'age', header: 'Age' },
]
const data = ref<Person[]>([{ name: 'Ada', age: 36 }])
const table = useTable({ features, columns, data })
</script>

<template>
  <table>
    <thead>
      <tr v-for="group in table.getHeaderGroups()" :key="group.id">
        <th v-for="header in group.headers" :key="header.id">
          <FlexRender v-if="!header.isPlaceholder" :header="header" />
        </th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="row in table.getRowModel().rows" :key="row.id">
        <td v-for="cell in row.getAllCells()" :key="cell.id">
          <FlexRender :cell="cell" />
        </td>
      </tr>
    </tbody>
  </table>
</template>

Essential constraints

Use useTable with a ref, computed value, or reactive getter for changing data. Passing data.value captures one array and loses later updates. Keep static features and columns stable; derive transformed arrays with computed.

Table owns models and state. The application owns markup, CSS, interactions, and accessibility. Core-only tables use row.getAllCells(); visibility-aware methods need columnVisibilityFeature. Optional state and APIs require their features. Put row-model slots after their prerequisite features in tableFeatures().

Load by task

  • For repeated features, defaults, typed contexts, or component registries, read reusable app hooks.
  • For Query-backed data, server pages, sorting, filtering, or request keys, read TanStack Query integration.
  • For virtual rows, columns, dynamic measurement, or infinite scrolling, read TanStack Virtual integration.
  • For controlled state, tracked reads, or render subscriptions, read table state.
  • For feature registration, missing feature APIs, or processing ownership, run intent load @tanstack/table-core#table-features and read only references needed by the task.
  • For v8 code, read the migration checklist.

API discovery

Inspect node_modules/@tanstack/vue-table/dist/index.d.ts, then the exported adapter declarations for the installed version. Inspect optional core APIs under node_modules/@tanstack/table-core/dist/features/.

Perguntas frequentes

Como devo passar dados que mudam?

A habilidade diz para usar um ref, um valor computed ou um getter reativo, já que passar o valor uma única vez perde as atualizações seguintes.

Preciso ler o guia principal antes?

Sim. A habilidade pede que você leia antes o guia principal compartilhado sobre o modelo sem aparência.

Qual versão do Vue é necessária?

O guia de migração do Vue diz que o Vue 3.2 ou superior é necessário para a Table v9.

Detalhes

Descrição original do autor

Create and render Table v9 with the vue adapter. Route reusable createTableHook components, Query and Virtual integration, and framework setup; use table-state for reactive ownership.

repo: TanStack/table

Popularidade

Estrelas no GitHub
29 mil
Posição no ranking
#9841
Licença
MIT
Atualizada em
21/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas