Files
YGChatCS/pages/chat/ChatTopNavBar.vue
2025-06-29 23:41:37 +08:00

37 lines
684 B
Vue

<template>
<view class="nav-bar">
<view class="nav-item" @click="openDrawer">
<image src="/static/drawer_icon.png" mode="aspectFit" class="nav-item-icon"></image>
</view>
</view>
</template>
<script setup>
import { defineEmits } from 'vue'
const emits = defineEmits(['openDrawer'])
const openDrawer = () => {
emits('openDrawer')
console.log('=============打开抽屉')
}
</script>
<style lang="scss" scoped>
.nav-bar {
display: flex;
align-items: center;
height: 44px;
padding: 0 15px;
.nav-item {
width: 24px;
height: 24px;
margin-right: 10px;
}
.nav-item-icon {
width: 100%;
height: 100%;
}
}
</style>