12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <div class="empty-container mtb60">
- <div class="empty-content-position">
- <el-image :src="images"></el-image>
- <div class="empty-main">
- <slot name="default">{{ tip }}</slot>
- <slot name="button"></slot>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { Image } from 'element-ui'
- export default {
- name: 'empty',
- components: {
- [Image.name]: Image
- },
- props: {
- tip: {
- type: String,
- default: '这里什么也没有'
- },
- images: {
- type: String,
- default () {
- // return require('@/assets/images/empty.png')
- return require('@/assets/images/empty/jy-back.png')
- }
- }
- }
- }
- </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;
- &.mtb60 {
- margin: 60px auto;
- }
- .empty-content-position {
- display: flex;
- align-items: center;
- flex-direction: column;
- justify-content: center;
- }
- .mt50 {
- margin-top: -50px;
- }
- .empty-main {
- @extend .empty-content-position;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- margin-top: 13px;
- font-size: 14px;
- font-weight: 400;
- color: #999999;
- line-height: 22px;
- // 默认文字按钮组合样式
- span + button {
- margin-top: 32px;
- }
- ::v-deep.el-icon-plus {
- font-weight: bold;
- }
- .el-button [class*=el-icon-]+span {
- margin-left: 9px;
- }
- }
- .el-image {
- width: 200px;
- height: 200px;
- }
- }
- </style>
|