mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
chore: update
This commit is contained in:
parent
7d40e36574
commit
d7364d59a9
@ -35,7 +35,7 @@
|
|||||||
"@logicflow/extension": "^1.1.30",
|
"@logicflow/extension": "^1.1.30",
|
||||||
"@pureadmin/components": "^1.1.0",
|
"@pureadmin/components": "^1.1.0",
|
||||||
"@pureadmin/descriptions": "^1.1.0",
|
"@pureadmin/descriptions": "^1.1.0",
|
||||||
"@pureadmin/table": "^1.7.0",
|
"@pureadmin/table": "^1.8.0",
|
||||||
"@pureadmin/utils": "^1.6.7",
|
"@pureadmin/utils": "^1.6.7",
|
||||||
"@vueuse/core": "^9.5.0",
|
"@vueuse/core": "^9.5.0",
|
||||||
"@vueuse/motion": "2.0.0-beta.12",
|
"@vueuse/motion": "2.0.0-beta.12",
|
||||||
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@ -21,7 +21,7 @@ specifiers:
|
|||||||
"@logicflow/extension": ^1.1.30
|
"@logicflow/extension": ^1.1.30
|
||||||
"@pureadmin/components": ^1.1.0
|
"@pureadmin/components": ^1.1.0
|
||||||
"@pureadmin/descriptions": ^1.1.0
|
"@pureadmin/descriptions": ^1.1.0
|
||||||
"@pureadmin/table": ^1.7.0
|
"@pureadmin/table": ^1.8.0
|
||||||
"@pureadmin/theme": ^2.4.0
|
"@pureadmin/theme": ^2.4.0
|
||||||
"@pureadmin/utils": ^1.6.7
|
"@pureadmin/utils": ^1.6.7
|
||||||
"@types/element-resize-detector": 1.1.3
|
"@types/element-resize-detector": 1.1.3
|
||||||
@ -134,7 +134,7 @@ dependencies:
|
|||||||
"@logicflow/extension": 1.1.31
|
"@logicflow/extension": 1.1.31
|
||||||
"@pureadmin/components": 1.1.0_vue@3.2.45
|
"@pureadmin/components": 1.1.0_vue@3.2.45
|
||||||
"@pureadmin/descriptions": 1.1.1_element-plus@2.2.22
|
"@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
|
"@pureadmin/utils": 1.6.7_aotapuqn7htzdjltsyimavekky
|
||||||
"@vueuse/core": 9.5.0_vue@3.2.45
|
"@vueuse/core": 9.5.0_vue@3.2.45
|
||||||
"@vueuse/motion": 2.0.0-beta.12_vue@3.2.45
|
"@vueuse/motion": 2.0.0-beta.12_vue@3.2.45
|
||||||
@ -1393,10 +1393,10 @@ packages:
|
|||||||
vue: 3.2.45
|
vue: 3.2.45
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@pureadmin/table/1.7.0_element-plus@2.2.22:
|
/@pureadmin/table/1.8.0_element-plus@2.2.22:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-6SWHJFiMf0V3L+Y5/1MZMClZo8QrOvkpLjkqeaZFO5N80Th17Nv1I4Feve6HPPS4dFBf5J0oRPr8L6OjjdaASw==
|
integrity: sha512-hNXoU6HzAxUg/4KpG2rQbmr8EDdh+1XzP0Og0jqtgfj1uW5o5KWfx1101O/ReYVQ1EdnFsc44YLe0HZkyyMJDQ==
|
||||||
}
|
}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
element-plus: ^2.0.0
|
element-plus: ^2.0.0
|
||||||
|
@ -43,7 +43,7 @@ export const list = [
|
|||||||
{
|
{
|
||||||
key: "watermark",
|
key: "watermark",
|
||||||
content: rendContent("watermark"),
|
content: rendContent("watermark"),
|
||||||
title: "水印",
|
title: "水印(无法删除的水印哦🤓️)",
|
||||||
component: Watermark
|
component: Watermark
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -26,14 +26,23 @@ export function useColumns(printRef: Ref) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const print = () => {
|
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 }) {
|
function headerCellStyle({ columnIndex }) {
|
||||||
return columnIndex === 0
|
return columnIndex === 0
|
||||||
? { background: "#f3b2d0" }
|
? { background: "#f3b2d0" }
|
||||||
: { background: "#fafafa" };
|
: { background: "#fafafa" };
|
||||||
}
|
}
|
||||||
|
|
||||||
function rowStyle({ rowIndex }) {
|
function rowStyle({ rowIndex }) {
|
||||||
return rowIndex % 2 === 1
|
return rowIndex % 2 === 1
|
||||||
? { background: "#ffa39e" }
|
? { background: "#ffa39e" }
|
||||||
@ -44,7 +53,8 @@ export function useColumns(printRef: Ref) {
|
|||||||
columns,
|
columns,
|
||||||
dataList,
|
dataList,
|
||||||
print,
|
print,
|
||||||
headerCellStyle,
|
rowStyle,
|
||||||
rowStyle
|
cellStyle,
|
||||||
|
headerCellStyle
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from "vue";
|
|||||||
import { useColumns } from "./columns";
|
import { useColumns } from "./columns";
|
||||||
|
|
||||||
const printRef = ref();
|
const printRef = ref();
|
||||||
const { columns, dataList, print, rowStyle, headerCellStyle } =
|
const { columns, dataList, print, cellStyle, rowStyle, headerCellStyle } =
|
||||||
useColumns(printRef);
|
useColumns(printRef);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -13,22 +13,15 @@ const { columns, dataList, print, rowStyle, headerCellStyle } =
|
|||||||
打印
|
打印
|
||||||
</el-button>
|
</el-button>
|
||||||
<pure-table
|
<pure-table
|
||||||
|
rowHoverBgColor="transparent"
|
||||||
ref="printRef"
|
ref="printRef"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
border
|
border
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:row-style="rowStyle"
|
:row-style="rowStyle"
|
||||||
|
:cell-style="cellStyle"
|
||||||
:header-cell-style="headerCellStyle"
|
:header-cell-style="headerCellStyle"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
// 去掉鼠标悬停行背景色
|
|
||||||
:deep(.el-table) {
|
|
||||||
tbody tr:hover > td {
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -27,7 +27,7 @@ export function useColumns(waterRef: Ref) {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
delay().then(() => {
|
delay().then(() => {
|
||||||
const { setWatermark } = useWatermark(
|
const { setWatermark } = useWatermark(
|
||||||
waterRef.value.getTableRef().$refs.tableWrapper
|
waterRef.value.getTableDoms().tableWrapper
|
||||||
);
|
);
|
||||||
setWatermark("编程即艺术", {
|
setWatermark("编程即艺术", {
|
||||||
font: "16px Microsoft YaHei",
|
font: "16px Microsoft YaHei",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user