Skillpedia
المواقع والواجهات (frontend)29k · #9841

getting-started

ما الذي تفعله

توضح هذه المهارة كيف تنشئ جدول بيانات وتعرضه في تطبيق Vue باستخدام TanStack Table. وهي موجهة لمطوري Vue الذين يريدون جدولًا يمكنهم تنسيقه والتحكم فيه.

متى تستخدمها

  • ✓عندما تبني مكون Vue يعرض السجلات في جدول.
  • ✓عندما تتغير بيانات جدول Vue مع الوقت ويجب أن تتحدث على الشاشة.
  • ✓عندما تريد إضافة ميزات الاستعلام أو الصفوف الافتراضية إلى جدول Vue.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/TanStack/table/blob/main/packages/vue-table/skills/getting-started/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أبني صفحة Vue تعرض مستخدميّ في جدول. كيف أجهز ذلك؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تعطيك ملف مكون واحدًا يعرّف الأعمدة وينشئ الجدول بـ useTable، ويمر على العناوين والصفوف والخلايا داخل القالب.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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/.

الأسئلة الشائعة

كيف أمرر البيانات المتغيرة؟

تقول المهارة إن عليك أن تستخدم ref أو قيمة computed أو دالة getter تفاعلية، لأن تمرير القيمة مرة واحدة يفقد التحديثات اللاحقة.

هل أحتاج إلى قراءة الدليل الأساسي أولًا؟

نعم. تطلب المهارة قراءة دليل النواة المشترك أولًا لفهم النموذج المستقل عن الواجهة.

ما إصدار Vue المطلوب؟

يقول دليل الترحيل لـ Vue إن الإصدار 9 من Table يتطلب Vue 3.2 أو أحدث.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
29k
الترتيب
#9841
الترخيص
MIT
آخر تحديث
21‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة