resolver-egretimp-plus 0.0.237 → 0.0.239
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/dist/const/index.js +1 -1
- package/dist/h5/index.js +1 -1
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/components/childDialog/src/index.vue +8 -0
- package/src/components/packages-web/CustomComponentTable.jsx +19 -11
- package/src/hooks/index.js +5 -1
- package/src/utils/common.js +4 -1
- package/src/utils/const.js +1 -1
- package/src/utils/defaultVal.js +3 -2
package/package.json
CHANGED
|
@@ -89,6 +89,9 @@ const dialogProps = computed(() => {
|
|
|
89
89
|
if (props.dialogProps?.titleEn && props.lang?.indexOf('zh') == -1) {
|
|
90
90
|
ret.title = props.dialogProps?.titleEn
|
|
91
91
|
}
|
|
92
|
+
if (!ret.title) {
|
|
93
|
+
ret['headerClass'] = ret['headerClass'] ? `${ret['headerClass']} hidden-head` : 'hidden-head'
|
|
94
|
+
}
|
|
92
95
|
return ret
|
|
93
96
|
})
|
|
94
97
|
|
|
@@ -159,5 +162,10 @@ defineExpose({
|
|
|
159
162
|
.el-dialog__header {
|
|
160
163
|
min-height: 40px;
|
|
161
164
|
}
|
|
165
|
+
.hidden-head {
|
|
166
|
+
& > .el-dialog__header {
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
162
170
|
}
|
|
163
171
|
</style>
|
|
@@ -14,7 +14,15 @@ export default {
|
|
|
14
14
|
...ElTable.props,
|
|
15
15
|
...ElPagination.props
|
|
16
16
|
},
|
|
17
|
-
setup(props, { expose, attrs }) {
|
|
17
|
+
setup(props, { expose, attrs, emit }) {
|
|
18
|
+
const modelValue = computed({
|
|
19
|
+
get() {
|
|
20
|
+
return props.modelValue
|
|
21
|
+
},
|
|
22
|
+
set(val) {
|
|
23
|
+
emit('update:modelValue', val)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
18
26
|
const tableProps = computed(() => {
|
|
19
27
|
const porpsObj = Object.keys(ElTable.props).reduce((ret, key) => {
|
|
20
28
|
if (props[key] !== undefined && props[key] !== null) {
|
|
@@ -91,13 +99,13 @@ export default {
|
|
|
91
99
|
return props.config?.frontPageFlag == '1'
|
|
92
100
|
})
|
|
93
101
|
const normalPageTotal = computed(() => {
|
|
94
|
-
return !isFrontPage.value ? page.total : ((
|
|
102
|
+
return !isFrontPage.value ? page.total : ((modelValue.value || [])?.length || 0)
|
|
95
103
|
})
|
|
96
104
|
|
|
97
105
|
const normalTableData = computed(() => {
|
|
98
106
|
return !isFrontPage.value ?
|
|
99
|
-
(
|
|
100
|
-
(
|
|
107
|
+
(modelValue.value || []) :
|
|
108
|
+
(modelValue.value || []).slice((page.pageNum - 1) * page.pageSize, page.pageNum * page.pageSize)
|
|
101
109
|
})
|
|
102
110
|
|
|
103
111
|
/** 自定义排序逻辑 ===start==== */
|
|
@@ -236,10 +244,10 @@ export default {
|
|
|
236
244
|
return tableData.value?.[idx]
|
|
237
245
|
}
|
|
238
246
|
const onUpdateModelValue = (val, idx) => {
|
|
239
|
-
if (!
|
|
240
|
-
|
|
247
|
+
if (!modelValue.value) {
|
|
248
|
+
modelValue.value = []
|
|
241
249
|
}
|
|
242
|
-
|
|
250
|
+
modelValue.value[idx] = val
|
|
243
251
|
}
|
|
244
252
|
|
|
245
253
|
const multiPmPageMetaList = computed(() => {
|
|
@@ -409,10 +417,10 @@ export default {
|
|
|
409
417
|
if (ret) {
|
|
410
418
|
if (isPromise(ret)) {
|
|
411
419
|
ret.then((res) => {
|
|
412
|
-
res && (
|
|
420
|
+
res && (modelValue.value = res)
|
|
413
421
|
})
|
|
414
422
|
} else {
|
|
415
|
-
|
|
423
|
+
modelValue.value = ret
|
|
416
424
|
}
|
|
417
425
|
}
|
|
418
426
|
})
|
|
@@ -423,10 +431,10 @@ export default {
|
|
|
423
431
|
if (ret) {
|
|
424
432
|
if (isPromise(ret)) {
|
|
425
433
|
ret.then((res) => {
|
|
426
|
-
res && (
|
|
434
|
+
res && (modelValue.value = res)
|
|
427
435
|
})
|
|
428
436
|
} else {
|
|
429
|
-
|
|
437
|
+
modelValue.value = ret
|
|
430
438
|
}
|
|
431
439
|
}
|
|
432
440
|
})
|
package/src/hooks/index.js
CHANGED
|
@@ -90,7 +90,11 @@ export function useVModel(config, props, emit, modelKey = 'update:modelValue') {
|
|
|
90
90
|
// 这边的值没有变,就不用出触发下面的其他动作了
|
|
91
91
|
return
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
try {
|
|
94
|
+
props.modelValue[metaCode] = val
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.log('config', config, metaCode)
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
if (config) {
|
|
96
100
|
setTimeout(() => {
|
package/src/utils/common.js
CHANGED
|
@@ -476,7 +476,10 @@ export function createEmptyCopy(source, cache = new WeakMap()) {
|
|
|
476
476
|
copy = {};
|
|
477
477
|
cache.set(source, copy);
|
|
478
478
|
for (const key of Object.keys(source)) {
|
|
479
|
-
|
|
479
|
+
const val = createEmptyCopy(source[key], cache)
|
|
480
|
+
if ( val !== null && val !== undefined) {
|
|
481
|
+
copy[key] = val
|
|
482
|
+
}
|
|
480
483
|
}
|
|
481
484
|
}
|
|
482
485
|
|
package/src/utils/const.js
CHANGED
package/src/utils/defaultVal.js
CHANGED
|
@@ -22,9 +22,10 @@ export default function defaultVal(config) {
|
|
|
22
22
|
defaultVal = configDefaultVal
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
console.log(`${config.dynamicHireRelat},${config.hireRelat} to set defaultValue, ${defaultVal}`)
|
|
26
|
+
config.refValue = defaultVal
|
|
25
27
|
} catch (error) {
|
|
26
|
-
console.log('set default val fail, config', config)
|
|
28
|
+
console.log('set default val fail, config', config, error)
|
|
27
29
|
}
|
|
28
|
-
config.refValue = defaultVal
|
|
29
30
|
}
|
|
30
31
|
}
|