mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-04-30 14:19:01 +08:00
* fix(slot): 优化部分slot写法,减少手动判断 * fix(slot): 优化部分slot写法,减少手动判断 * feat(table): 添加vxe-table,适配naiveui主题,并替换掉之前table,自带导出 * feat(table): 添加vxe-table,适配naiveui主题,并替换掉之前table,自带导出 * fix: 完善table总条数不显示问题
This commit is contained in:
parent
6d1b3a4159
commit
a977ec1f3a
@ -21,6 +21,9 @@
|
|||||||
<template #loading>
|
<template #loading>
|
||||||
<n-spin :show="loading" />
|
<n-spin :show="loading" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #total>
|
||||||
|
<span class="font-size-14 line-height-28px">共 {{ pagerConfig.total }} 条数据</span>
|
||||||
|
</template>
|
||||||
<template v-for="(c, k) in slots" :key="k" #[c.key]="{ row }">
|
<template v-for="(c, k) in slots" :key="k" #[c.key]="{ row }">
|
||||||
<template v-if="Array.isArray(c.render(row))">
|
<template v-if="Array.isArray(c.render(row))">
|
||||||
<component :is="r" v-for="(r, k1) in c.render(row)" :key="k1" :row="row" :col="c" />
|
<component :is="r" v-for="(r, k1) in c.render(row)" :key="k1" :row="row" :col="c" />
|
||||||
@ -135,7 +138,7 @@ const pagerConfig = computed(() => {
|
|||||||
return {
|
return {
|
||||||
currentPage: props.pagination.pageNo,
|
currentPage: props.pagination.pageNo,
|
||||||
pageSize: props.pagination.pageSize,
|
pageSize: props.pagination.pageSize,
|
||||||
total: props.pagination.itemCount,
|
total: props.pagination.itemCount || 0,
|
||||||
background: true,
|
background: true,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
layouts: [
|
layouts: [
|
||||||
@ -146,8 +149,11 @@ const pagerConfig = computed(() => {
|
|||||||
'End',
|
'End',
|
||||||
'Sizes',
|
'Sizes',
|
||||||
'FullJump',
|
'FullJump',
|
||||||
'Total',
|
// 'Total',
|
||||||
],
|
],
|
||||||
|
slots: {
|
||||||
|
right: 'total',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user