|
@@ -28,7 +28,7 @@ import {
|
|
|
Coin, Box, Document, Avatar, Folder,
|
|
|
Monitor, ShoppingCart, User, Setting, Tools
|
|
|
} from '@element-plus/icons-vue'
|
|
|
-import { defineProps } from 'vue'
|
|
|
+import { defineProps,computed } from 'vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
summaryData: {
|
|
@@ -37,14 +37,14 @@ const props = defineProps({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const infoList = [
|
|
|
+const infoList = computed(()=>[
|
|
|
{ label: '设备总数', value: props.summaryData.total_devices, icon: Coin },
|
|
|
{ label: '在借数', value: props.summaryData.total_borrows, icon: Box },
|
|
|
{ label: '在库数', value: props.summaryData.total_warehouses, icon: Document },
|
|
|
{ label: '维修中', value: props.summaryData.total_maintenances, icon: Avatar },
|
|
|
{ label: '用户数', value: props.summaryData.total_students, icon: Folder },
|
|
|
{ label: '借用件次数', value: props.summaryData.total_applications, icon: Monitor },
|
|
|
-];
|
|
|
+]);
|
|
|
function handleClick(item: any) {
|
|
|
console.log('点击信息卡片:', item.label);
|
|
|
}
|