bunny-admin-element-thin-i18n/other-views/table/high/prints/index.vue

29 lines
720 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>