添加emptyFile样式
This commit is contained in:
parent
a1e02bc765
commit
7b89e0bee8
BIN
src/assets/img/emptyfile_intro.png
Normal file
BIN
src/assets/img/emptyfile_intro.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/img/pic_sharing_empty.png
Normal file
BIN
src/assets/img/pic_sharing_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
79
src/components/EmptyFile/index.vue
Normal file
79
src/components/EmptyFile/index.vue
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="share-empty">
|
||||||
|
<div class="share-empty-icon">
|
||||||
|
<img v-if="emptyShare" src="~@/assets/img/pic_sharing_empty.png" ref="image" style="max-width: 100%;" alt="">
|
||||||
|
<img v-if="!emptyShare" src="~@/assets/img/emptyfile_intro.png" ref="image" style="max-width: 100%;" alt="">
|
||||||
|
</div>
|
||||||
|
<p class="share-empty-status">
|
||||||
|
{{emptyStatus}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'EmptyFile',
|
||||||
|
props: {
|
||||||
|
emptyImgUrl: {
|
||||||
|
type: String,
|
||||||
|
default: '~@/assets/img/widget-img.jpeg'
|
||||||
|
},
|
||||||
|
emptyStatus:{
|
||||||
|
type: String,
|
||||||
|
default: '空空如也~'
|
||||||
|
},
|
||||||
|
emptyShare: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// sourceImg: this.emptyImgUrl,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
sourceImg(){
|
||||||
|
return '~@/assets/img/widget-img.jpeg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
min-height: calc(100vh - 50px);
|
||||||
|
}
|
||||||
|
.share-empty {
|
||||||
|
height: 30%;
|
||||||
|
width: 50%;
|
||||||
|
color: #6e6e6e;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin: -15% 0 0 -25%;
|
||||||
|
}
|
||||||
|
.share-empty-icon {
|
||||||
|
width: 268px;
|
||||||
|
margin: 0 auto;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.share-empty-status {
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 40px;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
.share-empty-text {
|
||||||
|
padding-top: 20px;
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@ -131,7 +131,7 @@
|
|||||||
|
|
||||||
<!--list布局-->
|
<!--list布局-->
|
||||||
<el-table
|
<el-table
|
||||||
v-show="!grid"
|
v-show="!grid && this.fileList.length > 0"
|
||||||
ref="fileListTable"
|
ref="fileListTable"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
:max-height="clientHeight"
|
:max-height="clientHeight"
|
||||||
@ -268,7 +268,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!--grid布局-->
|
<!--grid布局-->
|
||||||
<div v-show="grid" v-loading="tableLoading"
|
<div v-show="grid && this.fileList.length > 0" v-loading="tableLoading"
|
||||||
element-loading-text="文件加载中"
|
element-loading-text="文件加载中"
|
||||||
element-loading-spinner="el-icon-loading"
|
element-loading-spinner="el-icon-loading"
|
||||||
element-loading-background="#f6f7fa88">
|
element-loading-background="#f6f7fa88">
|
||||||
@ -313,6 +313,11 @@
|
|||||||
</van-checkbox-group>
|
</van-checkbox-group>
|
||||||
<el-divider class="grid-divider" content-position="center"><i class="el-icon-folder-opened"></i> {{summaries}}</el-divider>
|
<el-divider class="grid-divider" content-position="center"><i class="el-icon-folder-opened"></i> {{summaries}}</el-divider>
|
||||||
</div>
|
</div>
|
||||||
|
<empty-file
|
||||||
|
v-if="this.fileList.length < 1"
|
||||||
|
:emptyStatus="emptyStatus"
|
||||||
|
>
|
||||||
|
</empty-file>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
background
|
background
|
||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
@ -340,13 +345,17 @@
|
|||||||
import api from '@/api/upload-api'
|
import api from '@/api/upload-api'
|
||||||
import BreadcrumbFilePath from "@/components/Breadcrumb/BreadcrumbFilePath";
|
import BreadcrumbFilePath from "@/components/Breadcrumb/BreadcrumbFilePath";
|
||||||
import IconFile from "@/components/Icon/IconFile";
|
import IconFile from "@/components/Icon/IconFile";
|
||||||
|
import EmptyFile from "@/components/EmptyFile";
|
||||||
import Clipboard from 'clipboard';
|
import Clipboard from 'clipboard';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ShowFile',
|
name: 'ShowFile',
|
||||||
components: { IconFile, BreadcrumbFilePath,
|
components: { IconFile, BreadcrumbFilePath,EmptyFile},
|
||||||
},
|
|
||||||
props: {
|
props: {
|
||||||
|
emptyStatus: {
|
||||||
|
'type': String,
|
||||||
|
'default': '空空如也~',
|
||||||
|
},
|
||||||
singleFileType: {
|
singleFileType: {
|
||||||
'type': String,
|
'type': String,
|
||||||
'default': '',
|
'default': '',
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
queryFileType="audio"
|
queryFileType="audio"
|
||||||
:orderCustom="true"
|
:orderCustom="true"
|
||||||
singleFileType="音乐"
|
singleFileType="音乐"
|
||||||
|
emptyStatus="还没有音乐呢~"
|
||||||
></show-file>
|
></show-file>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<show-file
|
<show-file
|
||||||
queryFileType="document"
|
queryFileType="document"
|
||||||
:orderCustom="true"
|
:orderCustom="true"
|
||||||
|
emptyStatus="还没有文档呢~"
|
||||||
>
|
>
|
||||||
</show-file>
|
</show-file>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<show-file
|
<show-file
|
||||||
queryFileType="image"
|
queryFileType="image"
|
||||||
:orderCustom="true"
|
:orderCustom="true"
|
||||||
|
emptyStatus="还没有图片呢~"
|
||||||
>
|
>
|
||||||
</show-file>
|
</show-file>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<show-file
|
<show-file
|
||||||
queryFileType="video"
|
queryFileType="video"
|
||||||
:orderCustom="true"
|
:orderCustom="true"
|
||||||
|
emptyStatus="还没有视频文件呢~"
|
||||||
>
|
>
|
||||||
</show-file>
|
</show-file>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user