@leevan/jtui 2.0.44 → 2.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/tableTest/table-ptbg.vue +11 -2
- package/examples/tableTest/tree-table.vue +3 -2
- package/lib/jtui.common.js +34 -25
- package/lib/jtui.css +1 -1
- package/lib/jtui.umd.js +34 -25
- package/lib/jtui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/jt-table/index.vue +45 -30
package/package.json
CHANGED
|
@@ -4,13 +4,22 @@
|
|
|
4
4
|
:class="isWrap ? 'isWrap' : ''"
|
|
5
5
|
style="position: absolute; top: 1px; left: 1px; right: 1px; bottom: 1px"
|
|
6
6
|
>
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
<div style="position: relative" v-if="isTool">
|
|
9
9
|
<vxe-toolbar
|
|
10
10
|
class="jt-toolbar"
|
|
11
11
|
:custom="{ icon: 'jtIcon iconpeizhi41 colStyle' }"
|
|
12
12
|
></vxe-toolbar>
|
|
13
13
|
</div>
|
|
14
|
+
<div style="width:100%;height:100%;position: relative;">
|
|
15
|
+
<div class="cus-empty-box" v-if="isShowEmpty">
|
|
16
|
+
<el-empty :image-size="200">
|
|
17
|
+
<template #description>
|
|
18
|
+
<p style="font-size:30px">暂无数据</p>
|
|
19
|
+
</template>
|
|
20
|
+
</el-empty>
|
|
21
|
+
</div>
|
|
22
|
+
<!-- 普通表格 -->
|
|
14
23
|
<vxe-table
|
|
15
24
|
class="jt-table-class-only"
|
|
16
25
|
height="auto"
|
|
@@ -22,6 +31,7 @@
|
|
|
22
31
|
highlight-current-row
|
|
23
32
|
highlight-current-column
|
|
24
33
|
keep-source
|
|
34
|
+
empty-text=" "
|
|
25
35
|
v-if="tableType === 'default'"
|
|
26
36
|
:id="id"
|
|
27
37
|
:ref="id"
|
|
@@ -190,14 +200,7 @@
|
|
|
190
200
|
</template>
|
|
191
201
|
</template>
|
|
192
202
|
</vxe-table-column>
|
|
193
|
-
|
|
194
|
-
<el-empty :image-size="200">
|
|
195
|
-
<template #description>
|
|
196
|
-
<p style="font-size:30px">暂无数据</p>
|
|
197
|
-
</template>
|
|
198
|
-
</el-empty>
|
|
199
|
-
</template>
|
|
200
|
-
</vxe-table>
|
|
203
|
+
</vxe-table>
|
|
201
204
|
<!-- 大数据 -->
|
|
202
205
|
<vxe-table
|
|
203
206
|
class="jt-table-class-only"
|
|
@@ -210,6 +213,7 @@
|
|
|
210
213
|
highlight-current-row
|
|
211
214
|
highlight-current-column
|
|
212
215
|
keep-source
|
|
216
|
+
empty-text=" "
|
|
213
217
|
v-if="tableType === 'bigData'"
|
|
214
218
|
:header-cell-class-name="headerClass"
|
|
215
219
|
:id="id"
|
|
@@ -365,13 +369,6 @@
|
|
|
365
369
|
</template>
|
|
366
370
|
</template>
|
|
367
371
|
</vxe-table-column>
|
|
368
|
-
<template #empty>
|
|
369
|
-
<el-empty :image-size="200">
|
|
370
|
-
<template #description>
|
|
371
|
-
<p style="font-size:30px">暂无数据</p>
|
|
372
|
-
</template>
|
|
373
|
-
</el-empty>
|
|
374
|
-
</template>
|
|
375
372
|
</vxe-table>
|
|
376
373
|
<!-- 分组表格 -->
|
|
377
374
|
<vxe-table
|
|
@@ -379,6 +376,7 @@
|
|
|
379
376
|
class="jt-table-class-only"
|
|
380
377
|
:id="id"
|
|
381
378
|
:ref="id"
|
|
379
|
+
empty-text=" "
|
|
382
380
|
v-if="tableType === 'group'"
|
|
383
381
|
:custom-config="{ storage: true, checkMethod: checkColumnMethod }"
|
|
384
382
|
:border="border"
|
|
@@ -512,13 +510,6 @@
|
|
|
512
510
|
</template>
|
|
513
511
|
</template>
|
|
514
512
|
</vxe-table-column>
|
|
515
|
-
<template #empty>
|
|
516
|
-
<el-empty :image-size="200">
|
|
517
|
-
<template #description>
|
|
518
|
-
<p style="font-size:30px">暂无数据</p>
|
|
519
|
-
</template>
|
|
520
|
-
</el-empty>
|
|
521
|
-
</template>
|
|
522
513
|
</vxe-table>
|
|
523
514
|
<!-- 树形表格 and 树 -->
|
|
524
515
|
<vxe-table
|
|
@@ -528,6 +519,7 @@
|
|
|
528
519
|
:ref="id"
|
|
529
520
|
:stripe="stripe"
|
|
530
521
|
:show-header="treeTypeConfig.type == 'treeTable'"
|
|
522
|
+
empty-text=" "
|
|
531
523
|
v-if="tableType === 'tree'"
|
|
532
524
|
:max-height="maxHeight"
|
|
533
525
|
:border="border"
|
|
@@ -767,14 +759,8 @@
|
|
|
767
759
|
</template>
|
|
768
760
|
</template>
|
|
769
761
|
</vxe-table-column>
|
|
770
|
-
<template #empty>
|
|
771
|
-
<el-empty :image-size="200">
|
|
772
|
-
<template #description>
|
|
773
|
-
<p style="font-size:30px">暂无数据</p>
|
|
774
|
-
</template>
|
|
775
|
-
</el-empty>
|
|
776
|
-
</template>
|
|
777
762
|
</vxe-table>
|
|
763
|
+
</div>
|
|
778
764
|
</div>
|
|
779
765
|
</template>
|
|
780
766
|
|
|
@@ -981,8 +967,30 @@ export default {
|
|
|
981
967
|
default: null
|
|
982
968
|
}
|
|
983
969
|
},
|
|
970
|
+
watch:{
|
|
971
|
+
loading:{
|
|
972
|
+
deep:true,
|
|
973
|
+
handler(n){
|
|
974
|
+
if(this.$refs[this.id]){
|
|
975
|
+
const temp = this.$refs[this.id].getTableData()
|
|
976
|
+
if(temp.fullData.length > 0){
|
|
977
|
+
this.isShowEmpty = false
|
|
978
|
+
}else{
|
|
979
|
+
if(n){
|
|
980
|
+
this.isShowEmpty = false
|
|
981
|
+
}else{
|
|
982
|
+
this.isShowEmpty = true
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}else{
|
|
986
|
+
this.isShowEmpty = false
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
},
|
|
984
991
|
data() {
|
|
985
992
|
return {
|
|
993
|
+
isShowEmpty:false,
|
|
986
994
|
tableData: this.data.DataArray, //表格数据
|
|
987
995
|
headerClass: (this.data.retjson.header || []).find(i => (i.children || []).length) ? 'has-sub-header' : 'normal-header',
|
|
988
996
|
colNum: 0, //当前列的数量
|
|
@@ -1753,4 +1761,11 @@ export default {
|
|
|
1753
1761
|
.vxe-table--render-default .vxe-body--column{
|
|
1754
1762
|
line-height:normal !important;
|
|
1755
1763
|
}
|
|
1764
|
+
.cus-empty-box{
|
|
1765
|
+
position: absolute;
|
|
1766
|
+
top:50%;
|
|
1767
|
+
left:50%;
|
|
1768
|
+
transform: translate(-50%,-50%);
|
|
1769
|
+
z-index:999;
|
|
1770
|
+
}
|
|
1756
1771
|
</style>
|