feat: ✨ pageContent组件,分页按钮固定位置
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<div
|
||||||
|
class="rounded bg-[var(--el-bg-color)] border border-[var(--el-border-color)] p-5 h-full md:flex flex-1 flex-col md:overflow-auto"
|
||||||
|
>
|
||||||
<!-- 表格工具栏 -->
|
<!-- 表格工具栏 -->
|
||||||
<div class="flex flex-col md:flex-row justify-between gap-y-2.5 mb-2.5">
|
<div class="flex flex-col md:flex-row justify-between gap-y-2.5 mb-2.5">
|
||||||
<!-- 左侧工具栏 -->
|
<!-- 左侧工具栏 -->
|
||||||
@@ -37,6 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-table
|
<el-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
@@ -44,6 +47,7 @@
|
|||||||
v-bind="contentConfig.table"
|
v-bind="contentConfig.table"
|
||||||
:data="pageData"
|
:data="pageData"
|
||||||
:row-key="pk"
|
:row-key="pk"
|
||||||
|
class="flex-1"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@filter-change="handleFilterChange"
|
@filter-change="handleFilterChange"
|
||||||
>
|
>
|
||||||
@@ -180,16 +184,18 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<template v-if="showPagination">
|
<div v-if="showPagination" class="mt-4">
|
||||||
<el-scrollbar :class="['mt-3', { 'flex-x-end': contentConfig?.pagePosition === 'right' }]">
|
<el-scrollbar :class="['h-8!', { 'flex-x-end': contentConfig?.pagePosition === 'right' }]">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-bind="pagination"
|
v-bind="pagination"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
/>
|
/>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</div>
|
||||||
|
|
||||||
<!-- 导出弹窗 -->
|
<!-- 导出弹窗 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="exportsModalVisible"
|
v-model="exportsModalVisible"
|
||||||
@@ -314,7 +320,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="visible" v-bind="{ style: { 'margin-bottom': '12px' }, ...cardAttrs }">
|
<div v-show="visible">
|
||||||
<el-card v-bind="cardAttrs">
|
<el-card v-bind="cardAttrs">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" v-bind="formAttrs" :class="isGrid">
|
<el-form ref="queryFormRef" :model="queryParams" v-bind="formAttrs" :class="isGrid">
|
||||||
<template v-for="(item, index) in formItems" :key="item.prop">
|
<template v-for="(item, index) in formItems" :key="item.prop">
|
||||||
@@ -105,7 +105,7 @@ const showNumber = computed(() =>
|
|||||||
);
|
);
|
||||||
// 卡片组件自定义属性(阴影、自定义边距样式等)
|
// 卡片组件自定义属性(阴影、自定义边距样式等)
|
||||||
const cardAttrs = computed<IObject>(() => {
|
const cardAttrs = computed<IObject>(() => {
|
||||||
return { shadow: "never", ...props.searchConfig?.cardAttrs };
|
return { shadow: "never", style: { "margin-bottom": "12px" }, ...props.searchConfig?.cardAttrs };
|
||||||
});
|
});
|
||||||
// 表单组件自定义属性(label位置、宽度、对齐方式等)
|
// 表单组件自定义属性(label位置、宽度、对齐方式等)
|
||||||
const formAttrs = computed<IForm>(() => {
|
const formAttrs = computed<IForm>(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container h-full flex flex-1 flex-col">
|
||||||
<div class="flex-x-between mb-10">
|
<div class="flex-x-between mb-10">
|
||||||
<el-link
|
<el-link
|
||||||
href="https://gitee.com/youlaiorg/vue3-element-admin/blob/master/src/views/demo/curd/index.vue"
|
href="https://gitee.com/youlaiorg/vue3-element-admin/blob/master/src/views/demo/curd/index.vue"
|
||||||
|
|||||||
Reference in New Issue
Block a user