perf(手机端): 资料中心结构树添加loading

This commit is contained in:
zyn
2023-12-01 16:51:28 +08:00
parent c44ba54cc7
commit 7575cbbfae
2 changed files with 8 additions and 2 deletions
@@ -4,7 +4,8 @@
:style="{ height: '100%', width: '90%' }"
round
:close-on-click-overlay="false"
@click-overlay="handleCancel">
@click-overlay="handleCancel"
get-container="body">
<h3 class="popup-title">
<span>体系结构</span>
<van-icon name="cross" size="22px" @click="handleCancel" />
@@ -18,6 +18,7 @@
<span style="font-size:18px"> {{ node.label }} </span>
</span>
</el-tree>
<loading :loading="loading">加载中...</loading>
</div>
</template>
@@ -31,7 +32,8 @@ export default {
label: 'name',
children: 'children'
},
currentKey: ''
currentKey: '',
loading: false
}
},
created () {
@@ -39,10 +41,13 @@ export default {
},
methods: {
getTreeData () {
this.loading = true
this.$http._getData('fileMaterialCenter/zlTree').then(res => {
if (res.ok && res.data) {
this.treeList = res.data
}
}).finally(() => {
this.loading = false
})
},
filterNode (value, data) {