layui/docs/docs/zh-CN/components/page.md

131 lines
1.8 KiB
Markdown
Raw Normal View History

2021-10-09 10:41:52 +08:00
::: demo
<template>
2021-10-09 22:20:55 +08:00
<lay-page limit=20 total=100 showPage></lay-page>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
:::
::: demo
<template>
<lay-page limit=20 total=100 ></lay-page>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
:::
::: demo
<template>
<lay-page limit=20 total=100 showPage theme="red"></lay-page>
<br>
<lay-page limit=20 total=100 showPage theme="blue"></lay-page>
<br>
<lay-page limit=20 total=100 showPage theme="orange"></lay-page>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
:::
::: demo
<template>
<lay-page limit=20 total=100 showCount showPage showLimit showRefresh showSkip></lay-page>
2021-10-09 10:41:52 +08:00
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
2021-10-11 00:11:54 +08:00
:::
::: demo
<template>
<lay-page limit=20 total=100 @jump="jump" showPage></lay-page>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const jump = function({ current }) {
console.log("当前页:" + current)
}
return {
jump
}
}
}
</script>
:::
2021-10-13 10:04:43 +08:00
::: field Page attributes
:::
2021-10-12 18:00:09 +08:00
| | | |
| ----------- | ------------ | ------- |
| limit | 每页数量 | -- |
| total | 总条数 | -- |
| showCount | 显示总数 | `false` |
| showPage | 显示每页 | `false` |
| showLimit | 显示每页数量 | `false` |
2021-10-11 02:33:17 +08:00
| showRefresh | 显示刷新按钮 | `false` |
| showSkip | 显示跳转 | `false` |
2021-10-13 10:04:43 +08:00
::: field Page events
:::
| | | |
| ----------- | ------------ | ------- |
2021-10-13 01:45:59 +08:00
| jump | 切换回调 | { current: 当前页面 } |