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
@@ -0,0 +1,107 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-29 15:15:27
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-07 14:27:49
6
+ * @Description: 检测动作栏
7
+ -->
8
+ <template>
9
+ <div class="nb-table">
10
+ <!-- 表头 -->
11
+ <div class="nb-table__header-wrapper">
12
+ <table cellpadding="0" cellspacing="0" border="0">
13
+ <colgroup>
14
+ <col name="nb-table-1_column_1" width="300" />
15
+ <col name="nb-table-1_column_2" width="200" />
16
+ <col name="nb-table-1_column_3" width="100" />
17
+ </colgroup>
18
+ <thead class="nb-table__thead">
19
+ <tr>
20
+ <th v-for="item in columns" :key="item.prop" class="nb-table-1_column_1">
21
+ {{ item.label }}
22
+ </th>
23
+ </tr>
24
+ </thead>
25
+ <thead class="nb-table__thead">
26
+ <tr>
27
+ <th class="nb-table-1_column_1">耗材名称</th>
28
+ <th class="nb-table-1_column_2">唯一码</th>
29
+ <th class="nb-table-1_column_3">规格/型号</th>
30
+ </tr>
31
+ </thead>
32
+ </table>
33
+ </div>
34
+ <!-- 表头体 -->
35
+ <div class="nb-table__body-wrapper">
36
+ <table cellpadding="0" cellspacing="0" border="0">
37
+ <colgroup>
38
+ <col name="nb-table-1_column_1" width="300" />
39
+ <col name="nb-table-1_column_2" width="200" />
40
+ <col name="nb-table-1_column_3" width="100" />
41
+ </colgroup>
42
+ <tbody class="nb-table__tbody">
43
+ <tr>
44
+ <td class="nb-table-1_column_1"><div>正压静脉留置针正压静脉留置针</div></td>
45
+ <td class="nb-table-1_column_2"><div>234343</div></td>
46
+ <td class="nb-table-1_column_3"><div>3</div></td>
47
+ </tr>
48
+ <tr>
49
+ <td class="nb-table-1_column_1"><div>正压静脉留置针正压静脉留置针正压静脉留置针正压静脉留置针正压静脉留置针正压静脉留置针</div></td>
50
+ <td class="nb-table-1_column_2"><div>234343</div></td>
51
+ <td class="nb-table-1_column_3"><div>3</div></td>
52
+ </tr>
53
+ <tr>
54
+ <td class="nb-table-1_column_1"><div>正压静脉留置针正压静脉留置针</div></td>
55
+ <td class="nb-table-1_column_2"><div>正压静脉留置针正压静脉留置针正压静脉留置针正压静脉留置针正压静脉留置针正压静脉留置针</div></td>
56
+ <td class="nb-table-1_column_3"><div>3</div></td>
57
+ </tr>
58
+ </tbody>
59
+ </table>
60
+ </div>
61
+ </div>
62
+ </template>
63
+
64
+ <script setup>
65
+ import { computed, useSlots } from 'vue'
66
+ import { createNamespace } from "../../../utils/create.js";
67
+
68
+ defineOptions({
69
+ name: "NbTable",
70
+ });
71
+
72
+ const props = defineProps({
73
+ // 数据源
74
+ data: {
75
+ type: Array,
76
+ default: () => {
77
+ return []
78
+ },
79
+ }
80
+ });
81
+
82
+ const [name, bem] = createNamespace("action-bar");
83
+ const slots = useSlots()
84
+
85
+ // 样式
86
+ const classes = bem([
87
+ {
88
+ },
89
+ ]);
90
+
91
+ console.log(slots.default())
92
+
93
+ const columns = computed(() => {
94
+ let list = []
95
+ slots.default().forEach(x => {
96
+ list.push({
97
+ label: x.props.label,
98
+ prop: x.props.prop
99
+ })
100
+ })
101
+ return list
102
+ })
103
+ </script>
104
+
105
+ <style lang="scss">
106
+ @import "./index.scss";
107
+ </style>
@@ -0,0 +1,118 @@
1
+ :root {
2
+ --nb-table-head-height: 64px; // 表头高度
3
+ --nb-table-head-padding: 6px 0;
4
+ --nb-table-body-height: 64px; // 标体单行高度
5
+ --nb-table-body-padding: 6px 0;
6
+ }
7
+
8
+ .nb-table {
9
+ width: 100%;
10
+ height: 100%;
11
+ display: flex;
12
+ flex-direction: column;
13
+ overflow: hidden;
14
+ position: relative;
15
+
16
+ // 表头
17
+ &__header-wrapper {
18
+ width: 100%;
19
+ min-height: var(--nb-table-head-height);
20
+
21
+ table {
22
+ width: 100%;
23
+ }
24
+ }
25
+
26
+ &__thead {
27
+ font-size: 20px;
28
+ line-height: 30px;
29
+ font-weight: 400;
30
+ color: #3abdff;
31
+
32
+ tr {
33
+ height: var(--nb-table-head-height);
34
+ }
35
+
36
+ th {
37
+ text-align: left;
38
+
39
+ &>div {
40
+ padding: var(--nb-table-head-padding);
41
+ }
42
+ }
43
+ }
44
+
45
+ // 表体
46
+ &__body-wrapper {
47
+ width: 100%;
48
+ flex: 1;
49
+ table {
50
+ width: 100%;
51
+ }
52
+
53
+ tr {
54
+ height: var(--nb-table-body-height);
55
+ }
56
+
57
+ tr:nth-child(odd) {
58
+ background-color: rgba(#3abdff, 0.04);
59
+ }
60
+
61
+ td {
62
+
63
+ &>div {
64
+ padding: var(--nb-table-body-padding);
65
+ }
66
+ }
67
+ }
68
+
69
+ // 上下轮播
70
+ &--vertical{
71
+ overflow: initial;
72
+ animation-name: upDown;
73
+ animation-duration: 5s;
74
+ animation-timing-function: linear;
75
+ animation-iteration-count: infinite;
76
+ }
77
+
78
+ &__thead,
79
+ &__tbody {
80
+
81
+ th,
82
+ td {
83
+ min-width: 0;
84
+ box-sizing: border-box;
85
+ text-overflow: ellipsis;
86
+ vertical-align: middle;
87
+ position: relative;
88
+ text-align: left;
89
+ z-index: 1;
90
+ padding-left: 30px;
91
+
92
+ &>div {
93
+ padding: var(--nb-table-head-padding);
94
+ box-sizing: border-box;
95
+ overflow: hidden;
96
+ text-overflow: ellipsis;
97
+ white-space: normal;
98
+ word-break: break-word;
99
+ }
100
+ }
101
+ }
102
+
103
+ &__tbody {
104
+ font-size: 18px;
105
+ line-height: 24px;
106
+ font-weight: 400;
107
+ color: #3abdff;
108
+ }
109
+ }
110
+ @keyframes upDown {
111
+ 0% {
112
+ transform: translateY(0);
113
+ }
114
+ 100% {
115
+ /* 平移自身宽度的50%,ul宽度的50%,剩下的那50%用来在下一次显示时占位 */
116
+ transform: translateY(-50%);
117
+ }
118
+ }
@@ -0,0 +1,108 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-29 15:15:27
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-14 15:55:36
6
+ * @Description: 表格
7
+ -->
8
+ <template>
9
+ <div class="nb-table">
10
+ <!-- 表头 -->
11
+ <div class="nb-table__header-wrapper">
12
+ <table cellpadding="0" cellspacing="0" border="0">
13
+ <nb-table-colgroup :columns="columns" />
14
+ <thead class="nb-table__thead">
15
+ <tr>
16
+ <th
17
+ v-for="(item, index) in columns"
18
+ :key="item.prop"
19
+ :class="columnClass(item, index)"
20
+ >
21
+ {{ item.label }}
22
+ </th>
23
+ </tr>
24
+ </thead>
25
+ </table>
26
+ </div>
27
+ <!-- 表头体 -->
28
+ <div class="nb-table__body-wrapper" :class="wraperClass">
29
+ <table cellpadding="0" cellspacing="0" border="0">
30
+ <nb-table-colgroup :columns="columns" />
31
+ <tbody class="nb-table__tbody">
32
+ <tr v-for="(row, rowIndex) in data" :key="rowIndex">
33
+ <td v-for="(column, columnIndex) in columns" :key="columnIndex">
34
+ <!-- <div>{{ row[column.prop] }}</div> -->
35
+ <!-- <nb-table-column>
36
+ <template #default="{ row, column, columnIndex }"></template>
37
+ </nb-table-column> -->
38
+ <!-- <nb-table-column :scope="{ row, column, columnIndex }" /> -->
39
+ </td>
40
+ </tr>
41
+ </tbody>
42
+ </table>
43
+ </div>
44
+ </div>
45
+ </template>
46
+
47
+ <script setup>
48
+ import { computed, useSlots, ref, h } from 'vue'
49
+ import { createNamespace } from '../../../utils/create.js'
50
+ import NbTableColgroup from './TableColgroup.vue'
51
+ import NbTableColumn from '../TableColumn/index.vue'
52
+
53
+ defineOptions({
54
+ name: 'NbTable'
55
+ })
56
+
57
+ const props = defineProps({
58
+ // 数据源
59
+ data: {
60
+ type: Array,
61
+ default: () => {
62
+ return []
63
+ }
64
+ },
65
+ // 轮播方式
66
+ swipe: {
67
+ type: String,
68
+ default: '' // vertical
69
+ }
70
+ })
71
+
72
+ const [name, bem] = createNamespace('table')
73
+ const slots = useSlots()
74
+ const dynamicSlotName = ref('')
75
+
76
+ // 样式
77
+ const wraperClass = bem([props.swipe, {
78
+
79
+ }])
80
+
81
+ const columns = computed(() => {
82
+ let list = []
83
+ slots.default().forEach((x) => {
84
+ console.log(x.children?.default())
85
+ list.push({
86
+ ...x.props,
87
+ default: x.children?.default()
88
+ })
89
+ })
90
+ return list
91
+ })
92
+
93
+ console.log(slots.default(), columns.value)
94
+
95
+ // 列的宽度
96
+ const columnWidth = (column, index) => {
97
+ return column.minWidth
98
+ }
99
+
100
+ // 列的class名称
101
+ const columnClass = (column, index) => {
102
+ return `nb-table-0_column_${index}`
103
+ }
104
+ </script>
105
+
106
+ <style lang="scss">
107
+ @import './index.scss';
108
+ </style>
@@ -0,0 +1,7 @@
1
+ :root {
2
+ // 通用
3
+ --nb-action-bar-height: 112px;
4
+ }
5
+
6
+ .nb-action-bar {
7
+ }
@@ -0,0 +1,60 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-29 15:15:27
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-14 15:53:34
6
+ * @Description: 检测动作栏
7
+ -->
8
+ <template>
9
+ <div class="2">
10
+ <slot>{{label}}2222</slot>
11
+ </div>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { createNamespace } from "../../../utils/create.js";
16
+
17
+ defineOptions({
18
+ name: "NbTableColumn",
19
+ });
20
+
21
+ const props = defineProps({
22
+ scope: {
23
+ type: Object,
24
+ default: () => {
25
+ return {}
26
+ }
27
+ },
28
+ // 检测中的提示语
29
+ label: {
30
+ type: String,
31
+ default: "",
32
+ },
33
+ // 是否异常
34
+ prop: {
35
+ type: String,
36
+ default: '',
37
+ },
38
+ // 异常提示语
39
+ minWidth: {
40
+ type: [Number, String],
41
+ default: null,
42
+ },
43
+ });
44
+
45
+ const [name, bem] = createNamespace("table-colunm");
46
+
47
+ // 样式
48
+ const classes = bem([
49
+ {
50
+ fixed: props.fixed,
51
+ loading: props.loading,
52
+ abnormal: props.abnormal,
53
+ success: props.success,
54
+ },
55
+ ]);
56
+ </script>
57
+
58
+ <style lang="scss">
59
+ @import "./index.scss";
60
+ </style>
@@ -0,0 +1,11 @@
1
+ // 浏览器壳和Android壳均已集成字体文件,但处理方式不一样
2
+ // 开发环境下,均需要引用字体文件
3
+ // 生产环境下,Android包需要引入字体文件,但Android可会进行请求拦截
4
+ // 生成环境下,Web包不需要引入字体文件,但要兼容-M和 M两种
5
+ @font-face {
6
+ font-family: OPPOSans-M;src: url('./OPPOSans-M.ttf');
7
+ }
8
+
9
+ @font-face {
10
+ font-family: OPPOSans-B;src: url('./OPPOSans-B.ttf');
11
+ }