| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <view class="jnpf-empty" :style="{'z-index':zIndex}">
- <view class="u-flex-col jnpf-empty-inner">
- <image :src="getImageUrl" class="jnpf-empty-inner-img"></image>
- <text class="jnpf-empty-inner-text">{{description||$t('common.noData')}}</text>
- </view>
- </view>
- </template>
- <script>
- import resources from '@/libs/resources'
- export default {
- name: 'jnpf-empty',
- props: {
- zIndex: {
- type: [String, Number],
- default: 999
- },
- image: {
- type: String,
- default: ''
- },
- description: {
- type: String,
- default: ''
- },
- },
- data() {
- return {
- icon: resources.message.nodata,
- }
- },
- computed: {
- getImageUrl() {
- return this.image || this.icon
- }
- }
- }
- </script>
- <style lang="scss">
- .jnpf-empty {
- display: flex;
- justify-content: center;
- align-items: center;
- .jnpf-empty-inner {
- width: 154px;
- height: 170px;
- align-items: center;
- .jnpf-empty-inner-text {
- padding: 30rpx 0;
- color: #909399;
- }
- .jnpf-empty-inner-img {
- width: 100%;
- height: 100%;
- }
- }
- }
- </style>
|