resolver-egretimp-plus 0.0.66 → 0.0.67
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/package.json
CHANGED
|
@@ -72,6 +72,19 @@ export default {
|
|
|
72
72
|
return normalColumnConfig(config)
|
|
73
73
|
})
|
|
74
74
|
})
|
|
75
|
+
const isFrontPage = computed(() => {
|
|
76
|
+
return props.config?.frontPageFlag === '1'
|
|
77
|
+
})
|
|
78
|
+
const normalPageTotal = computed(() => {
|
|
79
|
+
return !isFrontPage.value ? page.total : ((props.refValue.value || [])?.length || 0)
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
const normalTableData = computed(() => {
|
|
83
|
+
return !isFrontPage.value ?
|
|
84
|
+
(props.refValue.value || []) :
|
|
85
|
+
(props.refValue.value || []).slice((page.pageNum - 1) * page.pageSize, page.pageNum * page.pageSize)
|
|
86
|
+
})
|
|
87
|
+
|
|
75
88
|
/** 自定义排序逻辑 ===start==== */
|
|
76
89
|
const sortObj = ref(null)
|
|
77
90
|
// "ascending", "descending", null
|
|
@@ -96,11 +109,10 @@ export default {
|
|
|
96
109
|
})
|
|
97
110
|
|
|
98
111
|
const tableData = computed(() => {
|
|
99
|
-
return sortObj.value ? sortTable.value :
|
|
112
|
+
return sortObj.value ? sortTable.value : normalTableData.value
|
|
100
113
|
})
|
|
101
114
|
/** 自定义排序逻辑 ===end==== */
|
|
102
115
|
|
|
103
|
-
|
|
104
116
|
// 获取表格列的属性配置
|
|
105
117
|
const getTableColumnProps = (config, idx) => {
|
|
106
118
|
const nextList = tableColumnConfigs.value.slice(idx + 1)
|
|
@@ -457,7 +469,7 @@ export default {
|
|
|
457
469
|
{
|
|
458
470
|
pageable.value ?
|
|
459
471
|
<div class="pagination-wrap" style={{'justify-content': pageAlignEnmu[pageAlign.value || PAGE_RIGHT]}}>
|
|
460
|
-
<ElPagination { ...paginationProps.value } {...pagenationEvents} v-model:current-page={page.pageNum} v-model:page-size={page.pageSize} total={
|
|
472
|
+
<ElPagination { ...paginationProps.value } {...pagenationEvents} v-model:current-page={page.pageNum} v-model:page-size={page.pageSize} total={normalPageTotal.value}></ElPagination>
|
|
461
473
|
</div>
|
|
462
474
|
: null
|
|
463
475
|
}
|