fix(document): 修复 page 文档

This commit is contained in:
就眠仪式 2021-10-15 09:30:37 +08:00
parent 991462af17
commit 315de42276
5 changed files with 45 additions and 14 deletions

View File

@ -32,7 +32,7 @@ export default {
<template>
<lay-menu selectedKey="5" tree>
<lay-menu-item title="首页" id="1">
<template v-slot:title> 哈哈哈 </template>
<template v-slot:title> 无感 </template>
</lay-menu-item>
<lay-menu-item title="用户" id="2"></lay-menu-item>
<lay-menu-item title="角色" id="3"></lay-menu-item>
@ -65,3 +65,11 @@ export default {
| | | |
| ----------- | -------- | --- |
| selectedKey | 默认选择 | -- |
::: field menu slots
:::
| | | |
| ----------- | -------- | --- |
| title | 菜单标题 | -- |

View File

@ -1,7 +1,7 @@
::: demo
<template>
<lay-page limit=20 total=100 showPage></lay-page>
<lay-page :limit="limit" :total="total" showPage></lay-page>
</template>
<script>
@ -10,7 +10,12 @@ import { ref } from 'vue'
export default {
setup() {
const limit = ref(20)
const total = ref(100)
return {
limit,
total
}
}
}
@ -21,7 +26,7 @@ export default {
::: demo
<template>
<lay-page limit=20 total=100 ></lay-page>
<lay-page :limit="limit" :total="total"></lay-page>
</template>
<script>
@ -30,7 +35,12 @@ import { ref } from 'vue'
export default {
setup() {
const limit = ref(20)
const total = ref(100)
return {
limit,
total
}
}
}
@ -41,11 +51,11 @@ export default {
::: demo
<template>
<lay-page limit=20 total=100 showPage theme="red"></lay-page>
<lay-page :limit="limit" :total="total" showPage theme="red"></lay-page>
<br>
<lay-page limit=20 total=100 showPage theme="blue"></lay-page>
<lay-page :limit="limit" :total="total" showPage theme="blue"></lay-page>
<br>
<lay-page limit=20 total=100 showPage theme="orange"></lay-page>
<lay-page :limit="limit" :total="total" theme="orange"></lay-page>
</template>
<script>
@ -54,7 +64,12 @@ import { ref } from 'vue'
export default {
setup() {
const limit = ref(20)
const total = ref(100)
return {
limit,
total
}
}
}
@ -65,7 +80,7 @@ export default {
::: demo
<template>
<lay-page limit=20 total=100 showCount showPage showLimit showRefresh showSkip></lay-page>
<lay-page :limit="limit" :total="total" showCount showPage showLimit showRefresh showSkip></lay-page>
</template>
<script>
@ -74,7 +89,12 @@ import { ref } from 'vue'
export default {
setup() {
const limit = ref(20)
const total = ref(100)
return {
limit,
total
}
}
}
@ -85,7 +105,7 @@ export default {
::: demo
<template>
<lay-page limit=20 total=100 @jump="jump" showPage></lay-page>
<lay-page :limit="limit" :total="total" @jump="jump" showPage></lay-page>
</template>
<script>
@ -94,11 +114,15 @@ import { ref } from 'vue'
export default {
setup() {
const limit = ref(20)
const total = ref(100)
const jump = function({ current }) {
console.log("当前页:" + current)
console.log("当前页:" + current)
}
return {
limit,
total,
jump
}
}

View File

@ -5,6 +5,8 @@
<lay-timeline-item title="0.1.1">
[新增] tree 树,支持 node-clickselectKeys 等<br>
[新增] table 表格,提供 columns datasource page 分页<br>
[新增] menu 菜单 title 插槽,允许自定义菜单项<br>
[调整] menu 菜单 child-item 行高 40 -> 46, 减少突兀感
</lay-timeline-item>
<lay-timeline-item title="0.1.0">
[新增] tree 树,支持 node-clickselectKeys 等<br>

View File

@ -49,8 +49,8 @@
>
</div>
</template>
<script setup name="LayPage"></script>
<script setup lang="ts">
<script setup name="LayPage" lang="ts">
import { defineProps, Ref, ref, watch } from 'vue'
const props = withDefaults(

View File

@ -6,9 +6,6 @@
>
<div v-if="defaultToolbar || slot.toolbar" class="layui-table-tool">
<div v-if="defaultToolbar" class="layui-table-tool-self">
<div class="layui-inline" title="筛选列" lay-event="LAYTABLE_COLS">
<i class="layui-icon layui-icon-cols" />
</div>
<div
class="layui-inline"
title="打印"