From 4309aff05caa2d11bfe8ee765e1dfd8580ee8666 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期四, 17 七月 2025 14:39:43 +0800
Subject: [PATCH] Merge branch 'master' of http://dh.leon056.com:7499/r/data2/Single_application into ID1825-床旁副屏改版
---
src/views/mobile/bedsideAuxiliaryScreen/components/Card.vue | 69 ++++++++++++++++++++++++++++++++--
1 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/components/Card.vue b/src/views/mobile/bedsideAuxiliaryScreen/components/Card.vue
index e661e2f..70405ee 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/components/Card.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/components/Card.vue
@@ -1,17 +1,78 @@
<template>
- <div class="bedside-auxiliary-screen-card"></div>
+ <div
+ class="bedside-auxiliary-screen-card"
+ :style="{
+ '--bg-color': props.backgroundColor,
+ '--height': props.height + 'px',
+ }"
+ >
+ <div class="card-header">
+ <img :src="props.icon" class="card-icon" alt="" srcset="" />
+ <span class="card-title">{{ props.title }}</span>
+ </div>
+ <div class="card-main">
+ <slot />
+ </div>
+ </div>
</template>
<script lang="ts" setup name="Card">
interface Props {
- backgrondColor: string; // 背景颜色
- title: string; // 标题
-
+ backgroundColor: string; // 背景颜色
+ title: string; // 标题
+ icon: string;
+ height?: number;
}
+const props = defineProps<Props>();
</script>
<style lang="less" scoped>
+* {
+ box-sizing: border-box;
+}
.bedside-auxiliary-screen-card {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ padding: 3px 4px;
+ border-radius: 2px;
+ background-color: var(--bg-color, #70a3dd);
+ .card-header {
+ flex: 0 0 6px;
+ display: flex;
+ align-items: center;
+ margin-bottom: 2px;
+
+ .card-icon {
+ width: 6px;
+ height: 6px;
+ margin-right: 2px;
+ }
+
+ .card-title {
+ flex: 1;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 500;
+ font-size: 4px;
+ color: #333333;
+ text-align: left;
+ font-style: normal;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+
+ .card-main {
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ min-height: 0;
+ }
+ .card-main > * {
+ min-height: 0;
+ overflow: hidden;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0