index.vue 869 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="empty-view" :style="{ left: left }">
  3. <image :src="src" mode="aspectFit" class="empty-img"></image>
  4. <view class="empty-text">{{ text }}</view>
  5. <view v-if="!isLogin">
  6. <Login></Login>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import Login from '@/components/Login.vue';
  12. export default {
  13. components:{Login},
  14. computed:{
  15. isLogin() {
  16. return this.$store.state.hasLogin;
  17. },
  18. },
  19. props: {
  20. left: {
  21. type: String,
  22. default: '0'
  23. },
  24. text: {
  25. type: String,
  26. default: '没有数据哦~~'
  27. },
  28. src: {
  29. type: String,
  30. default: 'https://onlineimg.qianniao.vip/address.png'
  31. }
  32. }
  33. };
  34. </script>
  35. <style lang="scss">
  36. .empty-view {
  37. width: 100%;
  38. text-align: center;
  39. margin-top: 200upx;
  40. .empty-img {
  41. width: 200rpx;
  42. height: 200rpx;
  43. }
  44. .empty-text {
  45. font-size: 26upx;
  46. color: #999999;
  47. padding-top: 10rpx;
  48. }
  49. }
  50. </style>