feat: 添加虚拟表格示例 (#1007)

* feat: 添加虚拟表格示例
This commit is contained in:
xiaoming
2024-03-20 15:00:47 +08:00
committed by GitHub
parent f0a80c680e
commit 2367eedc5d
78 changed files with 16678 additions and 14 deletions

View File

@@ -0,0 +1,28 @@
<script setup lang="ts">
import { ref } from "vue";
import { useColumns } from "./columns";
const printRef = ref();
const { columns, dataList, print, cellStyle, rowStyle, headerCellStyle } =
useColumns(printRef);
</script>
<template>
<div>
<el-button type="primary" class="mb-[20px] float-right" @click="print">
打印
</el-button>
<!-- rowHoverBgColor="transparent" 鼠标经过行时去掉行的背景色 -->
<pure-table
ref="printRef"
rowHoverBgColor="transparent"
row-key="id"
border
:data="dataList"
:columns="columns"
:row-style="rowStyle"
:cell-style="cellStyle"
:header-cell-style="headerCellStyle"
/>
</div>
</template>