resolver-egretimp-plus 0.0.65 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -50,9 +50,8 @@
50
50
  "vue-style-loader": "^4.1.3",
51
51
  "vue3-quill": "^0.3.1",
52
52
  "webpack": "^5.90.0",
53
- "webpack-cli": "^5.1.4"
54
- },
55
- "dependencies": {
53
+ "webpack-cli": "^5.1.4",
56
54
  "vue3-sfc-loader": "^0.9.5"
57
- }
55
+ },
56
+ "dependencies": {}
58
57
  }
@@ -117,9 +117,6 @@ export default {
117
117
  const componentProps = ref({})
118
118
  if (typeof props.component === 'function') {
119
119
  props.component()?.then(res => {
120
- if (props.config.isCustomComp) {
121
- debugger
122
- }
123
120
  const obj = {}
124
121
  if (res?.default?.emits) {
125
122
  initVmodels(res?.default?.emits)
@@ -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 : (props.refValue.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={page.total}></ElPagination>
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
  }
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",
@@ -52,8 +52,8 @@ export function useBuildInData(messageTipInstance, loadingInstance) {
52
52
  }
53
53
  buildInRequest(QUERY_PAGE_CONFIG_DATA, reqData).then(ret => {
54
54
  if (resultToast(ret.data, messageTipInstance, { noSuccessIip: true })) {
55
- pageConfig.value = normalPageConfigs(mock)
56
- // pageConfig.value = normalPageConfigs(ret.data.result)
55
+ // pageConfig.value = normalPageConfigs(mock)
56
+ pageConfig.value = normalPageConfigs(ret.data.result)
57
57
  cb(pageConfig.value)
58
58
  getSelects(ret.data.result?.pmBusinessIdentityVO?.tenantId)
59
59
  return
@@ -238,3 +238,7 @@ export const META_TYPE_MAP = {
238
238
  'cmi-table': 'CustomComponentTableH5',
239
239
  'cmi-datetime': 'CmiDatetimePicker',
240
240
  }
241
+
242
+ export {
243
+ commonPropsType as componentPropsType
244
+ }
File without changes