|
|
@@ -1,11 +1,60 @@
|
|
|
<template>
|
|
|
<ContentContainer>
|
|
|
<BreadCrumbMenu :current_label="'账号'" />
|
|
|
- <div class="permission-account">权限管理: 账号</div>
|
|
|
+ <DataTable :data="tableData" :columns="tableColumns" row-key="id" :loading="isLoading" :pagination="paginationProps"
|
|
|
+ @sorterChange="handleSorterChange" @select="handleSelect" @selectAll="handleSelectAll" @expand="handleExpand"
|
|
|
+ @pageChange="handlePageChange" @sizeChange="handleSizeChange">
|
|
|
+ </DataTable>
|
|
|
</ContentContainer>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import ContentContainer from '../layout/ContentContainer.vue';
|
|
|
import BreadCrumbMenu from '../common/BreadCrumbMenu.vue';
|
|
|
+import DataTable from '@/components/DataTable/index.vue';
|
|
|
+
|
|
|
+// 示例数据
|
|
|
+const tableData = ref([
|
|
|
+ { id: 1, name: '李雷', age: 25 },
|
|
|
+ { id: 2, name: '韩梅梅', age: 30 },
|
|
|
+]);
|
|
|
+
|
|
|
+const tableColumns = ref([
|
|
|
+ { title: '姓名', dataIndex: 'name', slotName: 'nameSlot' },
|
|
|
+ { title: '年龄', dataIndex: 'age', slotName: 'ageSlot' },
|
|
|
+]);
|
|
|
+
|
|
|
+const isLoading = ref(false);
|
|
|
+const paginationProps = ref({
|
|
|
+ current: 1,
|
|
|
+ total: 100,
|
|
|
+ pageSize: 10,
|
|
|
+});
|
|
|
+
|
|
|
+// 事件处理函数
|
|
|
+const handleSorterChange = (sorter) => {
|
|
|
+ console.log('排序变化:', sorter);
|
|
|
+};
|
|
|
+
|
|
|
+const handleSelect = (selected, record) => {
|
|
|
+ console.log('选择:', selected, record);
|
|
|
+};
|
|
|
+
|
|
|
+const handleSelectAll = (selected, records) => {
|
|
|
+ console.log('选择所有:', selected, records);
|
|
|
+};
|
|
|
+
|
|
|
+const handleExpand = (expanded, record) => {
|
|
|
+ console.log('展开:', expanded, record);
|
|
|
+};
|
|
|
+
|
|
|
+const handlePageChange = (page) => {
|
|
|
+ console.log('当前页面:', page);
|
|
|
+};
|
|
|
+
|
|
|
+const handleSizeChange = (current, size) => {
|
|
|
+ console.log('当前页面和页面大小:', current, size);
|
|
|
+};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="css" scoped></style>
|