feat: reoede web to tailwindcss

This commit is contained in:
engigu
2025-08-10 14:32:24 +08:00
parent 0a12a25473
commit d557547bc0
192 changed files with 9624 additions and 9694 deletions
+43
View File
@@ -0,0 +1,43 @@
<template>
<div class="flex items-center justify-between space-y-6">
<div class="text-sm text-gray-500">
{{ total }} 条记录 {{ currentPage }} / {{ totalPages }}
</div>
<div class="flex items-center space-x-2">
<Button size="sm" variant="outline" :disabled="currentPage <= 1" @click="$emit('page-change', currentPage - 1)">
上一页
</Button>
<Button size="sm" variant="outline" :disabled="currentPage >= totalPages"
@click="$emit('page-change', currentPage + 1)">
下一页
</Button>
</div>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { Button } from '@/components/ui/button'
interface Props {
total: number
currentPage: number
pageSize: number
}
const props = defineProps<Props>()
// const _emit = defineEmits<{
// 'page-change': [page: number]
// }>()
const totalPages = computed(() => {
return Math.ceil(props.total / props.pageSize)
})
</script>
<script lang="ts">
export default {
name: 'Pagination'
}
</script>