nubomed-ui 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. package/{nubomed-ui/nubomed-ui.es.js → nubomed-ui.es.js} +547 -581
  2. package/{nubomed-ui/nubomed-ui.umd.js → nubomed-ui.umd.js} +1 -1
  3. package/package.json +7 -18
  4. package/.env.bi +0 -13
  5. package/.env.terminal +0 -13
  6. package/.vscode/extensions.json +0 -3
  7. package/README.md +0 -17
  8. package/index.html +0 -13
  9. package/src/App.vue +0 -31
  10. package/src/bi-demos/Header.vue +0 -29
  11. package/src/bi-demos/Table.vue +0 -69
  12. package/src/bi-demos/index.vue +0 -132
  13. package/src/bi-packages/components/Box/images/corner-error.png +0 -0
  14. package/src/bi-packages/components/Box/images/corner-warning.png +0 -0
  15. package/src/bi-packages/components/Box/images/corner.png +0 -0
  16. package/src/bi-packages/components/Box/index.scss +0 -86
  17. package/src/bi-packages/components/Box/index.vue +0 -53
  18. package/src/bi-packages/components/Carousel/CarouselItem.vue +0 -0
  19. package/src/bi-packages/components/Carousel/index.vue +0 -0
  20. package/src/bi-packages/components/Header/images/left-bg.png +0 -0
  21. package/src/bi-packages/components/Header/images/logo.png +0 -0
  22. package/src/bi-packages/components/Header/images/right-bg.png +0 -0
  23. package/src/bi-packages/components/Header/index.scss +0 -50
  24. package/src/bi-packages/components/Header/index.vue +0 -54
  25. package/src/bi-packages/components/Table/TableColgroup.vue +0 -43
  26. package/src/bi-packages/components/Table/index copy.vue +0 -107
  27. package/src/bi-packages/components/Table/index.scss +0 -118
  28. package/src/bi-packages/components/Table/index.vue +0 -108
  29. package/src/bi-packages/components/TableColumn/index.scss +0 -7
  30. package/src/bi-packages/components/TableColumn/index.vue +0 -60
  31. package/src/bi-packages/fonts/OPPOSans-B.ttf +0 -0
  32. package/src/bi-packages/fonts/OPPOSans-M.ttf +0 -0
  33. package/src/bi-packages/fonts/font.scss +0 -11
  34. package/src/bi-packages/iconfont-svg/demo.css +0 -539
  35. package/src/bi-packages/iconfont-svg/demo_index.html +0 -4811
  36. package/src/bi-packages/iconfont-svg/iconfont.css +0 -819
  37. package/src/bi-packages/iconfont-svg/iconfont.js +0 -1
  38. package/src/bi-packages/iconfont-svg/iconfont.json +0 -1416
  39. package/src/bi-packages/iconfont-svg/iconfont.ttf +0 -0
  40. package/src/bi-packages/iconfont-svg/iconfont.woff +0 -0
  41. package/src/bi-packages/iconfont-svg/iconfont.woff2 +0 -0
  42. package/src/bi-packages/index.js +0 -34
  43. package/src/bi-packages/styles/mixin.scss +0 -12
  44. package/src/bi-packages/styles/var.scss +0 -11
  45. package/src/demos/ActionBar.vue +0 -59
  46. package/src/demos/Badge.vue +0 -28
  47. package/src/demos/Button copy.vue +0 -302
  48. package/src/demos/Button.vue +0 -116
  49. package/src/demos/ButtonGroup.vue +0 -40
  50. package/src/demos/Check.vue +0 -29
  51. package/src/demos/Dialog.vue +0 -255
  52. package/src/demos/Empty.vue +0 -38
  53. package/src/demos/FooterMenu.vue +0 -49
  54. package/src/demos/Header.vue +0 -71
  55. package/src/demos/Icons.vue +0 -314
  56. package/src/demos/Input.vue +0 -87
  57. package/src/demos/InputKeyboard.vue +0 -30
  58. package/src/demos/InputNumber.vue +0 -34
  59. package/src/demos/LeftMenu.vue +0 -128
  60. package/src/demos/Menus.vue +0 -106
  61. package/src/demos/OpenCabinetBall.vue +0 -37
  62. package/src/demos/Statusbar.vue +0 -146
  63. package/src/demos/Steps.vue +0 -45
  64. package/src/demos/Tost.vue +0 -35
  65. package/src/demos/button/button.md +0 -19
  66. package/src/demos/data/terList.json +0 -145
  67. package/src/demos/images/cabinets/H3000-D.png +0 -0
  68. package/src/demos/images/cabinets/H3000-R.png +0 -0
  69. package/src/demos/images/cabinets/H3000-Rh.png +0 -0
  70. package/src/demos/images/cabinets/H3000-Rh2.png +0 -0
  71. package/src/demos/images/cabinets/H3010-R.png +0 -0
  72. package/src/demos/index.vue +0 -348
  73. package/src/docs/icons/Icon.vue +0 -72
  74. package/src/docs/icons/icon.md +0 -21
  75. package/src/docs/index.html +0 -15
  76. package/src/docs/index.vue +0 -301
  77. package/src/main.js +0 -23
  78. package/src/packages/components/ActionBar/images/error.png +0 -0
  79. package/src/packages/components/ActionBar/images/loading.gif +0 -0
  80. package/src/packages/components/ActionBar/images/success.png +0 -0
  81. package/src/packages/components/ActionBar/images/warning.png +0 -0
  82. package/src/packages/components/ActionBar/images/warning_yellow.png +0 -0
  83. package/src/packages/components/ActionBar/index.scss +0 -81
  84. package/src/packages/components/ActionBar/index.vue +0 -100
  85. package/src/packages/components/Badge/index.scss +0 -50
  86. package/src/packages/components/Badge/index.vue +0 -75
  87. package/src/packages/components/Button/index.scss +0 -241
  88. package/src/packages/components/Button/index.vue +0 -111
  89. package/src/packages/components/ButtonGroup/index.scss +0 -54
  90. package/src/packages/components/ButtonGroup/index.vue +0 -75
  91. package/src/packages/components/Check/Cate.vue +0 -138
  92. package/src/packages/components/Check/index.scss +0 -47
  93. package/src/packages/components/Check/index.vue +0 -105
  94. package/src/packages/components/Dialog/images/error.png +0 -0
  95. package/src/packages/components/Dialog/images/success.png +0 -0
  96. package/src/packages/components/Dialog/images/warning-red.png +0 -0
  97. package/src/packages/components/Dialog/images/warning-yellow.png +0 -0
  98. package/src/packages/components/Dialog/index.scss +0 -154
  99. package/src/packages/components/Dialog/index.vue +0 -305
  100. package/src/packages/components/Empty/images/empty-abnormal.png +0 -0
  101. package/src/packages/components/Empty/images/empty-data.png +0 -0
  102. package/src/packages/components/Empty/images/empty-search.png +0 -0
  103. package/src/packages/components/Empty/index.vue +0 -68
  104. package/src/packages/components/Form/FormItem.vue +0 -73
  105. package/src/packages/components/Form/index.vue +0 -76
  106. package/src/packages/components/Icon/index.vue +0 -30
  107. package/src/packages/components/Input/index.scss +0 -184
  108. package/src/packages/components/Input/index.vue +0 -189
  109. package/src/packages/components/InputKeyboard/index.scss +0 -63
  110. package/src/packages/components/InputKeyboard/index.vue +0 -117
  111. package/src/packages/components/InputNumber/index.scss +0 -103
  112. package/src/packages/components/InputNumber/index.vue +0 -160
  113. package/src/packages/components/Menu/index.scss +0 -559
  114. package/src/packages/components/Menu/index.vue +0 -211
  115. package/src/packages/components/OpenCabinetBall/CabinetStatus.vue +0 -94
  116. package/src/packages/components/OpenCabinetBall/index.scss +0 -204
  117. package/src/packages/components/OpenCabinetBall/index.vue +0 -113
  118. package/src/packages/components/Statusbar/CabinetList.vue +0 -125
  119. package/src/packages/components/Statusbar/CabinetListStatus.vue +0 -75
  120. package/src/packages/components/Statusbar/CabinetListTempHum.vue +0 -108
  121. package/src/packages/components/Statusbar/index.scss +0 -205
  122. package/src/packages/components/Statusbar/index.vue +0 -83
  123. package/src/packages/components/Steps/index.scss +0 -104
  124. package/src/packages/components/Steps/index.vue +0 -66
  125. package/src/packages/components/SvgIcon/index.vue +0 -41
  126. package/src/packages/components/Toast/index.vue +0 -72
  127. package/src/packages/fonts/OPPOSans-B.ttf +0 -0
  128. package/src/packages/fonts/OPPOSans-M.ttf +0 -0
  129. package/src/packages/fonts/font.scss +0 -11
  130. package/src/packages/iconfont-svg/demo.css +0 -539
  131. package/src/packages/iconfont-svg/demo_index.html +0 -4811
  132. package/src/packages/iconfont-svg/iconfont.css +0 -819
  133. package/src/packages/iconfont-svg/iconfont.js +0 -1
  134. package/src/packages/iconfont-svg/iconfont.json +0 -1416
  135. package/src/packages/iconfont-svg/iconfont.ttf +0 -0
  136. package/src/packages/iconfont-svg/iconfont.woff +0 -0
  137. package/src/packages/iconfont-svg/iconfont.woff2 +0 -0
  138. package/src/packages/index.js +0 -64
  139. package/src/packages/styles/var.scss +0 -24
  140. package/src/utils/create.js +0 -48
  141. package/src/utils/index.js +0 -13
  142. package/src/utils/validate.js +0 -3
  143. package/vite.config.js +0 -47
  144. /package/{nubomed-ui/style.css → style.css} +0 -0
