chore: update

This commit is contained in:
xiaoxian521 2022-11-24 11:48:52 +08:00
parent 7d40e36574
commit d7364d59a9
6 changed files with 23 additions and 20 deletions

View File

@ -35,7 +35,7 @@
"@logicflow/extension": "^1.1.30",
"@pureadmin/components": "^1.1.0",
"@pureadmin/descriptions": "^1.1.0",
"@pureadmin/table": "^1.7.0",
"@pureadmin/table": "^1.8.0",
"@pureadmin/utils": "^1.6.7",
"@vueuse/core": "^9.5.0",
"@vueuse/motion": "2.0.0-beta.12",

8
pnpm-lock.yaml generated
View File

@ -21,7 +21,7 @@ specifiers:
"@logicflow/extension": ^1.1.30
"@pureadmin/components": ^1.1.0
"@pureadmin/descriptions": ^1.1.0
"@pureadmin/table": ^1.7.0
"@pureadmin/table": ^1.8.0
"@pureadmin/theme": ^2.4.0
"@pureadmin/utils": ^1.6.7
"@types/element-resize-detector": 1.1.3
@ -134,7 +134,7 @@ dependencies:
"@logicflow/extension": 1.1.31
"@pureadmin/components": 1.1.0_vue@3.2.45
"@pureadmin/descriptions": 1.1.1_element-plus@2.2.22
"@pureadmin/table": 1.7.0_element-plus@2.2.22
"@pureadmin/table": 1.8.0_element-plus@2.2.22
"@pureadmin/utils": 1.6.7_aotapuqn7htzdjltsyimavekky
"@vueuse/core": 9.5.0_vue@3.2.45
"@vueuse/motion": 2.0.0-beta.12_vue@3.2.45
@ -1393,10 +1393,10 @@ packages:
vue: 3.2.45
dev: false
/@pureadmin/table/1.7.0_element-plus@2.2.22:
/@pureadmin/table/1.8.0_element-plus@2.2.22:
resolution:
{
integrity: sha512-6SWHJFiMf0V3L+Y5/1MZMClZo8QrOvkpLjkqeaZFO5N80Th17Nv1I4Feve6HPPS4dFBf5J0oRPr8L6OjjdaASw==
integrity: sha512-hNXoU6HzAxUg/4KpG2rQbmr8EDdh+1XzP0Og0jqtgfj1uW5o5KWfx1101O/ReYVQ1EdnFsc44YLe0HZkyyMJDQ==
}
peerDependencies:
element-plus: ^2.0.0

View File

@ -43,7 +43,7 @@ export const list = [
{
key: "watermark",
content: rendContent("watermark"),
title: "水印",
title: "水印(无法删除的水印哦🤓️)",
component: Watermark
},
{

View File

@ -26,14 +26,23 @@ export function useColumns(printRef: Ref) {
];
const print = () => {
Print(printRef.value.getTableRef().$refs.tableWrapper).toPrint;
Print(printRef.value.getTableDoms().tableWrapper).toPrint;
};
function cellStyle({ column: { property }, rowIndex }) {
if (property === "id") {
return rowIndex < 3
? { background: "#87baf9" }
: { background: "#87e8de" };
}
}
function headerCellStyle({ columnIndex }) {
return columnIndex === 0
? { background: "#f3b2d0" }
: { background: "#fafafa" };
}
function rowStyle({ rowIndex }) {
return rowIndex % 2 === 1
? { background: "#ffa39e" }
@ -44,7 +53,8 @@ export function useColumns(printRef: Ref) {
columns,
dataList,
print,
headerCellStyle,
rowStyle
rowStyle,
cellStyle,
headerCellStyle
};
}

View File

@ -3,7 +3,7 @@ import { ref } from "vue";
import { useColumns } from "./columns";
const printRef = ref();
const { columns, dataList, print, rowStyle, headerCellStyle } =
const { columns, dataList, print, cellStyle, rowStyle, headerCellStyle } =
useColumns(printRef);
</script>
@ -13,22 +13,15 @@ const { columns, dataList, print, rowStyle, headerCellStyle } =
打印
</el-button>
<pure-table
rowHoverBgColor="transparent"
ref="printRef"
row-key="id"
border
:data="dataList"
:columns="columns"
:row-style="rowStyle"
:cell-style="cellStyle"
:header-cell-style="headerCellStyle"
/>
</div>
</template>
<style lang="scss" scoped>
//
:deep(.el-table) {
tbody tr:hover > td {
background-color: transparent !important;
}
}
</style>

View File

@ -27,7 +27,7 @@ export function useColumns(waterRef: Ref) {
onMounted(() => {
delay().then(() => {
const { setWatermark } = useWatermark(
waterRef.value.getTableRef().$refs.tableWrapper
waterRef.value.getTableDoms().tableWrapper
);
setWatermark("编程即艺术", {
font: "16px Microsoft YaHei",