refactor: use global event bus for drawer trigger, polish UI components
- Replace local component emit chain with global event emitter for drawer visibility control - Update drawer component styling: set fixed width, fix header layout and title text - Replace uni-icons with van-icons in MineSetting component - Adjust ChatTopNavBar: use settings icon, update button size and position - Clean up unused event handlers and scoped styles in home page
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="flex h-[100dvh] flex-col relative overflow-hidden">
|
||||
<div class="flex h-dvh flex-col relative overflow-hidden">
|
||||
<!-- 顶部自定义导航栏 -->
|
||||
<div class="absolute top-0 left-0 w-full z-10">
|
||||
<ChatTopNavBar ref="topNavBarRef" :mainPageDataModel="mainPageDataModel" @showDrawer="handleShowDrawer" />
|
||||
<ChatTopNavBar ref="topNavBarRef" :mainPageDataModel="mainPageDataModel" />
|
||||
</div>
|
||||
|
||||
<div class="relative">
|
||||
@@ -130,6 +130,7 @@
|
||||
|
||||
<script setup>
|
||||
import { onMounted, nextTick, onUnmounted, ref } from "vue";
|
||||
import { emitter } from '@/utils/events'
|
||||
import { MessageRole, MessageType, CompName, Command } from "@/constants/ChatModel";
|
||||
|
||||
import Welcome from "../Welcome/index.vue";
|
||||
@@ -249,10 +250,6 @@ const handleChange = (i) => {
|
||||
console.log("切换:", i);
|
||||
};
|
||||
|
||||
const handleShowDrawer = () => {
|
||||
emit("showDrawer");
|
||||
};
|
||||
|
||||
/// =============事件函数↓================
|
||||
const handleTouchEnd = () => {
|
||||
clearTimeout(holdKeyboardTimer.value);
|
||||
|
||||
Reference in New Issue
Block a user