u
This commit is contained in:
1 parent
e99a9fb274
commit
0be0b0767a
788 files changed
+112023
-14941
No files matched your search
@@ -1,26 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
// hideOnSinglePage:只有一页时整块隐藏;change 事件同时给出当前页与每页条数
|
||||
// hideOnSinglePage:只有一页时整块隐藏
|
||||
import { ref } from 'vue'
|
||||
import { G3Pagination, G3Space, G3Switch } from '@g3soft/ui'
|
||||
|
||||
const total = ref(8)
|
||||
const current = ref(1)
|
||||
const onlyOne = ref(false)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<G3Space direction="vertical" :size="12" style="display: flex">
|
||||
<G3Space :size="8" align="center">
|
||||
<G3Switch v-model="onlyOne">只有一页(8 条)</G3Switch>
|
||||
<span style="font-size: 13px; color: #6b7280">切到 86 条可以看完整分页</span>
|
||||
</G3Space>
|
||||
<G3Switch v-model="onlyOne">只有一页(8 条)</G3Switch>
|
||||
|
||||
<G3Pagination
|
||||
v-model:current="current"
|
||||
:total="onlyOne ? 8 : 86"
|
||||
hide-on-single-page
|
||||
show-total
|
||||
@change="(page: number, size: number) => (current = page)"
|
||||
/>
|
||||
<G3Pagination v-model:current="current" :total="onlyOne ? 8 : 86" hide-on-single-page show-total />
|
||||
</G3Space>
|
||||
</template>
|
||||
Reference in new issue
Block a user