提交 8481fec9 authored 作者: junjie's avatar junjie

feat(frontend):弹框选择数据集增加loading

上级 58299c74
<template> <template>
<el-col ref="container" style="width: 100%;height:100%"> <el-col ref="container" v-loading="dataLoading" style="width: 100%;height:100%">
<span>{{ table.name }}</span> <span>{{ table.name }}</span>
<ux-grid <ux-grid
ref="plxTable" ref="plxTable"
...@@ -43,7 +43,8 @@ export default { ...@@ -43,7 +43,8 @@ export default {
return { return {
fields: [], fields: [],
data: [], data: [],
height: 'auto' height: 'auto',
dataLoading: false
} }
}, },
watch: { watch: {
...@@ -64,6 +65,7 @@ export default { ...@@ -64,6 +65,7 @@ export default {
initData() { initData() {
this.resetData() this.resetData()
if (this.table.id) { if (this.table.id) {
this.dataLoading = true
this.table.row = 100 this.table.row = 100
post('/dataset/table/getPreviewData/1/100', this.table).then(response => { post('/dataset/table/getPreviewData/1/100', this.table).then(response => {
this.fields = response.data.fields this.fields = response.data.fields
...@@ -76,6 +78,9 @@ export default { ...@@ -76,6 +78,9 @@ export default {
this.$error(response.data.msg, 3000) this.$error(response.data.msg, 3000)
} }
this.$refs.plxTable.reloadData(datas) this.$refs.plxTable.reloadData(datas)
this.dataLoading = false
}).catch(res => {
this.dataLoading = false
}) })
} }
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论