不等比缩放
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user