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.
- package/.env.bi +13 -0
- package/.env.terminal +13 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +17 -0
- package/index.html +13 -0
- package/nubomed-ui/nubomed-ui.es.js +2005 -0
- package/nubomed-ui/nubomed-ui.umd.js +1 -0
- package/nubomed-ui/style.css +1 -0
- package/package.json +19 -7
- package/src/App.vue +31 -0
- package/src/bi-demos/Header.vue +29 -0
- package/src/bi-demos/Table.vue +69 -0
- package/src/bi-demos/index.vue +132 -0
- package/src/bi-packages/components/Box/images/corner-error.png +0 -0
- package/src/bi-packages/components/Box/images/corner-warning.png +0 -0
- package/src/bi-packages/components/Box/images/corner.png +0 -0
- package/src/bi-packages/components/Box/index.scss +86 -0
- package/src/bi-packages/components/Box/index.vue +53 -0
- package/src/bi-packages/components/Carousel/CarouselItem.vue +0 -0
- package/src/bi-packages/components/Carousel/index.vue +0 -0
- package/src/bi-packages/components/Header/images/left-bg.png +0 -0
- package/src/bi-packages/components/Header/images/logo.png +0 -0
- package/src/bi-packages/components/Header/images/right-bg.png +0 -0
- package/src/bi-packages/components/Header/index.scss +50 -0
- package/src/bi-packages/components/Header/index.vue +54 -0
- package/src/bi-packages/components/Table/TableColgroup.vue +43 -0
- package/src/bi-packages/components/Table/index copy.vue +107 -0
- package/src/bi-packages/components/Table/index.scss +118 -0
- package/src/bi-packages/components/Table/index.vue +108 -0
- package/src/bi-packages/components/TableColumn/index.scss +7 -0
- package/src/bi-packages/components/TableColumn/index.vue +60 -0
- package/src/bi-packages/fonts/OPPOSans-B.ttf +0 -0
- package/src/bi-packages/fonts/OPPOSans-M.ttf +0 -0
- package/src/bi-packages/fonts/font.scss +11 -0
- package/src/bi-packages/iconfont-svg/demo.css +539 -0
- package/src/bi-packages/iconfont-svg/demo_index.html +4811 -0
- package/src/bi-packages/iconfont-svg/iconfont.css +819 -0
- package/src/bi-packages/iconfont-svg/iconfont.js +1 -0
- package/src/bi-packages/iconfont-svg/iconfont.json +1416 -0
- package/src/bi-packages/iconfont-svg/iconfont.ttf +0 -0
- package/src/bi-packages/iconfont-svg/iconfont.woff +0 -0
- package/src/bi-packages/iconfont-svg/iconfont.woff2 +0 -0
- package/src/bi-packages/index.js +34 -0
- package/src/bi-packages/styles/mixin.scss +12 -0
- package/src/bi-packages/styles/var.scss +11 -0
- package/src/demos/ActionBar.vue +59 -0
- package/src/demos/Badge.vue +28 -0
- package/src/demos/Button copy.vue +302 -0
- package/src/demos/Button.vue +116 -0
- package/src/demos/ButtonGroup.vue +40 -0
- package/src/demos/Check.vue +29 -0
- package/src/demos/Dialog.vue +255 -0
- package/src/demos/Empty.vue +38 -0
- package/src/demos/FooterMenu.vue +49 -0
- package/src/demos/Header.vue +71 -0
- package/src/demos/Icons.vue +314 -0
- package/src/demos/Input.vue +87 -0
- package/src/demos/InputKeyboard.vue +30 -0
- package/src/demos/InputNumber.vue +34 -0
- package/src/demos/LeftMenu.vue +128 -0
- package/src/demos/Menus.vue +106 -0
- package/src/demos/OpenCabinetBall.vue +37 -0
- package/src/demos/Statusbar.vue +146 -0
- package/src/demos/Steps.vue +45 -0
- package/src/demos/Tost.vue +35 -0
- package/src/demos/button/button.md +19 -0
- package/src/demos/data/terList.json +145 -0
- package/src/demos/images/cabinets/H3000-D.png +0 -0
- package/src/demos/images/cabinets/H3000-R.png +0 -0
- package/src/demos/images/cabinets/H3000-Rh.png +0 -0
- package/src/demos/images/cabinets/H3000-Rh2.png +0 -0
- package/src/demos/images/cabinets/H3010-R.png +0 -0
- package/src/demos/index.vue +348 -0
- package/src/docs/icons/Icon.vue +72 -0
- package/src/docs/icons/icon.md +21 -0
- package/src/docs/index.html +15 -0
- package/src/docs/index.vue +301 -0
- package/src/main.js +23 -0
- package/src/packages/components/ActionBar/images/error.png +0 -0
- package/src/packages/components/ActionBar/images/loading.gif +0 -0
- package/src/packages/components/ActionBar/images/success.png +0 -0
- package/src/packages/components/ActionBar/images/warning.png +0 -0
- package/src/packages/components/ActionBar/images/warning_yellow.png +0 -0
- package/src/packages/components/ActionBar/index.scss +81 -0
- package/src/packages/components/ActionBar/index.vue +100 -0
- package/src/packages/components/Badge/index.scss +50 -0
- package/src/packages/components/Badge/index.vue +75 -0
- package/src/packages/components/Button/index.scss +241 -0
- package/src/packages/components/Button/index.vue +111 -0
- package/src/packages/components/ButtonGroup/index.scss +54 -0
- package/src/packages/components/ButtonGroup/index.vue +75 -0
- package/src/packages/components/Check/Cate.vue +138 -0
- package/src/packages/components/Check/index.scss +47 -0
- package/src/packages/components/Check/index.vue +105 -0
- package/src/packages/components/Dialog/images/error.png +0 -0
- package/src/packages/components/Dialog/images/success.png +0 -0
- package/src/packages/components/Dialog/images/warning-red.png +0 -0
- package/src/packages/components/Dialog/images/warning-yellow.png +0 -0
- package/src/packages/components/Dialog/index.scss +154 -0
- package/src/packages/components/Dialog/index.vue +305 -0
- package/src/packages/components/Empty/images/empty-abnormal.png +0 -0
- package/src/packages/components/Empty/images/empty-data.png +0 -0
- package/src/packages/components/Empty/images/empty-search.png +0 -0
- package/src/packages/components/Empty/index.vue +68 -0
- package/src/packages/components/Form/FormItem.vue +73 -0
- package/src/packages/components/Form/index.vue +76 -0
- package/src/packages/components/Icon/index.vue +30 -0
- package/src/packages/components/Input/index.scss +184 -0
- package/src/packages/components/Input/index.vue +189 -0
- package/src/packages/components/InputKeyboard/index.scss +63 -0
- package/src/packages/components/InputKeyboard/index.vue +117 -0
- package/src/packages/components/InputNumber/index.scss +103 -0
- package/src/packages/components/InputNumber/index.vue +160 -0
- package/src/packages/components/Menu/index.scss +559 -0
- package/src/packages/components/Menu/index.vue +211 -0
- package/src/packages/components/OpenCabinetBall/CabinetStatus.vue +94 -0
- package/src/packages/components/OpenCabinetBall/index.scss +204 -0
- package/src/packages/components/OpenCabinetBall/index.vue +113 -0
- package/src/packages/components/Statusbar/CabinetList.vue +125 -0
- package/src/packages/components/Statusbar/CabinetListStatus.vue +75 -0
- package/src/packages/components/Statusbar/CabinetListTempHum.vue +108 -0
- package/src/packages/components/Statusbar/index.scss +205 -0
- package/src/packages/components/Statusbar/index.vue +83 -0
- package/src/packages/components/Steps/index.scss +104 -0
- package/src/packages/components/Steps/index.vue +66 -0
- package/src/packages/components/SvgIcon/index.vue +41 -0
- package/src/packages/components/Toast/index.vue +72 -0
- package/src/packages/fonts/OPPOSans-B.ttf +0 -0
- package/src/packages/fonts/OPPOSans-M.ttf +0 -0
- package/src/packages/fonts/font.scss +11 -0
- package/src/packages/iconfont-svg/demo.css +539 -0
- package/src/packages/iconfont-svg/demo_index.html +4811 -0
- package/src/packages/iconfont-svg/iconfont.css +819 -0
- package/src/packages/iconfont-svg/iconfont.js +1 -0
- package/src/packages/iconfont-svg/iconfont.json +1416 -0
- package/src/packages/iconfont-svg/iconfont.ttf +0 -0
- package/src/packages/iconfont-svg/iconfont.woff +0 -0
- package/src/packages/iconfont-svg/iconfont.woff2 +0 -0
- package/src/packages/index.js +64 -0
- package/src/packages/styles/var.scss +24 -0
- package/src/utils/create.js +48 -0
- package/src/utils/index.js +13 -0
- package/src/utils/validate.js +3 -0
- package/vite.config.js +47 -0
- package/nubomed-ui.es.js +0 -152
- package/nubomed-ui.umd.js +0 -1
- package/style.css +0 -1
@@ -0,0 +1,255 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-06-30 22:07:34
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-04 20:46:16
|
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">大尺寸对话框Modal(宽1600px,高900px)</span>
|
13
|
+
</div>
|
14
|
+
<div class="demo-box-content">
|
15
|
+
<nb-button @click="openLarge(1)">打开大对话框</nb-button>
|
16
|
+
<nb-button @click="openLarge(2)">打开大对话框</nb-button>
|
17
|
+
<nb-dialog v-model="largeDialogVisible1" size="large" title="大对话框" show-close @closed="handleClosedLarge(1)"
|
18
|
+
>自定义内容</nb-dialog
|
19
|
+
>
|
20
|
+
<nb-dialog
|
21
|
+
v-model="largeDialogVisible2"
|
22
|
+
size="large"
|
23
|
+
title="大对话框"
|
24
|
+
footerTips="自定义footerTips"
|
25
|
+
:title-center="true"
|
26
|
+
@closed="handleClosedLarge"
|
27
|
+
@cancel="handleClosedLarge(2)"
|
28
|
+
>自定义内容</nb-dialog
|
29
|
+
>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<div class="demo-box">
|
33
|
+
<div class="demo-box-title">
|
34
|
+
<span class="demo-box-title-name">中尺寸对话框Modal(宽1000px,高640px)</span>
|
35
|
+
</div>
|
36
|
+
<div class="demo-box-content">
|
37
|
+
<nb-button @click="openLarge(3)">打开对话框</nb-button>
|
38
|
+
<nb-dialog
|
39
|
+
v-model="largeDialogVisible3"
|
40
|
+
size="medium"
|
41
|
+
title="中尺寸对话框Modal"
|
42
|
+
show-close
|
43
|
+
@closed="handleClosedLarge(3)"
|
44
|
+
>自定义内容</nb-dialog
|
45
|
+
>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<div class="demo-box">
|
49
|
+
<div class="demo-box-title">
|
50
|
+
<span class="demo-box-title-name">小尺寸对话框Modal(宽720px,高520px)</span>
|
51
|
+
</div>
|
52
|
+
<div class="demo-box-content">
|
53
|
+
<nb-button @click="openMini(1)">打开mini对话框</nb-button>
|
54
|
+
<nb-button @click="openMini(2)">打开mini对话框</nb-button>
|
55
|
+
<nb-dialog
|
56
|
+
v-model="miniDialogVisible1"
|
57
|
+
center
|
58
|
+
size="mini"
|
59
|
+
message="是否确定保存盘点数据"
|
60
|
+
desc="提示哦"
|
61
|
+
@cancel="handleClosedMini(1)"
|
62
|
+
@confirm="handleClosedMini(1)"
|
63
|
+
@closed="handleClosedMini(1)"
|
64
|
+
></nb-dialog>
|
65
|
+
<nb-dialog
|
66
|
+
v-model="miniDialogVisible2"
|
67
|
+
center
|
68
|
+
size="mini"
|
69
|
+
message="是否确定保存盘点数据"
|
70
|
+
desc="提示哦"
|
71
|
+
cancel-button-text="我知道了"
|
72
|
+
cancel-button-color="#0066E0"
|
73
|
+
:show-confirm-button="false"
|
74
|
+
@cancel="handleClosedMini(2)"
|
75
|
+
@closed="handleClosedMini(2)"
|
76
|
+
>
|
77
|
+
<div v-html="`您有 36 件试剂取用未归还,<br>请及时归还。`" class="nb-dialog__body__message"></div>
|
78
|
+
</nb-dialog>
|
79
|
+
<nb-button @click="openMini(3)">mini-成功</nb-button>
|
80
|
+
<nb-button @click="openMini(4)">mini-异常</nb-button>
|
81
|
+
<nb-button @click="openMini(5)">mini-异常</nb-button>
|
82
|
+
<nb-button @click="openMini(7)">mini-异常</nb-button>
|
83
|
+
<nb-dialog
|
84
|
+
v-model="miniDialogVisible3"
|
85
|
+
center
|
86
|
+
size="mini"
|
87
|
+
icon="success"
|
88
|
+
message="操作成功!"
|
89
|
+
@cancel="handleClosedMini(3)"
|
90
|
+
@confirm="handleClosedMini(3)"
|
91
|
+
@closed="handleClosedMini(3)"
|
92
|
+
/>
|
93
|
+
<nb-dialog
|
94
|
+
v-model="miniDialogVisible4"
|
95
|
+
center
|
96
|
+
size="mini"
|
97
|
+
icon="warning-red"
|
98
|
+
message="存在未完成数据,是否确定继续"
|
99
|
+
desc="*跳转后当前业务数据将被清除"
|
100
|
+
desc-color="#00A572"
|
101
|
+
@cancel="handleClosedMini(4)"
|
102
|
+
@confirm="handleClosedMini(4)"
|
103
|
+
@closed="handleClosedMini(4)"
|
104
|
+
/>
|
105
|
+
<nb-dialog
|
106
|
+
v-model="miniDialogVisible5"
|
107
|
+
center
|
108
|
+
size="mini"
|
109
|
+
icon="warning-red"
|
110
|
+
message="耗材异常出入库<br>请开柜处理!"
|
111
|
+
cancel-button-text="忽略并删除"
|
112
|
+
cancel-button-color="#E52D3E"
|
113
|
+
confirm-button-text="开柜"
|
114
|
+
@cancel="handleClosedMini(5)"
|
115
|
+
@confirm="handleClosedMini(5)"
|
116
|
+
@closed="handleClosedMini(5)"
|
117
|
+
/>
|
118
|
+
<nb-dialog
|
119
|
+
v-model="miniDialogVisible7"
|
120
|
+
center
|
121
|
+
size="mini"
|
122
|
+
icon="warning-yellow"
|
123
|
+
message="60秒后开始自动盘点"
|
124
|
+
cancel-button-text="我知道了"
|
125
|
+
cancel-button-color="#0066E0"
|
126
|
+
:show-confirm-button="false"
|
127
|
+
:cancel-button-time="5"
|
128
|
+
@cancel="handleClosedMini(7)"
|
129
|
+
@closed="handleClosedMini(7)"
|
130
|
+
/>
|
131
|
+
<nb-button @click="openMini(6)">mini-表单</nb-button>
|
132
|
+
<nb-dialog
|
133
|
+
v-model="miniDialogVisible6"
|
134
|
+
size="mini"
|
135
|
+
center
|
136
|
+
title="请备注患者信息"
|
137
|
+
@cancel="handleClosedMini(6)"
|
138
|
+
@confirm="handleSubmitForm"
|
139
|
+
@closed="handleClosedMini(6)"
|
140
|
+
>
|
141
|
+
<nb-form ref="formRef">
|
142
|
+
<nb-form-item
|
143
|
+
label="患者号"
|
144
|
+
prop="name"
|
145
|
+
:rules="[
|
146
|
+
{ required: true, message: '患者号 is required' },
|
147
|
+
{ type: 'number', message: '患者号 must be a number' }
|
148
|
+
]"
|
149
|
+
>
|
150
|
+
<nb-input v-model="formModel.name" size="large" placeholder="请输入住院号/门诊号" />
|
151
|
+
</nb-form-item>
|
152
|
+
<nb-form-item label="姓名">
|
153
|
+
<nb-input size="large" placeholder="请输入住院号/门诊号" />
|
154
|
+
</nb-form-item>
|
155
|
+
</nb-form>
|
156
|
+
</nb-dialog>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</template>
|
161
|
+
|
162
|
+
<script setup>
|
163
|
+
import { reactive, ref } from 'vue'
|
164
|
+
const largeDialogVisible1 = ref(false)
|
165
|
+
const largeDialogVisible2 = ref(false)
|
166
|
+
const largeDialogVisible3 = ref(false)
|
167
|
+
|
168
|
+
const miniDialogVisible1 = ref(false)
|
169
|
+
const miniDialogVisible2 = ref(false)
|
170
|
+
|
171
|
+
const miniDialogVisible3 = ref(false)
|
172
|
+
const miniDialogVisible4 = ref(false)
|
173
|
+
const miniDialogVisible5 = ref(false)
|
174
|
+
|
175
|
+
const miniDialogVisible6 = ref(false)
|
176
|
+
const miniDialogVisible7 = ref(false)
|
177
|
+
|
178
|
+
const formRef = ref()
|
179
|
+
const formModel = reactive({
|
180
|
+
name: '',
|
181
|
+
password: ''
|
182
|
+
})
|
183
|
+
|
184
|
+
const openLarge = (index) => {
|
185
|
+
setLargeVisible(index, true)
|
186
|
+
}
|
187
|
+
|
188
|
+
const openMini = (index) => {
|
189
|
+
setMiniVisible(index, true)
|
190
|
+
}
|
191
|
+
|
192
|
+
// 关闭
|
193
|
+
const handleClosedLarge = (index) => {
|
194
|
+
console.log('关闭弹框', index)
|
195
|
+
setLargeVisible(index, false)
|
196
|
+
}
|
197
|
+
|
198
|
+
// 关闭
|
199
|
+
const handleClosedMini = (index) => {
|
200
|
+
console.log('关闭弹框', index)
|
201
|
+
setMiniVisible(index, false)
|
202
|
+
}
|
203
|
+
|
204
|
+
const handleSubmitForm = () => {
|
205
|
+
formRef.value && formRef.value.validate(() => {})
|
206
|
+
}
|
207
|
+
|
208
|
+
function setLargeVisible(index, visible) {
|
209
|
+
switch (index) {
|
210
|
+
case 1:
|
211
|
+
largeDialogVisible1.value = visible
|
212
|
+
break
|
213
|
+
case 2:
|
214
|
+
largeDialogVisible2.value = visible
|
215
|
+
break
|
216
|
+
case 3:
|
217
|
+
largeDialogVisible3.value = visible
|
218
|
+
break
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
function setMiniVisible(index, visible) {
|
223
|
+
switch (index) {
|
224
|
+
case 1:
|
225
|
+
miniDialogVisible1.value = visible
|
226
|
+
break
|
227
|
+
case 2:
|
228
|
+
miniDialogVisible2.value = visible
|
229
|
+
break
|
230
|
+
case 3:
|
231
|
+
miniDialogVisible3.value = visible
|
232
|
+
break
|
233
|
+
case 4:
|
234
|
+
miniDialogVisible4.value = visible
|
235
|
+
break
|
236
|
+
case 5:
|
237
|
+
miniDialogVisible5.value = visible
|
238
|
+
break
|
239
|
+
case 6:
|
240
|
+
miniDialogVisible6.value = visible
|
241
|
+
break
|
242
|
+
case 7:
|
243
|
+
miniDialogVisible7.value = visible
|
244
|
+
break
|
245
|
+
}
|
246
|
+
}
|
247
|
+
</script>
|
248
|
+
|
249
|
+
<style lang="scss" scoped>
|
250
|
+
.demo-box-content {
|
251
|
+
.nb-button {
|
252
|
+
margin: 0 30px 30px 0;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
</style>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-05 15:26:05
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-14 17:52:04
|
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">Empty 空状态(宽高自适应居中显示)</span>
|
13
|
+
<span class="demo-box-title-desc">空状态时的占位提示。</span>
|
14
|
+
</div>
|
15
|
+
<div class="demo-box-content">
|
16
|
+
<nb-empty />
|
17
|
+
<nb-empty text="未查询到相关数据" />
|
18
|
+
<nb-empty text="未查询到相关数据">
|
19
|
+
<nb-button type="primary" plain size="small" svg-icon="refresh">刷新</nb-button>
|
20
|
+
</nb-empty>
|
21
|
+
</div>
|
22
|
+
<div class="demo-box-content">
|
23
|
+
<nb-empty icon="search" text="未查询到相关数据" />
|
24
|
+
<nb-empty icon="data" text="未检测到出入库数据" />
|
25
|
+
<nb-empty icon="abnormal" text="未检测到出入库数据" />
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</template>
|
30
|
+
|
31
|
+
<script setup></script>
|
32
|
+
|
33
|
+
<style lang="scss" scoped>
|
34
|
+
.demo-box-content {
|
35
|
+
height: 900px;
|
36
|
+
display: flex;
|
37
|
+
}
|
38
|
+
</style>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-04 20:47:56
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-06 09:53:04
|
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">底部导航(高度96px)</span>
|
13
|
+
</div>
|
14
|
+
<div class="demo-box-content">
|
15
|
+
<nb-menu position="footer" :data="menus" :active="activeMenu" @change="handleChangeMenu" />
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</template>
|
20
|
+
|
21
|
+
<script setup>
|
22
|
+
import { ref } from "vue";
|
23
|
+
|
24
|
+
const menus = ref(
|
25
|
+
[
|
26
|
+
{ text: "修改密码", value: '修改密码' },
|
27
|
+
{ text: "工卡绑定", value: '工卡绑定'},
|
28
|
+
{ text: "指纹绑定", value: '指纹绑定'},
|
29
|
+
{ text: "人脸绑定", value: '人脸绑定', import: true},
|
30
|
+
{ text: "取用未归还记录", value: '取用未归还记录', disabled: true },
|
31
|
+
{ text: "日清统计", value: '日清统计', badge: 5 },
|
32
|
+
]
|
33
|
+
);
|
34
|
+
const activeMenu = ref(menus.value[0].value)
|
35
|
+
const handleChangeMenu = (item) => {
|
36
|
+
activeMenu.value = item.value
|
37
|
+
}
|
38
|
+
</script>
|
39
|
+
|
40
|
+
<style lang="scss" scoped>
|
41
|
+
.demo-box-content {
|
42
|
+
display: flex;
|
43
|
+
flex-direction: column;
|
44
|
+
.nb-menu {
|
45
|
+
margin-bottom: 30px;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
</style>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-04 20:47:56
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-25 15:27:38
|
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">标题栏(高度80px)</span>
|
13
|
+
</div>
|
14
|
+
<div class="demo-box-content">
|
15
|
+
<nb-menu position="header" title="取还" @back="handleBack" @logout="handleLogout" />
|
16
|
+
<nb-menu position="header" title="取还详情" :show-back="false" :show-logout="false" />
|
17
|
+
<nb-menu position="header" title="取还详情" backText="返回主页" :show-logout="false" @logout="handleLogout" />
|
18
|
+
<nb-menu position="header" :data="menus" :active="activeMenu" @change="handleChangeMenu" @back="handleBack" @logout="handleLogout" />
|
19
|
+
<nb-menu position="header">
|
20
|
+
<template #left>
|
21
|
+
<div class="header-left">当前用户:管理员</div>
|
22
|
+
</template>
|
23
|
+
<template #title>自定义标题</template>
|
24
|
+
<template #right>
|
25
|
+
<div class="header-right">
|
26
|
+
<span>账盘</span>
|
27
|
+
<strong>4000</strong>
|
28
|
+
<span>实盘</span>
|
29
|
+
<strong>333</strong>
|
30
|
+
</div>
|
31
|
+
</template>
|
32
|
+
</nb-menu>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</template>
|
37
|
+
|
38
|
+
<script setup>
|
39
|
+
import { ref } from "vue";
|
40
|
+
|
41
|
+
const menus = ref(
|
42
|
+
[
|
43
|
+
{ text: "按柜取还", value: '按柜取还' },
|
44
|
+
{ text: "自由取还", value: '自由取还'},
|
45
|
+
{ text: "检索取还", value: '检索取还'}
|
46
|
+
]
|
47
|
+
);
|
48
|
+
const activeMenu = ref(menus.value[0].value)
|
49
|
+
const handleChangeMenu = (item) => {
|
50
|
+
activeMenu.value = item.value
|
51
|
+
}
|
52
|
+
const handleBack = () => {
|
53
|
+
alert('返回')
|
54
|
+
}
|
55
|
+
const handleLogout = () => {
|
56
|
+
alert('退出登录')
|
57
|
+
}
|
58
|
+
</script>
|
59
|
+
|
60
|
+
<style lang="scss" scoped>
|
61
|
+
.demo-box-content {
|
62
|
+
display: flex;
|
63
|
+
flex-direction: column;
|
64
|
+
.nb-menu {
|
65
|
+
margin-bottom: 30px;
|
66
|
+
}
|
67
|
+
.header-left{flex: 1;font-size: 32px;line-height: 42px;margin-left: 16px;}
|
68
|
+
.header-right{flex: 1;display: flex;align-items: center;justify-content: flex-end;text-align: right;font-size: 24px;line-height: 42px;}
|
69
|
+
}
|
70
|
+
|
71
|
+
</style>
|