feat backNav搭建
This commit is contained in:
@@ -1,13 +1,28 @@
|
||||
<script setup lang="ts">
|
||||
function onIconClick(name: string) {
|
||||
console.log(`点击了${name}图标`)
|
||||
if (name === '通知') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/message/index',
|
||||
})
|
||||
}
|
||||
else if (name === '设置') {
|
||||
// 处理设置
|
||||
console.log(`点击了${name}图标`)
|
||||
}
|
||||
else if (name === '蓝牙') {
|
||||
// 处理蓝牙
|
||||
console.log(`点击了${name}图标`)
|
||||
}
|
||||
else {
|
||||
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')" />
|
||||
<image class="nav-logo" src="/static/logo.png" mode="aspectFit" @tap="onIconClick('logo')" />
|
||||
<view class="nav-info">
|
||||
<text class="nav-title">
|
||||
G6高速改扩建测试测试项目
|
||||
@@ -18,9 +33,9 @@ function onIconClick(name: string) {
|
||||
</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('通知')" />
|
||||
<image class="nav-icon" src="/static/seting.png" mode="aspectFit" @tap="onIconClick('设置')" />
|
||||
<image class="nav-icon" src="/static/Bluetooth.png" mode="aspectFit" @tap="onIconClick('蓝牙')" />
|
||||
<image class="nav-icon" src="/static/message.png" mode="aspectFit" @tap="onIconClick('通知')" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user