完成首页3个tab页的移动端改造

This commit is contained in:
kron
2025-11-26 15:09:31 +08:00
parent aecd2cea61
commit 6830136957
21 changed files with 716 additions and 695 deletions
+2 -27
View File
@@ -10,56 +10,31 @@ const props = defineProps({
default: "#050b19",
},
});
const capsuleHeight = ref(0);
// onMounted(() => {
// const menuBtnInfo = uni.getMenuButtonBoundingClientRect();
// capsuleHeight.value = menuBtnInfo.top + 50 - 9;
// });
</script>
<template>
<view class="background" :style="{ backgroundColor: bgColor }">
<image
class="bg-image"
v-if="type === 2"
src="../static/app-bg3.png"
:style="{ height: capsuleHeight + 'px' }"
/>
<image class="bg-image" v-if="type === 2" src="../static/app-bg3.png" />
<image
class="bg-image"
v-if="type === 4"
src="../static/app-bg5.png"
mode="widthFix"
/>
<view class="bg-overlay" v-if="type === 0"></view>
</view>
</template>
<style scoped>
.background {
position: fixed;
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.bg-image {
width: 100%;
height: 100%;
}
.bg-overlay {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: linear-gradient(
to bottom,
rgba(26, 26, 26, 0.2),
rgba(0, 0, 0, 0.2)
);
}
</style>