41 lines
670 B
Vue
41 lines
670 B
Vue
<script setup>
|
|
import { ref, onMounted } from "vue";
|
|
const props = defineProps({
|
|
type: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
bgColor: {
|
|
type: String,
|
|
default: "#050b19",
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<view class="background" :style="{ backgroundColor: bgColor }">
|
|
<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>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.background {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: fixed;
|
|
left: 0;
|
|
top: 0;
|
|
z-index: -1;
|
|
}
|
|
.bg-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|