feat: 首页dashboard布局
This commit is contained in:
81
src/components/home/homeNav.vue
Normal file
81
src/components/home/homeNav.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<script setup lang="ts">
|
||||
function onIconClick(name: string) {
|
||||
console.log(`点击了${name}图标`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="custom-nav">
|
||||
<view class="nav-left">
|
||||
<image class="nav-logo" src="/static/logo.png" mode="aspectFit" @click="onIconClick('logo')" />
|
||||
<view class="nav-info">
|
||||
<text class="nav-title">
|
||||
G6高速改扩建测试测试项目
|
||||
</text>
|
||||
<text class="nav-subtitle">
|
||||
K1+200-K1+800
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-right">
|
||||
<image class="nav-icon" src="/static/seting.png" mode="aspectFit" @click="onIconClick('设置')" />
|
||||
<image class="nav-icon" src="/static/Bluetooth.png" mode="aspectFit" @click="onIconClick('蓝牙')" />
|
||||
<image class="nav-icon" src="/static/message.png" mode="aspectFit" @click="onIconClick('通知')" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.custom-nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 88px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
background-color: #ffffff;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.nav-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
width: 270rpx;
|
||||
height: 810rpx;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.nav-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.nav-subtitle {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user