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,34 @@
1
+ /*
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-06-27 17:07:50
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-08-07 09:15:55
6
+ * @Description:
7
+ */
8
+ import './iconfont-svg/iconfont.js'
9
+ import './fonts/font.scss'
10
+ import './styles/var.scss'
11
+
12
+ // 引入封装好的组件
13
+ import Table from './components/Table/index.vue'
14
+ import TableColumn from './components/TableColumn/index.vue'
15
+ import Box from './components/Box/index.vue'
16
+ import Header from './components/Header/index.vue'
17
+
18
+ // 按需引入
19
+ export { Table }
20
+ export { TableColumn }
21
+ export { Box }
22
+ export { Header }
23
+
24
+ const component = [Table, TableColumn, Box, Header]
25
+
26
+ const NuboMedUIBI = {
27
+ install(App) {
28
+ component.forEach((item) => {
29
+ App.component(item.name, item)
30
+ })
31
+ }
32
+ }
33
+
34
+ export default NuboMedUIBI
@@ -0,0 +1,12 @@
1
+ @mixin cornerImg($url) {
2
+ content: '';
3
+ display: block;
4
+ width: 32px;
5
+ height: 34px;
6
+ background: url($url) no-repeat;
7
+ background-size: 32px 34px;
8
+ position: absolute;
9
+ left: -2px;
10
+ top: -2px;
11
+ z-index: 1;
12
+ }
@@ -0,0 +1,11 @@
1
+ :root {
2
+ // 通用
3
+ --nb-font-family: OPPOSans-M, OPPOSans;
4
+ --nb-font-bold-family: OPPOSans-B, OPPOSans;
5
+ --nb-font-color: #181d41;
6
+ --nb-font-color-2: rgba(24, 29, 65, 0.2);
7
+ --nb-font-color-5: rgba(24, 29, 65, 0.5);
8
+ --nb-font-color-7: rgba(24, 29, 65, 0.7);
9
+ --nb-theme-color: #0066e0;
10
+ --nb-abnormal-color: #EA255F;
11
+ }
@@ -0,0 +1,59 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-07-24 17:24:36
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-07-25 13:47:29
6
+ * @Description:
7
+ -->
8
+ <template>
9
+ <div>
10
+ <div class="demo-box">
11
+ <div class="demo-box-title">
12
+ <span class="demo-box-title-name">动作栏(高度112px)</span>
13
+ <span class="demo-box-title-desc">通常用在检测页。</span>
14
+ </div>
15
+ <div class="demo-box-content">
16
+ <nb-action-bar loading loading-text="检测中..." :fixed="false">
17
+ <nb-button type="primary" disabled>提交</nb-button>
18
+ </nb-action-bar>
19
+ <nb-action-bar loading :fixed="false">
20
+ <template #loading>
21
+ <span>加载中...</span>
22
+ </template>
23
+ <nb-button type="primary" disabled>确定</nb-button>
24
+ </nb-action-bar>
25
+
26
+ <nb-action-bar abnormal abnormal-text="检测到异常,请及时处理!" :fixed="false">
27
+ <nb-button type="primary" plain>重新检测</nb-button>
28
+ <nb-button type="primary" disabled>确定</nb-button>
29
+ </nb-action-bar>
30
+ <nb-action-bar abnormal :fixed="false">
31
+ <template #abnormal>
32
+ <span>*存在出库耗材,请放回库位!</span>
33
+ </template>
34
+ <nb-button type="primary" plain>重新检测</nb-button>
35
+ <nb-button type="primary" disabled>确定</nb-button>
36
+ </nb-action-bar>
37
+
38
+ <nb-action-bar success success-text="检测完成,共<strong>233</strong>" :fixed="false">
39
+ <nb-button type="primary" plain>重新检测</nb-button>
40
+ <nb-button type="primary">确定</nb-button>
41
+ </nb-action-bar>
42
+ <nb-action-bar success :fixed="false">
43
+ <template #success>
44
+ <span>已选择<strong>323</strong></span>
45
+ </template>
46
+ <nb-button type="primary">确定</nb-button>
47
+ </nb-action-bar>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script setup></script>
54
+
55
+ <style lang="scss" scoped>
56
+ .nb-action-bar {
57
+ margin-bottom: 30px;
58
+ }
59
+ </style>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div>
3
+ <div class="demo-box">
4
+ <div class="demo-box-title">
5
+ <span class="demo-box-title-name">Badge 徽章</span>
6
+ <span class="demo-box-title-desc">按钮和图标上的数字或状态标记。</span>
7
+ </div>
8
+ <div class="demo-box-content">
9
+ <nb-badge value="10" />
10
+ <nb-badge value="8">库存预警</nb-badge>
11
+ <nb-badge is-dot>库存预警</nb-badge>
12
+ <nb-badge value="10"><nb-button type="primary" size="medium">库存预警</nb-button></nb-badge>
13
+ <nb-badge value="100"><nb-button type="primary" size="medium">库存预警</nb-button></nb-badge>
14
+ <nb-badge is-dot><nb-button type="primary" size="medium">库存预警</nb-button></nb-badge>
15
+ <nb-badge is-dot hidden><nb-button type="primary" size="medium">库存预警</nb-button></nb-badge>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script setup>
22
+ </script>
23
+
24
+ <style lang="scss" scoped>
25
+ .nb-badge{
26
+ margin: 0 30px 30px 0;
27
+ }
28
+ </style>
@@ -0,0 +1,302 @@
1
+ <template>
2
+ <div class="component">
3
+ <div class="component__left">
4
+ <div class="component__title" id="base">Button 按钮</div>
5
+ <div class="component__intro">常用的操作按钮</div>
6
+ <div class="component__detail">
7
+ <div class="component__detail__title">基础用法</div>
8
+ <div class="component__detail__intro">
9
+ 使用 type、plain、round 和 circle 来定义按钮的样式。
10
+ </div>
11
+ <div class="component__detail__box">
12
+ <span class="demo-box-title-name"
13
+ >按钮 - 大按钮(高度80px,最小宽度480px)</span
14
+ >
15
+ <span class="demo-box-title-desc">一般用在弹窗、个人中心</span>
16
+ </div>
17
+ <div class="demo-box-content">
18
+ <nb-button type="primary" size="large">primary</nb-button>
19
+ <nb-button type="primary" disabled size="large"
20
+ >primary disabled</nb-button
21
+ >
22
+ <nb-button type="primary" loading size="large"
23
+ >primary loading</nb-button
24
+ >
25
+ <nb-button type="primary" plain size="large">primary plain</nb-button>
26
+ <nb-button type="primary" plain disabled size="large"
27
+ >primary plain disabled</nb-button
28
+ >
29
+ <nb-button type="primary" plain loading size="large"
30
+ >primary plain loading</nb-button
31
+ >
32
+
33
+ <nb-button type="warning" size="large">warning</nb-button>
34
+ <nb-button type="warning" disabled size="large"
35
+ >warning disabled</nb-button
36
+ >
37
+ <nb-button type="warning" loading size="large"
38
+ >warning loading</nb-button
39
+ >
40
+ <nb-button type="warning" plain size="large">warning plain</nb-button>
41
+ <nb-button type="warning" plain disabled size="large"
42
+ >warning plain disabled</nb-button
43
+ >
44
+ <nb-button type="warning" plain loading size="large"
45
+ >warning plain loading</nb-button
46
+ >
47
+
48
+ <nb-button size="large">default</nb-button>
49
+ <nb-button disabled size="large">default disabled</nb-button>
50
+ <nb-button loading size="large">default loading</nb-button>
51
+ </div>
52
+ </div>
53
+ <div class="component__detail">
54
+ <div class="component__detail__title">基础用法</div>
55
+ <div class="component__detail__intro">
56
+ 使用 type、plain、round 和 circle 来定义按钮的样式。
57
+ </div>
58
+ <div class="component__detail__box">
59
+ <div class="">
60
+ <nb-button type="primary" disabled size="large"
61
+ >primary disabled</nb-button
62
+ >
63
+ </div>
64
+ <div class="">查看代码</div>
65
+ <code>
66
+ <nb-button type="primary" disabled size="large"
67
+ >primary disabled</nb-button
68
+ >
69
+ </code>
70
+ </div>
71
+ <div class="demo-box-content">
72
+ <nb-button type="primary" size="large">primary</nb-button>
73
+ <nb-button type="primary" disabled size="large"
74
+ >primary disabled</nb-button
75
+ >
76
+ <nb-button type="primary" loading size="large"
77
+ >primary loading</nb-button
78
+ >
79
+ <nb-button type="primary" plain size="large">primary plain</nb-button>
80
+ <nb-button type="primary" plain disabled size="large"
81
+ >primary plain disabled</nb-button
82
+ >
83
+ <nb-button type="primary" plain loading size="large"
84
+ >primary plain loading</nb-button
85
+ >
86
+
87
+ <nb-button type="warning" size="large">warning</nb-button>
88
+ <nb-button type="warning" disabled size="large"
89
+ >warning disabled</nb-button
90
+ >
91
+ <nb-button type="warning" loading size="large"
92
+ >warning loading</nb-button
93
+ >
94
+ <nb-button type="warning" plain size="large">warning plain</nb-button>
95
+ <nb-button type="warning" plain disabled size="large"
96
+ >warning plain disabled</nb-button
97
+ >
98
+ <nb-button type="warning" plain loading size="large"
99
+ >warning plain loading</nb-button
100
+ >
101
+
102
+ <nb-button size="large">default</nb-button>
103
+ <nb-button disabled size="large">default disabled</nb-button>
104
+ <nb-button loading size="large">default loading</nb-button>
105
+ </div>
106
+ </div>
107
+ <div class="demo-box">
108
+ <div class="demo-box-title">
109
+ <span class="demo-box-title-name"
110
+ >按钮 - 大按钮(高度80px,最小宽度根据文字自适应,最小160px)</span
111
+ >
112
+ <span class="demo-box-title-desc">一般用在登录页</span>
113
+ </div>
114
+ <div class="demo-box-content">
115
+ <nb-button type="primary" size="large" auto-width>登录</nb-button>
116
+ <nb-button type="info" size="large" auto-width
117
+ >人脸识别登录</nb-button
118
+ >
119
+ </div>
120
+ </div>
121
+ <div class="demo-box">
122
+ <div class="demo-box-title">
123
+ <span class="demo-box-title-name"
124
+ >按钮 - 主功能按钮(高度72px,最小宽度220px)</span
125
+ >
126
+ <span class="demo-box-title-desc"
127
+ >一般用在界面右下角等,比较重要业务功能按钮</span
128
+ >
129
+ </div>
130
+ <div class="demo-box-content">
131
+ <nb-button type="primary" size="medium">primary</nb-button>
132
+ <nb-button type="primary" disabled size="medium"
133
+ >primary disabled</nb-button
134
+ >
135
+ <nb-button type="primary" loading size="medium"
136
+ >primary loading</nb-button
137
+ >
138
+ <nb-button type="primary" plain size="medium"
139
+ >primary plain</nb-button
140
+ >
141
+ <nb-button type="primary" plain disabled size="medium"
142
+ >primary plain disabled</nb-button
143
+ >
144
+ <nb-button type="primary" plain loading size="medium"
145
+ >primary plain loading</nb-button
146
+ >
147
+
148
+ <nb-button type="warning" size="medium">warning</nb-button>
149
+ <nb-button type="warning" disabled size="medium"
150
+ >warning disabled</nb-button
151
+ >
152
+ <nb-button type="warning" loading size="medium"
153
+ >warning loading</nb-button
154
+ >
155
+ <nb-button type="warning" plain size="medium"
156
+ >warning plain</nb-button
157
+ >
158
+ <nb-button type="warning" plain disabled size="medium"
159
+ >warning plain disabled</nb-button
160
+ >
161
+ <nb-button type="warning" plain loading size="medium"
162
+ >warning plain loading</nb-button
163
+ >
164
+
165
+ <nb-button size="medium">default</nb-button>
166
+ <nb-button disabled size="medium">default disabled</nb-button>
167
+ <nb-button loading size="medium">default loading</nb-button>
168
+ </div>
169
+ </div>
170
+ <div class="demo-box">
171
+ <div class="demo-box-title">
172
+ <span class="demo-box-title-name"
173
+ >按钮 - 图标按钮(高度64px,最小宽度220px)</span
174
+ >
175
+ <span class="demo-box-title-desc"
176
+ >一般用在界面右上角,做刷新等整体功能按钮</span
177
+ >
178
+ </div>
179
+ <div class="demo-box-content">
180
+ <nb-button type="primary" size="small" svg-icon="refresh"
181
+ >刷新</nb-button
182
+ >
183
+ <nb-button type="primary" disabled size="small"
184
+ >primary disabled</nb-button
185
+ >
186
+ <nb-button type="primary" loading size="small"
187
+ >primary loading</nb-button
188
+ >
189
+ <nb-button type="primary" plain size="small">primary plain</nb-button>
190
+ <nb-button type="primary" plain disabled size="small"
191
+ >primary plain disabled</nb-button
192
+ >
193
+ <nb-button type="primary" plain loading size="small"
194
+ >primary plain loading</nb-button
195
+ >
196
+
197
+ <nb-button type="warning" size="small">warning</nb-button>
198
+ <nb-button type="warning" disabled size="small"
199
+ >warning disabled</nb-button
200
+ >
201
+ <nb-button type="warning" loading size="small"
202
+ >warning loading</nb-button
203
+ >
204
+ <nb-button type="warning" plain size="small">warning plain</nb-button>
205
+ <nb-button type="warning" plain disabled size="small"
206
+ >warning plain disabled</nb-button
207
+ >
208
+ <nb-button type="warning" plain loading size="small"
209
+ >warning plain loading</nb-button
210
+ >
211
+
212
+ <nb-button size="small">default</nb-button>
213
+ <nb-button disabled size="small">default disabled</nb-button>
214
+ <nb-button loading size="small">default loading</nb-button>
215
+ </div>
216
+ </div>
217
+ <div class="demo-box">
218
+ <div class="demo-box-title">
219
+ <span class="demo-box-title-name"
220
+ >按钮 - 正文按钮(高度48px,最小宽度88px)</span
221
+ >
222
+ <span class="demo-box-title-desc"
223
+ >一般用在列表内,偏小尺寸的按钮</span
224
+ >
225
+ </div>
226
+ <div class="demo-box-content">
227
+ <nb-button type="primary" size="mini">primary</nb-button>
228
+ <nb-button type="primary" disabled size="mini"
229
+ >primary disabled</nb-button
230
+ >
231
+ <nb-button type="primary" loading size="mini"
232
+ >primary loading</nb-button
233
+ >
234
+ <nb-button type="primary" plain size="mini">primary plain</nb-button>
235
+ <nb-button type="primary" plain disabled size="mini"
236
+ >primary plain disabled</nb-button
237
+ >
238
+ <nb-button type="primary" plain loading size="mini"
239
+ >primary plain loading</nb-button
240
+ >
241
+
242
+ <nb-button type="warning" size="mini">warning</nb-button>
243
+ <nb-button type="warning" disabled size="mini"
244
+ >warning disabled</nb-button
245
+ >
246
+ <nb-button type="warning" loading size="mini"
247
+ >warning loading</nb-button
248
+ >
249
+ <nb-button type="warning" plain size="mini">warning plain</nb-button>
250
+ <nb-button type="warning" plain disabled size="mini"
251
+ >warning plain disabled</nb-button
252
+ >
253
+ <nb-button type="warning" plain loading size="mini"
254
+ >warning plain loading</nb-button
255
+ >
256
+
257
+ <nb-button size="mini">default</nb-button>
258
+ <nb-button disabled size="mini">default disabled</nb-button>
259
+ <nb-button loading size="mini">default loading</nb-button>
260
+ </div>
261
+ </div>
262
+ <div class="demo-box">
263
+ <div class="demo-box-title">
264
+ <span class="demo-box-title-name"
265
+ >按钮 - 正文图标按钮(高度64px,最小宽度100px)</span
266
+ >
267
+ <span class="demo-box-title-desc"
268
+ >一般用在列表内,偏小尺寸的按钮</span
269
+ >
270
+ </div>
271
+ <div class="demo-box-content">
272
+ <nb-button type="primary" plain text svg-icon="delete"
273
+ >删除</nb-button
274
+ >
275
+ <nb-button type="primary" plain text disabled svg-icon="delete"
276
+ >删除</nb-button
277
+ >
278
+ <nb-button type="warning" plain text svg-icon="delete"
279
+ >删除</nb-button
280
+ >
281
+ <nb-button type="warning" plain text disabled svg-icon="delete"
282
+ >删除</nb-button
283
+ >
284
+ </div>
285
+ </div>
286
+ </div>
287
+ <div class="component__right">
288
+ <p>CONTENTS</p>
289
+ <p><a href="#base">基础用法</a></p>
290
+ </div>
291
+ </div>
292
+ </template>
293
+
294
+ <script setup></script>
295
+
296
+ <style lang="scss" scoped>
297
+ .demo-box-content {
298
+ .nb-button {
299
+ margin: 20px 10px;
300
+ }
301
+ }
302
+ </style>
@@ -0,0 +1,116 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-07-05 15:26:05
4
+ * @LastEditTime: 2023-09-12 21:00:34
5
+ * @LastEditors: chenghuan.dong
6
+ * @Description:
7
+ * @FilePath: \基础建设\nubomed-ui\src\demos\Button.vue
8
+ -->
9
+ <template>
10
+ <div class="component">
11
+ <div class="component__left">
12
+ <div class="component__title" id="base">Button 按钮</div>
13
+ <div class="component__intro">常用的操作按钮</div>
14
+ <div class="component__detail">
15
+ <div class="component__detail__title">基础用法</div>
16
+ <div class="component__detail__intro">
17
+ 使用 type、plain、round 和 circle 来定义按钮的样式。
18
+ </div>
19
+ <div class="component__detail__box">
20
+ <div class="component__detail__demo">
21
+ <nb-button type="primary">primary</nb-button>
22
+ </div>
23
+ <div class="component__detail__toggle">
24
+ <span>查看代码</span>
25
+ </div>
26
+ <div class="component__detail__code">
27
+ {{demo}}
28
+ </div>
29
+ </div>
30
+ </div>
31
+
32
+ <div class="component__title" id="api">Button API</div>
33
+ <div class="component__intro">Button Attributes</div>
34
+ <table class="table" cellpadding="0" cellspacing="0" border="0">
35
+ <thead>
36
+ <tr>
37
+ <th>属性名</th>
38
+ <th>说明</th>
39
+ <th>类型</th>
40
+ <th>默认值</th>
41
+ </tr>
42
+ </thead>
43
+ <tbody>
44
+ <tr>
45
+ <td>size</td>
46
+ <td>尺寸</td>
47
+ <td>enum: 'large' | 'medium' | 'small' | 'mini'</td>
48
+ <td>medium</td>
49
+ </tr>
50
+ <tr>
51
+ <td>type</td>
52
+ <td>类型</td>
53
+ <td>enum: 'default', 'primary', 'warning', 'info'</td>
54
+ <td>'default'</td>
55
+ </tr>
56
+ <tr>
57
+ <td>disabled</td>
58
+ <td>按钮是否为禁用状态</td>
59
+ <td>boolean</td>
60
+ <td>false</td>
61
+ </tr>
62
+ <tr>
63
+ <td>loading</td>
64
+ <td>是否为加载中状态</td>
65
+ <td>boolean</td>
66
+ <td>false</td>
67
+ </tr>
68
+ <tr>
69
+ <td>plain</td>
70
+ <td>是否为朴素按钮</td>
71
+ <td>boolean</td>
72
+ <td>false</td>
73
+ </tr>
74
+ <tr>
75
+ <td>text </td>
76
+ <td>是否为文字按钮</td>
77
+ <td>boolean</td>
78
+ <td>false</td>
79
+ </tr>
80
+ <tr>
81
+ <td>svgIcon</td>
82
+ <td>svg-icon的名称</td>
83
+ <td>string</td>
84
+ <td></td>
85
+ </tr>
86
+ <tr>
87
+ <td>autoWidth</td>
88
+ <td>是否自适应文字显示宽度</td>
89
+ <td>boolean</td>
90
+ <td>false</td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+ </div>
95
+ <div class="component__right">
96
+ <p>CONTENTS</p>
97
+ <p><a href="#base">基础用法</a></p>
98
+ <p><a href="#api">API</a></p>
99
+ </div>
100
+ </div>
101
+ </template>
102
+
103
+ <script setup>
104
+ import { ref } from 'vue'
105
+ const demo = ref(decodeURIComponent(`<nb-button type="primary">primary</nb-button>`))
106
+ console.log(decodeURIComponent(demo))
107
+
108
+ </script>
109
+
110
+ <style lang="scss" scoped>
111
+ .demo-box-content {
112
+ .nb-button {
113
+ margin: 20px 10px;
114
+ }
115
+ }
116
+ </style>
@@ -0,0 +1,40 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-07-11 11:14:22
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-07-13 17:21:24
6
+ * @Description:
7
+ -->
8
+ <template>
9
+ <div>
10
+ <div class="demo-box">
11
+ <div class="demo-box-title">
12
+ <span class="demo-box-title-name">多选按钮(最小宽度88px,高度64px)</span>
13
+ <span class="demo-box-title-desc">当前选中值:{{value}}</span>
14
+ </div>
15
+ <div class="demo-box-content">
16
+ <nb-button-group v-model="value" :data="options" />
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup>
23
+ import { ref } from 'vue'
24
+ const options = ref([])
25
+ for (let i = 0; i < 7; i++) {
26
+ options.value.push({
27
+ label: `星期${i + 1}`,
28
+ value: i
29
+ })
30
+ }
31
+ options.value.push({
32
+ label: `星期8`,
33
+ value: 8,
34
+ disabled: true
35
+ })
36
+ const value = ref([options.value[0].value])
37
+ </script>
38
+
39
+ <style lang="scss" scoped>
40
+ </style>
@@ -0,0 +1,29 @@
1
+ <!--
2
+ * @Author: chenghuan.dong
3
+ * @Date: 2023-07-25 14:21:33
4
+ * @LastEditors: chenghuan.dong
5
+ * @LastEditTime: 2023-07-25 17:58:46
6
+ * @Description:
7
+ -->
8
+
9
+ <template>
10
+ <div>
11
+ <div class="demo-box">
12
+ <div class="demo-box-title">
13
+ <span class="demo-box-title-name">检测页排版</span>
14
+ <span class="demo-box-title-desc"></span>
15
+ </div>
16
+ <div class="demo-box-content">
17
+ <nb-check-list></nb-check-list>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <script setup></script>
24
+
25
+ <style lang="scss" scoped>
26
+ .demo-box-content {
27
+ height: 900px;background-color: #ECF0F5;padding: 30px;
28
+ }
29
+ </style>