【fix bug】导入导出加全局遮罩
This commit is contained in:
+24
-1
@@ -1,13 +1,16 @@
|
||||
<template>
|
||||
<a-config-provider :locale="locale">
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
<a-spin :spinning="isImporting || isExporting" :tip="tipText" class="port-spin">
|
||||
<router-view/>
|
||||
</a-spin>
|
||||
</div>
|
||||
</a-config-provider>
|
||||
</template>
|
||||
<script>
|
||||
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||
import enquireScreen from '@/utils/device'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
@@ -15,6 +18,21 @@ export default {
|
||||
locale: zhCN
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
isImporting: state => state.app.isImporting,
|
||||
isExporting: state => state.app.isExporting
|
||||
}),
|
||||
tipText () {
|
||||
if (this.isImporting) {
|
||||
return '正在导入,请稍候...'
|
||||
}
|
||||
if (this.isExporting) {
|
||||
return '正在导出,请稍候...'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
const that = this
|
||||
enquireScreen(deviceType => {
|
||||
@@ -37,4 +55,9 @@ export default {
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.port-spin > div > .ant-spin {
|
||||
height: 100vh!important;
|
||||
max-height: unset!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user