Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit 87cf939

Browse files
authored
feat: table (#192)
1 parent 517fcd3 commit 87cf939

File tree

20 files changed

+3055
-280
lines changed

20 files changed

+3055
-280
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"docs:preview": "vitepress preview packages"
1212
},
1313
"dependencies": {
14+
"@tanstack/table-core": "^8.21.3",
15+
"@tanstack/vue-table": "^8.21.3",
1416
"@vueuse/core": "^13.1.0",
1517
"@vueuse/integrations": "^13.1.0",
1618
"@vueuse/shared": "^13.1.0",

packages/.playground/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11+
"@tanstack/table-core": "^8.21.3",
12+
"@tanstack/vue-table": "^8.21.3",
1113
"@vueuse/integrations": "^13.1.0",
1214
"fuse.js": "^7.1.0",
15+
"scule": "^1.3.0",
1316
"tailwindcss": "^4.1.4",
1417
"vue": "^3.5.13",
1518
"vue-router": "^4.5.0"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<script lang="ts" setup>
2+
import { useColor } from '@/app/composables/useColor'
3+
import Table from '@/ui/components/Table/Table.vue'
4+
import { ref } from 'vue'
5+
6+
const { color } = useColor()
7+
8+
const data = ref([
9+
{
10+
id: '4600',
11+
date: '2024-03-11T15:30:00',
12+
status: 'paid',
13+
email: 'james.anderson@example.com',
14+
amount: 594,
15+
},
16+
{
17+
id: '4599',
18+
date: '2024-03-11T10:10:00',
19+
status: 'failed',
20+
email: 'mia.white@example.com',
21+
amount: 276,
22+
},
23+
{
24+
id: '4598',
25+
date: '2024-03-11T08:50:00',
26+
status: 'refunded',
27+
email: 'william.brown@example.com',
28+
amount: 315,
29+
},
30+
{
31+
id: '4597',
32+
date: '2024-03-10T19:45:00',
33+
status: 'paid',
34+
email: 'emma.davis@example.com',
35+
amount: 529,
36+
},
37+
{
38+
id: '4596',
39+
date: '2024-03-10T15:55:00',
40+
status: 'paid',
41+
email: 'ethan.harris@example.com',
42+
amount: 639,
43+
},
44+
])
45+
</script>
46+
47+
<template>
48+
<div class="flex flex-col gap-4">
49+
<Table :data="data" :loading-color="color" class="flex-1" />
50+
51+
<Table :data="data" :loading="true" :loading-color="color" class="flex-1" />
52+
</div>
53+
</template>

0 commit comments

Comments
 (0)