nubomed-ui 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. package/.env.bi +13 -0
  2. package/.env.terminal +13 -0
  3. package/.vscode/extensions.json +3 -0
  4. package/README.md +17 -0
  5. package/index.html +13 -0
  6. package/nubomed-ui/nubomed-ui.es.js +2005 -0
  7. package/nubomed-ui/nubomed-ui.umd.js +1 -0
  8. package/nubomed-ui/style.css +1 -0
  9. package/package.json +19 -7
  10. package/src/App.vue +31 -0
  11. package/src/bi-demos/Header.vue +29 -0
  12. package/src/bi-demos/Table.vue +69 -0
  13. package/src/bi-demos/index.vue +132 -0
  14. package/src/bi-packages/components/Box/images/corner-error.png +0 -0
  15. package/src/bi-packages/components/Box/images/corner-warning.png +0 -0
  16. package/src/bi-packages/components/Box/images/corner.png +0 -0
  17. package/src/bi-packages/components/Box/index.scss +86 -0
  18. package/src/bi-packages/components/Box/index.vue +53 -0
  19. package/src/bi-packages/components/Carousel/CarouselItem.vue +0 -0
  20. package/src/bi-packages/components/Carousel/index.vue +0 -0
  21. package/src/bi-packages/components/Header/images/left-bg.png +0 -0
  22. package/src/bi-packages/components/Header/images/logo.png +0 -0
  23. package/src/bi-packages/components/Header/images/right-bg.png +0 -0
  24. package/src/bi-packages/components/Header/index.scss +50 -0
  25. package/src/bi-packages/components/Header/index.vue +54 -0
  26. package/src/bi-packages/components/Table/TableColgroup.vue +43 -0
  27. package/src/bi-packages/components/Table/index copy.vue +107 -0
  28. package/src/bi-packages/components/Table/index.scss +118 -0
  29. package/src/bi-packages/components/Table/index.vue +108 -0
  30. package/src/bi-packages/components/TableColumn/index.scss +7 -0
  31. package/src/bi-packages/components/TableColumn/index.vue +60 -0
  32. package/src/bi-packages/fonts/OPPOSans-B.ttf +0 -0
  33. package/src/bi-packages/fonts/OPPOSans-M.ttf +0 -0
  34. package/src/bi-packages/fonts/font.scss +11 -0
  35. package/src/bi-packages/iconfont-svg/demo.css +539 -0
  36. package/src/bi-packages/iconfont-svg/demo_index.html +4811 -0
  37. package/src/bi-packages/iconfont-svg/iconfont.css +819 -0
  38. package/src/bi-packages/iconfont-svg/iconfont.js +1 -0
  39. package/src/bi-packages/iconfont-svg/iconfont.json +1416 -0
  40. package/src/bi-packages/iconfont-svg/iconfont.ttf +0 -0
  41. package/src/bi-packages/iconfont-svg/iconfont.woff +0 -0
  42. package/src/bi-packages/iconfont-svg/iconfont.woff2 +0 -0
  43. package/src/bi-packages/index.js +34 -0
  44. package/src/bi-packages/styles/mixin.scss +12 -0
  45. package/src/bi-packages/styles/var.scss +11 -0
  46. package/src/demos/ActionBar.vue +59 -0
  47. package/src/demos/Badge.vue +28 -0
  48. package/src/demos/Button copy.vue +302 -0
  49. package/src/demos/Button.vue +116 -0
  50. package/src/demos/ButtonGroup.vue +40 -0
  51. package/src/demos/Check.vue +29 -0
  52. package/src/demos/Dialog.vue +255 -0
  53. package/src/demos/Empty.vue +38 -0
  54. package/src/demos/FooterMenu.vue +49 -0
  55. package/src/demos/Header.vue +71 -0
  56. package/src/demos/Icons.vue +314 -0
  57. package/src/demos/Input.vue +87 -0
  58. package/src/demos/InputKeyboard.vue +30 -0
  59. package/src/demos/InputNumber.vue +34 -0
  60. package/src/demos/LeftMenu.vue +128 -0
  61. package/src/demos/Menus.vue +106 -0
  62. package/src/demos/OpenCabinetBall.vue +37 -0
  63. package/src/demos/Statusbar.vue +146 -0
  64. package/src/demos/Steps.vue +45 -0
  65. package/src/demos/Tost.vue +35 -0
  66. package/src/demos/button/button.md +19 -0
  67. package/src/demos/data/terList.json +145 -0
  68. package/src/demos/images/cabinets/H3000-D.png +0 -0
  69. package/src/demos/images/cabinets/H3000-R.png +0 -0
  70. package/src/demos/images/cabinets/H3000-Rh.png +0 -0
  71. package/src/demos/images/cabinets/H3000-Rh2.png +0 -0
  72. package/src/demos/images/cabinets/H3010-R.png +0 -0
  73. package/src/demos/index.vue +348 -0
  74. package/src/docs/icons/Icon.vue +72 -0
  75. package/src/docs/icons/icon.md +21 -0
  76. package/src/docs/index.html +15 -0
  77. package/src/docs/index.vue +301 -0
  78. package/src/main.js +23 -0
  79. package/src/packages/components/ActionBar/images/error.png +0 -0
  80. package/src/packages/components/ActionBar/images/loading.gif +0 -0
  81. package/src/packages/components/ActionBar/images/success.png +0 -0
  82. package/src/packages/components/ActionBar/images/warning.png +0 -0
  83. package/src/packages/components/ActionBar/images/warning_yellow.png +0 -0
  84. package/src/packages/components/ActionBar/index.scss +81 -0
  85. package/src/packages/components/ActionBar/index.vue +100 -0
  86. package/src/packages/components/Badge/index.scss +50 -0
  87. package/src/packages/components/Badge/index.vue +75 -0
  88. package/src/packages/components/Button/index.scss +241 -0
  89. package/src/packages/components/Button/index.vue +111 -0
  90. package/src/packages/components/ButtonGroup/index.scss +54 -0
  91. package/src/packages/components/ButtonGroup/index.vue +75 -0
  92. package/src/packages/components/Check/Cate.vue +138 -0
  93. package/src/packages/components/Check/index.scss +47 -0
  94. package/src/packages/components/Check/index.vue +105 -0
  95. package/src/packages/components/Dialog/images/error.png +0 -0
  96. package/src/packages/components/Dialog/images/success.png +0 -0
  97. package/src/packages/components/Dialog/images/warning-red.png +0 -0
  98. package/src/packages/components/Dialog/images/warning-yellow.png +0 -0
  99. package/src/packages/components/Dialog/index.scss +154 -0
  100. package/src/packages/components/Dialog/index.vue +305 -0
  101. package/src/packages/components/Empty/images/empty-abnormal.png +0 -0
  102. package/src/packages/components/Empty/images/empty-data.png +0 -0
  103. package/src/packages/components/Empty/images/empty-search.png +0 -0
  104. package/src/packages/components/Empty/index.vue +68 -0
  105. package/src/packages/components/Form/FormItem.vue +73 -0
  106. package/src/packages/components/Form/index.vue +76 -0
  107. package/src/packages/components/Icon/index.vue +30 -0
  108. package/src/packages/components/Input/index.scss +184 -0
  109. package/src/packages/components/Input/index.vue +189 -0
  110. package/src/packages/components/InputKeyboard/index.scss +63 -0
  111. package/src/packages/components/InputKeyboard/index.vue +117 -0
  112. package/src/packages/components/InputNumber/index.scss +103 -0
  113. package/src/packages/components/InputNumber/index.vue +160 -0
  114. package/src/packages/components/Menu/index.scss +559 -0
  115. package/src/packages/components/Menu/index.vue +211 -0
  116. package/src/packages/components/OpenCabinetBall/CabinetStatus.vue +94 -0
  117. package/src/packages/components/OpenCabinetBall/index.scss +204 -0
  118. package/src/packages/components/OpenCabinetBall/index.vue +113 -0
  119. package/src/packages/components/Statusbar/CabinetList.vue +125 -0
  120. package/src/packages/components/Statusbar/CabinetListStatus.vue +75 -0
  121. package/src/packages/components/Statusbar/CabinetListTempHum.vue +108 -0
  122. package/src/packages/components/Statusbar/index.scss +205 -0
  123. package/src/packages/components/Statusbar/index.vue +83 -0
  124. package/src/packages/components/Steps/index.scss +104 -0
  125. package/src/packages/components/Steps/index.vue +66 -0
  126. package/src/packages/components/SvgIcon/index.vue +41 -0
  127. package/src/packages/components/Toast/index.vue +72 -0
  128. package/src/packages/fonts/OPPOSans-B.ttf +0 -0
  129. package/src/packages/fonts/OPPOSans-M.ttf +0 -0
  130. package/src/packages/fonts/font.scss +11 -0
  131. package/src/packages/iconfont-svg/demo.css +539 -0
  132. package/src/packages/iconfont-svg/demo_index.html +4811 -0
  133. package/src/packages/iconfont-svg/iconfont.css +819 -0
  134. package/src/packages/iconfont-svg/iconfont.js +1 -0
  135. package/src/packages/iconfont-svg/iconfont.json +1416 -0
  136. package/src/packages/iconfont-svg/iconfont.ttf +0 -0
  137. package/src/packages/iconfont-svg/iconfont.woff +0 -0
  138. package/src/packages/iconfont-svg/iconfont.woff2 +0 -0
  139. package/src/packages/index.js +64 -0
  140. package/src/packages/styles/var.scss +24 -0
  141. package/src/utils/create.js +48 -0
  142. package/src/utils/index.js +13 -0
  143. package/src/utils/validate.js +3 -0
  144. package/vite.config.js +47 -0
  145. package/nubomed-ui.es.js +0 -152
  146. package/nubomed-ui.umd.js +0 -1
  147. package/style.css +0 -1
