Files
YGChatCS/src/pages/index/components/chat/ChatTopNavBar/index.vue
2025-11-13 17:54:35 +08:00

61 lines
1.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="border-box h-44 flex flex-items-center pl-12 pr-12">
<uni-icons type="bars" size="24" color="#333" @click="showDrawer" />
<!-- 隐藏 -->
<view class="flex-full h-full flex flex-items-center flex-justify-center">
<!-- ChatTopWelcome不在可视区显示并添加动画在可视区隐藏 -->
<view
v-show="show"
:class="['w-32 h-32', { 'image-animated': show }]"
:style="getStyle"
></view>
<text
v-show="show"
:class="[
'font-size-14 font-500 color-171717 ml-10',
{ 'text-animated': show },
]"
>
{{ config.name }}
</text>
</view>
<view class="w-24 h-24"></view>
</view>
</template>
<script setup>
import { ref, defineProps, computed, defineExpose } from "vue";
import { getCurrentConfig } from "@/constant/base";
const props = defineProps({
mainPageDataModel: {
type: Object,
default: () => ({}),
},
});
const show = ref(false);
const config = getCurrentConfig();
const getStyle = computed(() => {
return {
"--ipSmallImageStep": config.ipSmallImageStep,
"--ipSmallImageHeight": config.ipSmallImageHeight,
"--ipSmallTime": config.ipSmallTime,
backgroundImage: `url(${config.ipSmallImage})`,
backgroundRepeat: "no-repeat",
backgroundSize: "32px auto",
backgroundPosition: "0 0",
};
});
const showDrawer = () => uni.$emit("SHOW_DRAWER");
defineExpose({ show });
</script>
<style lang="scss" scoped>
@import "./styles/index.scss";
</style>