feat: 首页动画调整
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user