不等比缩放

This commit is contained in:
X1627315083
2024-05-28 11:22:16 +08:00
parent 89b485048b
commit 6b4c52c645
7 changed files with 68 additions and 24 deletions

View File

@@ -9,6 +9,7 @@
:data-source="dataList"
:scroll="{ y: historyTableHeight}"
@change="changePage"
@resizeColumn="handleResizeColumn"
:pagination="{
showSizeChanger: true,
current: currentPage,
@@ -30,27 +31,28 @@
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https";
import type { TableColumnsType } from 'ant-design-vue';
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
export default defineComponent({
components: {
},
setup() {
let renameData: any = ref({}); //修改名字选中的数据
const columns: any = computed(() => {
return [
const columns: any = ref<TableColumnsType>([
{
title: 'Email',
align: "center",
ellipsis: true,
width: 30,
width: 50,
dataIndex: "email",
key: "email",
fixed: 'left',
},
{
title: 'User Id',
align: "center",
width: 30,
width: 50,
dataIndex: "id",
key: "id",
},
@@ -58,7 +60,8 @@ export default defineComponent({
title: 'User Name',
align: "center",
ellipsis: true,
width: 30,
width: 50,
dataIndex: "userName",
key: "userName",
},
@@ -66,14 +69,16 @@ export default defineComponent({
title: 'Given Name',
align: "center",
ellipsis: true,
width: 30,
width: 50,
dataIndex: "givenName",
key: "givenName",
},
{
title: 'Create Time',
align: "center",
width: 30,
width: 50,
dataIndex: "createTime",
key: "createTime",
},
@@ -81,7 +86,8 @@ export default defineComponent({
title: 'Title',
align: "center",
ellipsis: true,
width: 30,
width: 50,
//
dataIndex: "title",
key: "title",
},
@@ -89,14 +95,12 @@ export default defineComponent({
title: 'Country',
align: "center",
ellipsis: true,
width: 30,
dataIndex: "country",
key: "country",
fixed: 'right',
},
];
});
]
);
let dataList: any = ref([]);
let userInfo: any = {};
return {
@@ -104,6 +108,11 @@ export default defineComponent({
dataList,
renameData,
userInfo,
handleResizeColumn: (w:any, col:any) => {
console.log(col,w);
col.width = w;
},
};
},
data() {