package/package.json CHANGED
@@ -1,12 +1,24 @@
1
1
  {
2
2
  "name": "nubomed-ui",
3
- "version": "1.0.1",
4
- "description": "基于Element-Plus的组件库",
5
- "main": "nubomed-ui.es.js",
3
+ "private": false,
4
+ "version": "1.0.3",
5
+ "description": "NuboMed-UI",
6
+ "type": "module",
6
7
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "dev": "vite",
9
+ "build": "vite build",
10
+ "preview": "vite preview",
11
+ "dev:ter": "vite --mode terminal",
12
+ "build:ter": "set NODE_ENV=production&& vite build --mode terminal",
13
+ "dev:bi": "vite --mode bi",
14
+ "build:bi": "set NODE_ENV=production&& vite build --mode bi"
8
15
  },
9
- "keywords": [],
10
- "author": "",
11
- "license": "ISC"
16
+ "dependencies": {
17
+ "sass": "^1.63.6",
18
+ "vue": "^3.2.47"
19
+ },
20
+ "devDependencies": {
21
+ "@vitejs/plugin-vue": "^4.1.0",
22
+ "vite": "^4.3.9"
23
+ }
12
24
  }
package/src/App.vue ADDED
@@ -0,0 +1,31 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-27 16:24:35
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-09-12 20:38:26
6
+ * @Description:
7
+ -->
8
+ <script setup>
9
+ import demos from './docs/index.vue'
10
+ // import demos from './bi-demos/index.vue'
11
+ </script>
12
+
13
+ <template>
14
+ <demos />
15
+ </template>
16
+
17
+ <style lang="scss">
18
+ body,
19
+ html {
20
+ margin: 0;
21
+ padding: 0;
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+ ul, li{padding: 0;margin: 0;list-style: none;}
26
+ p{margin: 0;}
27
+ #app {
28
+ width: 100%;
29
+ height: 100%;
30
+ }
31
+ </style>
@@ -0,0 +1,29 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-08-07 09:17:27
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-09 11:27:34
6
+ * @Description:
7
+ -->
8
+ <template>
9
+ <div class="demo-box">
10
+ <div class="demo-box-title">
11
+ <span class="demo-box-title-name">标题栏</span>
12
+ <span class="demo-box-title-desc">高度105px</span>
13
+ </div>
14
+ <div class="demo-box-content">
15
+ <nb-header title="智能耗材屋运营分析" :date="['2020-03-04', '星期三', '17:52:03']"></nb-header>
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script setup>
21
+ </script>
22
+
23
+ <style lang="scss" scoped>
24
+ .demo-box-content {
25
+ background-color: #091a32;
26
+ padding: 0;
27
+ .nb-header{margin-bottom: 30px;}
28
+ }
29
+ </style>
@@ -0,0 +1,69 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-08-07 09:17:27
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-14 15:55:09
6
+ * @Description:
7
+ -->
8
+ <template>
9
+ <div class="demo-box">
10
+ <div class="demo-box-title">
11
+ <span class="demo-box-title-name">表格</span>
12
+ <span class="demo-box-title-desc"></span>
13
+ </div>
14
+ <div class="demo-box-content">
15
+ <div class="table">
16
+ <nb-box title="报警/退损统计">
17
+ <nb-table :data="data">
18
+ <nb-table-column label="耗材名称" prop="name" min-width="300" />
19
+ <nb-table-column label="唯一码" prop="barcode" min-width="200" />
20
+ <nb-table-column label="品规" min-width="100">
21
+ <template>
22
+ <strong>表格列插槽</strong>
23
+ </template>
24
+ </nb-table-column>
25
+ </nb-table>
26
+ </nb-box>
27
+ </div>
28
+ <div class="table">
29
+ <nb-box title="报警/退损统计"></nb-box>
30
+ </div>
31
+ <div class="table">
32
+ <nb-box type="error" title="当日业务分析"></nb-box>
33
+ </div>
34
+ <div class="table">
35
+ <nb-box type="warning">
36
+ <template #title>近效期概况近效期概况</template>
37
+ </nb-box>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script setup>
44
+ import { ref } from 'vue'
45
+ const data = ref([])
46
+ data.value.push({
47
+ name: '正压静脉留置针正压静脉留置针',
48
+ barcode: '正压静脉留置针正压静脉留置针'
49
+ })
50
+
51
+ for (let i = 0; i < 0; i++) {
52
+ data.value.push({
53
+ name: i + '正压静脉留置针正压静脉留置针',
54
+ barcode: '232343423423'
55
+ })
56
+ }
57
+ </script>
58
+
59
+ <style lang="scss" scoped>
60
+ .demo-box-content {
61
+ background-color: #091a32;
62
+ padding: 30px;
63
+ }
64
+ .table {
65
+ width: 1200px;
66
+ height: 640px;
67
+ margin-bottom: 30px;
68
+ }
69
+ </style>
@@ -0,0 +1,132 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-27 19:08:22
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-12 14:33:36
6
+ * @Description:
7
+ -->
8
+ <template>
9
+ <div class="demo">
10
+ <div class="demo-nav">
11
+ <div v-for="item in navList" :key="item.text">
12
+ <strong>{{ item.text }}</strong>
13
+ <span
14
+ v-for="item2 in item.children"
15
+ :key="item2.id"
16
+ @click="handleRef(item2.id)"
17
+ >{{ item2.text }}</span
18
+ >
19
+ </div>
20
+ </div>
21
+
22
+ <div class="demo-content">
23
+ <Table id="Table" />
24
+ <Header id="Header" />
25
+ </div>
26
+ </div>
27
+ </template>
28
+
29
+ <script setup>
30
+ import { ref, nextTick } from "vue";
31
+ import Header from "./Header.vue";
32
+ import Table from "./Table.vue";
33
+
34
+ const navList = ref([]);
35
+ navList.value.push({
36
+ text: "基础组件",
37
+ children: [
38
+ { text: "标题栏", id: "Header" },
39
+ { text: "盒子", id: "Table" },
40
+ { text: "轮播", id: "Table" },
41
+ ],
42
+ });
43
+ navList.value.push({
44
+ text: "数据展示",
45
+ children: [
46
+ { text: "表格", id: "Table" },
47
+ { text: "折线图", id: "Empty" },
48
+ { text: "双折线图", id: "Empty" },
49
+ { text: "单个柱状图", id: "Steps" },
50
+ { text: "单个横向柱状图", id: "" },
51
+ { text: "双向柱状图", id: "" },
52
+ { text: "饼图", id: "" }
53
+ ],
54
+ });
55
+ navList.value.push({
56
+ text: "反馈组件",
57
+ children: [
58
+ { text: "Dialog 对话框", id: "Dialog" },
59
+ { text: "Loading 加载", id: "" },
60
+ { text: "Tost 提示", id: "Tost" },
61
+ { text: "Message 消息弹框", id: "" },
62
+ ],
63
+ });
64
+
65
+ const handleRef = (id) => {
66
+ nextTick(() => {
67
+ const returnEle = document.querySelector("#" + id); // 将要跳转区域的id
68
+ if (returnEle) {
69
+ returnEle.scrollIntoView({
70
+ behavior: "smooth",
71
+ block: "start",
72
+ inline: "nearest",
73
+ }); // true 是默认的
74
+ }
75
+ });
76
+ };
77
+ </script>
78
+
79
+ <style lang="scss">
80
+ .demo {
81
+ width: 100%;
82
+ height: 100%;
83
+ background-color: #f3f7fd;
84
+ overflow: hidden;
85
+ display: flex;
86
+ flex-direction: column;
87
+ }
88
+ .demo-nav {
89
+ padding: 10px 30px;
90
+ background-color: #ffffff;
91
+ z-index: 1;
92
+ box-shadow: 0px -1px 6px 0px rgba(0, 0, 0, 0.15);
93
+ div {
94
+ display: inline-block;
95
+ margin-right: 20px;
96
+ }
97
+ strong {
98
+ font-size: 24px;
99
+ }
100
+ span {
101
+ margin-left: 10px;
102
+ font-size: 20px;
103
+ cursor: pointer;
104
+ }
105
+ }
106
+ .demo-content {
107
+ flex: 1;
108
+ overflow: hidden;
109
+ }
110
+ .demo-box {
111
+ padding: 40px;
112
+ background-color: #ffffff;
113
+ margin: 30px;
114
+ }
115
+ .demo-box-title {
116
+ border-bottom: 1px solid #cad0e0;
117
+ padding-bottom: 20px;
118
+ margin-bottom: 20px;
119
+ .demo-box-title-name {
120
+ height: 76px;
121
+ font-size: 50px;
122
+ line-height: 76px;
123
+ }
124
+ .demo-box-title-desc {
125
+ height: 32px;
126
+ font-size: 24px;
127
+ color: #f98900;
128
+ line-height: 32px;
129
+ margin-left: 20px;
130
+ }
131
+ }
132
+ </style>
@@ -0,0 +1,86 @@
1
+ @import "../../styles/mixin.scss";
2
+
3
+ :root {
4
+ --nb-box-color: #3abdff;
5
+ --nb-box-bg-color: rgba(58, 189, 255, 0.02);
6
+ --nb-box-border-color: rgba(58, 189, 255, 0.22);
7
+
8
+ // error
9
+ --nb-box-error-color: #f35e61;
10
+ --nb-box-error-bg-color: rgba(243, 94, 97, 0.04);
11
+ --nb-box-error-border-color: rgba(243, 94, 97, 0.32);
12
+ // warning
13
+ --nb-box-warning-color: #f4b263;
14
+ --nb-box-warning-bg-color: rgba(244, 178, 99, 0.04);
15
+ --nb-box-warning-border-color: rgba(244, 178, 99, 0.32);
16
+ }
17
+
18
+ .nb-box {
19
+ width: 100%;
20
+ height: 100%;
21
+ position: relative;
22
+ box-sizing: border-box;
23
+ background: var(--nb-box-bg-color);
24
+ border: 1px solid var(--nb-box-border-color);
25
+ display: flex;
26
+ flex-direction: column;
27
+ overflow: hidden;
28
+
29
+ &__title {
30
+ font-size: 28px;
31
+ line-height: 1;
32
+ padding: 30px;
33
+ display: flex;
34
+ align-items: center;
35
+ color: var(--nb-box-color);
36
+
37
+ .svg-icon,
38
+ img {
39
+ width: 28px;
40
+ height: 28px;
41
+ margin-right: 6px;
42
+ }
43
+ }
44
+
45
+ &__content {
46
+ flex: 1;
47
+ width: 100%;
48
+ overflow: hidden;
49
+ }
50
+
51
+ &--error {
52
+ background: var(--nb-box-error-bg-color);
53
+ border: 1px solid var(--nb-box-error-border-color);
54
+
55
+ .nb-box__title {
56
+ color: var(--nb-box-error-color);
57
+ }
58
+ }
59
+
60
+ &--warning {
61
+ background: var(--nb-box-warning-bg-color);
62
+ border: 1px solid var(--nb-box-warning-border-color);
63
+
64
+ .nb-box__title {
65
+ color: var(--nb-box-warning-color);
66
+ }
67
+ }
68
+
69
+ &--corner {
70
+ &::before {
71
+ @include cornerImg("./images/corner.png");
72
+ }
73
+
74
+ &.nb-box--error {
75
+ &::before {
76
+ @include cornerImg("./images/corner-error.png");
77
+ }
78
+ }
79
+
80
+ &.nb-box--warning {
81
+ &::before {
82
+ @include cornerImg("./images/corner-warning.png");
83
+ }
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,53 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-08-07 16:50:08
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-09 11:26:50
6
+ * @Description: 盒子
7
+ -->
8
+ <template>
9
+ <div :class="classes">
10
+ <!-- 标题 -->
11
+ <div v-if="title || $slots.title" class="nb-box__title">
12
+ <slot name="title">{{ title }}</slot>
13
+ </div>
14
+ <!-- 内容 -->
15
+ <div class="nb-box__content">
16
+ <slot></slot>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script setup>
22
+ import { createNamespace } from '../../../utils/create.js'
23
+ defineOptions({
24
+ name: 'NbBox'
25
+ })
26
+
27
+ const props = defineProps({
28
+ // 类型
29
+ type: {
30
+ type: [String],
31
+ default: ''
32
+ },
33
+ // 是否显示角
34
+ corner: {
35
+ type: Boolean,
36
+ default: true
37
+ },
38
+ // 标题
39
+ title: {
40
+ type: String,
41
+ default: ''
42
+ }
43
+ })
44
+
45
+ const [name, bem] = createNamespace('box')
46
+
47
+ // 样式
48
+ const classes = bem([props.type, { corner: props.corner }])
49
+ </script>
50
+
51
+ <style lang="scss">
52
+ @import './index.scss';
53
+ </style>
File without changes
@@ -0,0 +1,50 @@
1
+ :root {
2
+ --nb-header-height: 105px;
3
+ --nb-header-color: #3ABDFF;
4
+ }
5
+
6
+ .nb-header {
7
+ width: 100%;
8
+ height: var(--nb-header-height);
9
+ display: flex;
10
+ overflow: hidden;
11
+
12
+ &__logo {
13
+ width: 635px;
14
+ height: 100%;
15
+ background: url(./images/left-bg.png) no-repeat;
16
+ background-size: 100% 100%;
17
+
18
+ img {
19
+ width: 216px;
20
+ height: 34px;
21
+ margin: 28px 0 0 30px;
22
+ }
23
+ }
24
+
25
+ &__title {
26
+ flex: 1;
27
+ font-size: 40px;
28
+ font-family: var(--nb-font-bold-family);
29
+ color: var(--nb-header-color);
30
+ line-height: 1;
31
+ margin: 24px auto;
32
+ text-align: center;
33
+ }
34
+
35
+ &__right {
36
+ width: 635px;
37
+ height: 100%;
38
+ background: url(./images/right-bg.png) no-repeat;
39
+ background-size: 100% 100%;
40
+ padding-top: 30px;
41
+ text-align: right;
42
+
43
+ span {
44
+ margin-right: 30px;
45
+ font-size: 24px;
46
+ color: #FFFFFF;
47
+ line-height: 32px;
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,54 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-08-07 16:50:08
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-07 17:52:20
6
+ * @Description: 标题栏
7
+ -->
8
+ <template>
9
+ <div class="nb-header">
10
+ <div class="nb-header__logo">
11
+ <img v-if="logo" :src="logo" alt="" />
12
+ <img v-else src="./images/logo.png" alt="" />
13
+ </div>
14
+ <div v-if="title || $slots.title" class="nb-header__title">
15
+ <slot name="title">{{ title }}</slot>
16
+ </div>
17
+ <div class="nb-header__right">
18
+ <span v-for="(item, index) in date" :key="index">{{ item }}</span>
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <script setup>
24
+ import { createNamespace } from "../../../utils/create.js";
25
+ defineOptions({
26
+ name: "NbHeader",
27
+ });
28
+
29
+ const props = defineProps({
30
+ // 时间
31
+ date: {
32
+ type: [String],
33
+ default: () => {
34
+ return [];
35
+ },
36
+ },
37
+ // logo完整路径
38
+ logo: {
39
+ type: String,
40
+ default: "",
41
+ },
42
+ // 标题
43
+ title: {
44
+ type: String,
45
+ default: "",
46
+ },
47
+ });
48
+
49
+ const [name, bem] = createNamespace("header");
50
+ </script>
51
+
52
+ <style lang="scss">
53
+ @import "./index.scss";
54
+ </style>
@@ -0,0 +1,43 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-29 15:15:27
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-07 14:44:53
6
+ * @Description: colgroup
7
+ -->
8
+ <template>
9
+ <colgroup>
10
+ <col
11
+ v-for="(item, index) in columns"
12
+ :key="item.prop"
13
+ :name="columnName(index)"
14
+ :width="item['min-width']"
15
+ />
16
+ </colgroup>
17
+ </template>
18
+
19
+ <script setup>
20
+ defineOptions({
21
+ name: "NbTableColgroup",
22
+ });
23
+
24
+ const props = defineProps({
25
+ // 数据源
26
+ columns: {
27
+ type: Array,
28
+ default: () => {
29
+ return [];
30
+ },
31
+ },
32
+ // 表格索引
33
+ index: {
34
+ type: Number,
35
+ default: 0,
36
+ },
37
+ });
38
+
39
+ // 列的名称
40
+ const columnName = (index) => {
41
+ return `nb-table-${props.index}_column_${index}`;
42
+ };
43
+ </script>