效果图:
子组件:
<template> <view class="nothing animated fadeIn"> <image src="../../static/common/nothing.png" mode="widthFix"></image> </view> </template> <script> </script> <style scoped> .nothing{ display: flex; justify-content: center; align-items: center; background-color: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 0; left: 0; } .nothing image{ width: 50%; } </style>
父组件: