单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-07-23 3519b38f8230634a319d9e97a38092fbb8e402f4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<template>
  <div
    class="bedside-auxiliary-screen-card"
    :style="{
      '--bg-color': props.backgroundColor,
    }"
  >
    <div class="card-header" :class="props.headerClassName">
      <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 {
  backgroundColor: string; // 背景颜色
  title: string; // 标题
  icon: string;
  height?: number;
  headerClassName?: string; // 头部类名
}
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);
  overflow: hidden;
  overflow-y: auto;
  height: 100%;
 
  .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;
  }
}
:deep(.el-scrollbar__view) {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
}
</style>