docs: improve docs and update api

This commit is contained in:
Justineo
2021-11-24 12:05:27 +08:00
parent a790f0d8a9
commit 5226ec968c
19 changed files with 297 additions and 114 deletions

View File

@@ -1,37 +0,0 @@
<template>
<article>
<veui-pagination
:page="page"
:total="total"
:to="to"
goto
/>
</article>
</template>
<script>
import { Pagination } from 'veui'
export default {
components: {
'veui-pagination': Pagination
},
data () {
return {
to: './pagination?page=:page',
total: 10101
}
},
computed: {
page () {
return Number(this.$route.query.page) || 1
}
}
}
</script>
<style lang="less" scoped>
article {
text-align: right;
}
</style>

View File

@@ -0,0 +1,60 @@
<template>
<article>
<section class="toggles">
<veui-checkbox v-model="showTotal">
Show total
</veui-checkbox>
<veui-checkbox v-model="showPageSize">
Show page size
</veui-checkbox>
<veui-checkbox v-model="showGoto">
Show goto
</veui-checkbox>
</section>
<section>
<veui-pagination
:page="page"
:total="total"
to="./pagination?page=:page"
:show-total="showTotal"
:show-goto="showGoto"
:show-page-size="showPageSize"
/>
</section>
</article>
</template>
<script>
import { Pagination, Checkbox } from 'veui'
export default {
components: {
'veui-pagination': Pagination,
'veui-checkbox': Checkbox
},
data () {
return {
to: '.',
total: 10101,
showTotal: true,
showGoto: true,
showPageSize: true
}
},
computed: {
page () {
return Number(this.$route.query.page) || 1
}
}
}
</script>
<style lang="less" scoped>
.toggles {
margin-bottom: 20px;
}
.veui-checkbox + .veui-checkbox {
margin-left: 16px;
}
</style>