resolver-egretimp-plus 0.0.66 → 0.0.68

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -72,6 +72,24 @@ export default {
72
72
  return normalColumnConfig(config)
73
73
  })
74
74
  })
75
+ const page = reactive({
76
+ pageNum: 1,
77
+ pageSize: 5,
78
+ total: 0,
79
+ })
80
+ const isFrontPage = computed(() => {
81
+ return props.config?.frontPageFlag === '1'
82
+ })
83
+ const normalPageTotal = computed(() => {
84
+ return !isFrontPage.value ? page.total : ((props.refValue.value || [])?.length || 0)
85
+ })
86
+
87
+ const normalTableData = computed(() => {
88
+ return !isFrontPage.value ?
89
+ (props.refValue.value || []) :
90
+ (props.refValue.value || []).slice((page.pageNum - 1) * page.pageSize, page.pageNum * page.pageSize)
91
+ })
92
+
75
93
  /** 自定义排序逻辑 ===start==== */
76
94
  const sortObj = ref(null)
77
95
  // "ascending", "descending", null
@@ -96,11 +114,10 @@ export default {
96
114
  })
97
115
 
98
116
  const tableData = computed(() => {
99
- return sortObj.value ? sortTable.value : (props.refValue.value || [])
117
+ return sortObj.value ? sortTable.value : normalTableData.value
100
118
  })
101
119
  /** 自定义排序逻辑 ===end==== */
102
120
 
103
-
104
121
  // 获取表格列的属性配置
105
122
  const getTableColumnProps = (config, idx) => {
106
123
  const nextList = tableColumnConfigs.value.slice(idx + 1)
@@ -337,11 +354,7 @@ export default {
337
354
  }
338
355
  return attrs
339
356
  })
340
- const page = reactive({
341
- pageNum: 1,
342
- pageSize: 5,
343
- total: 0,
344
- })
357
+
345
358
  // 页码变动
346
359
  watch(() => page.pageNum, (val) => {
347
360
  const fn = props.config?.currentChange
@@ -457,7 +470,7 @@ export default {
457
470
  {
458
471
  pageable.value ?
459
472
  <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={page.total}></ElPagination>
473
+ <ElPagination { ...paginationProps.value } {...pagenationEvents} v-model:current-page={page.pageNum} v-model:page-size={page.pageSize} total={normalPageTotal.value}></ElPagination>
461
474
  </div>
462
475
  : null
463
476
  }
@@ -361,7 +361,9 @@ const TabNav = defineComponent({
361
361
  }
362
362
  }}
363
363
  >
364
- {...[tabLabelContent, btnClose]}
364
+ <div title={tabLabelContent} class='tabs__item-wrap'>
365
+ {...[tabLabelContent, btnClose]}
366
+ </div>
365
367
  </div>
366
368
  )
367
369
  })
package/src/hooks/mock.js CHANGED
@@ -44,7 +44,7 @@ export default {
44
44
  {
45
45
  metaCode: 'testcomp',
46
46
  isCustomComp: true,
47
- url: '/LabelCustomAttach.js'
47
+ url: '/Demo.js'
48
48
  },
49
49
  {
50
50
  "createUserId": "100000000000040800",
@@ -79,4 +79,9 @@
79
79
  @include nestMargin
80
80
  }
81
81
  }
82
+ }
83
+ .tabs__item-wrap {
84
+ white-space: nowrap;
85
+ overflow: hidden;
86
+ text-overflow: ellipsis;
82
87
  }