1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <div class="empty-container">
- <div class="empty-content-position">
- <el-image :src="require('@/assets/images/empty.png')"></el-image>
- <div class="empty-main">
- <slot name="default">{{ defaultTip }}</slot>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { Image } from 'element-ui'
- export default {
- name: 'empty',
- components: {
- [Image.name]: Image
- },
- data () {
- return {
- defaultTip: '这里什么也没有'
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .empty-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- flex: 1;
- padding: 16px;
- box-sizing: border-box;
- .empty-content-position {
- display: flex;
- align-items: center;
- flex-direction: column;
- justify-content: center;
- }
- .mt50 {
- margin-top: -50px;
- }
- .empty-main {
- @extend .empty-content-position;
- margin-top: 10px;
- text-align: center;
- color: #999;
- font-size: 14px;
- line-height: 22px;
- }
- .el-image {
- width: 160px;
- height: 160px;
- }
- }
- </style>
|