1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <view
- v-if="show" class="empty-content" :style="{
- paddingTop: paddingTop + 'rpx',
- background
- }"
- >
- <image :src="iconUrl" />
- <p class="tips">
- <slot>
- 暂无数据~
- </slot>
- </p>
- </view>
- </template>
- <script>
- export default {
- name: 'Empty',
- props: {
- show: {
- type: Boolean,
- default: false
- },
- paddingTop: {
- type: Number,
- default: () => 500
- },
- background: {
- type: String,
- default: () => '#f8f8f8'
- },
- iconUrl: {
- type: String,
- default: () => require('../../static/images/origin/searchEmpty.png')
- }
- },
- data() {
- return {}
- },
- computed: {
- },
- methods: {}
- }
- </script>
- <style
- lang="scss"
- scoped
- >
- .empty-content {
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- image {
- width: 150rpx;
- height: 150rpx;
- }
- .tips {
- margin-top: 25rpx;
- font-weight: bolder;
- }
- }
- </style>
|