package/package.json CHANGED
@@ -1,24 +1,13 @@
1
1
  {
2
2
  "name": "nubomed-ui",
3
3
  "private": false,
4
- "version": "1.0.3",
5
- "description": "NuboMed-UI",
6
- "type": "module",
4
+ "version": "1.0.4",
5
+ "description": "一个简单的组件库",
6
+ "main": "nubomed-ui.es.js",
7
7
  "scripts": {
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
+ "test": "echo \"Error: no test specified\" && exit 1"
15
9
  },
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
- }
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC"
24
13
  }
package/.env.bi DELETED
@@ -1,13 +0,0 @@
1
- ###
2
- # @Author: chenghuan.dong
3
- # @Date: 2023-04-06 13:56:46
4
- # @LastEditors: chenghuan.dong
5
- # @LastEditTime: 2023-08-04 13:39:29
6
- # @Description: BI大屏组件库
7
- ###
8
-
9
- # 组件库目录
10
- VITE_UI_NAME = 'bi'
11
-
12
- # 组件库输出名称
13
- VITE_BUILD_NAME = 'nubomed-ui-bi'
package/.env.terminal DELETED
@@ -1,13 +0,0 @@
1
- ###
2
- # @Author: chenghuan.dong
3
- # @Date: 2023-04-06 13:56:46
4
- # @LastEditors: chenghuan.dong
5
- # @LastEditTime: 2023-08-04 11:49:31
6
- # @Description: 终端组件库
7
- ###
8
-
9
- # 组件库目录
10
- VITE_UI_NAME = 'packages'
11
-
12
- # 组件库输出名称
13
- VITE_BUILD_NAME = 'nubomed-ui'
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3
- }
package/README.md DELETED
@@ -1,17 +0,0 @@
1
- # Vue 3 + Vite
2
-
3
- This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
-
9
- ```js
10
- npm i nubomed-ui
11
- ```
12
-
13
- ```js
14
- import 'nubomed-ui/style.css' //引入组件样式
15
- import NuboMedUI from 'nubomed-ui' //引入下载后的组件
16
- app.use(NuboMedUI)
17
- ```
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>NuboMed-UI</title>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- <script type="module" src="/src/main.js"></script>
12
- </body>
13
- </html>
package/src/App.vue DELETED
@@ -1,31 +0,0 @@
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>
@@ -1,29 +0,0 @@
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>
@@ -1,69 +0,0 @@
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>
@@ -1,132 +0,0 @@
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>
@@ -1,86 +0,0 @@
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
- }
@@ -1,53 +0,0 @@
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
@@ -1,50 +0,0 @@
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
- }
@@ -1,54 +0,0 @@
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>
@@ -1,43 +0,0 @@
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>