在App.vue中填写如下代码:
<script setup lang="ts">
export default {
name: 'App',
}
</script>
<template>
<div class="app-div">
</div>
</template>
<style lang="scss" scoped>
.app-div{
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-image: url('@/assets/img/xxx.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
</style>