mirror of
https://github.com/veops/cmdb.git
synced 2025-09-07 22:07:02 +08:00
feat(ui): tree views - add page initialization loading
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :style="{ marginBottom: '-24px' }">
|
<div :style="{ marginBottom: '-24px' }">
|
||||||
<div v-if="!subscribeTreeViewCiTypesLoading && subscribeTreeViewCiTypes.length === 0">
|
<div v-if="subscribeTreeViewCiTypesLoading" class="page-loading">
|
||||||
|
<a-spin size="large" />
|
||||||
|
</div>
|
||||||
|
<div v-else-if="subscribeTreeViewCiTypes.length === 0">
|
||||||
<a-alert banner>
|
<a-alert banner>
|
||||||
<template #message>
|
<template #message>
|
||||||
<span>{{ $t('cmdb.preference.tips1') }}</span>
|
<span>{{ $t('cmdb.preference.tips1') }}</span>
|
||||||
@@ -638,7 +641,11 @@ export default {
|
|||||||
},
|
},
|
||||||
columnDrop() {
|
columnDrop() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const xTable = this.$refs.xTable.getVxetableRef()
|
const xTable = this.$refs?.xTable?.getVxetableRef?.()
|
||||||
|
if (!xTable) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.sortable = Sortable.create(
|
this.sortable = Sortable.create(
|
||||||
xTable.$el.querySelector('.body--wrapper>.vxe-table--header .vxe-header--row'),
|
xTable.$el.querySelector('.body--wrapper>.vxe-table--header .vxe-header--row'),
|
||||||
{
|
{
|
||||||
@@ -1015,6 +1022,11 @@ export default {
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import '../index.less';
|
@import '../index.less';
|
||||||
|
.page-loading {
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
.tree-views {
|
.tree-views {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - 32px);
|
||||||
|
Reference in New Issue
Block a user