feat: 首页动画调整

This commit is contained in:
duanshuwen
2025-11-12 18:50:40 +08:00
parent 5cb3a903ff
commit b2ad6403c1
5 changed files with 65 additions and 24 deletions

View File

@@ -7,7 +7,8 @@
<!-- ChatTopWelcome不在可视区显示并添加动画在可视区隐藏 -->
<view
v-show="show"
:class="['ip w-32 h-32', { 'image-animated': show }]"
:class="['w-32 h-32', { 'image-animated': show }]"
:style="getStyle"
></view>
<text
v-show="show"
@@ -23,6 +24,7 @@
<script setup>
import { ref, defineProps, computed, defineExpose } from "vue";
import { getCurrentConfig } from "@/constant/base";
const props = defineProps({
mainPageDataModel: {
@@ -33,9 +35,19 @@ const props = defineProps({
const show = ref(false);
const logoImageUrl = computed(
() => props.mainPageDataModel.initPageImages?.logoImageUrl
);
const getStyle = computed(() => {
const config = getCurrentConfig();
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");