2025-05-10 16:57:36 +08:00
|
|
|
<script setup>
|
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
type: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const bgs = ref(["../static/app-bg.png", "../static/app-bg2.png"]);
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-05-01 16:17:51 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="background">
|
2025-05-10 16:57:36 +08:00
|
|
|
<image class="bg-image" :src="bgs[type]" mode="aspectFill" />
|
|
|
|
|
<view class="bg-overlay" v-if="type === 0"></view>
|
2025-05-01 16:17:51 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.background {
|
|
|
|
|
position: fixed;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
2025-05-01 16:36:24 +08:00
|
|
|
z-index: -1;
|
2025-05-01 16:17:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bg-image {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bg-overlay {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
2025-05-10 16:57:36 +08:00
|
|
|
background: linear-gradient(
|
|
|
|
|
to bottom,
|
|
|
|
|
rgba(26, 26, 26, 0.8),
|
|
|
|
|
rgba(0, 0, 0, 0.8)
|
|
|
|
|
);
|
2025-05-01 16:17:51 +08:00
|
|
|
}
|
2025-05-10 16:57:36 +08:00
|
|
|
</style>
|