resolver-egretimp-plus 0.0.138 → 0.0.140
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/h5/index.js +1 -1
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/form.scss +1 -0
- package/dist/web/index.js +1 -1
- package/package.json +1 -1
- package/src/components/packages-web/CustomComponentTable.jsx +5 -2
- package/src/hooks/index.js +16 -3
- package/src/theme/element/components/form.scss +1 -0
- package/src/utils/common.js +21 -29
package/package.json
CHANGED
|
@@ -144,6 +144,9 @@ export default {
|
|
|
144
144
|
}
|
|
145
145
|
return ret
|
|
146
146
|
}, {})
|
|
147
|
+
if (config.showOverflowTooltip == '1' || config['show-overflow-tooltip'] == '1') {
|
|
148
|
+
props['show-overflow-tooltip'] = true
|
|
149
|
+
}
|
|
147
150
|
if (!props.prop) {
|
|
148
151
|
props.prop = config.metaCode
|
|
149
152
|
}
|
|
@@ -162,8 +165,8 @@ export default {
|
|
|
162
165
|
}
|
|
163
166
|
if (
|
|
164
167
|
isPlainColumn({...config, isColumn: true}, calcDisable(config, props.mode)) &&
|
|
165
|
-
config.showOverflowTooltip
|
|
166
|
-
config['show-overflow-tooltip']
|
|
168
|
+
config.showOverflowTooltip == '0' &&
|
|
169
|
+
config['show-overflow-tooltip'] == '0'
|
|
167
170
|
) {
|
|
168
171
|
props['show-overflow-tooltip'] = true
|
|
169
172
|
}
|
package/src/hooks/index.js
CHANGED
|
@@ -64,13 +64,26 @@ export function useVModel(config, props, emit, modelKey = 'update:modelValue') {
|
|
|
64
64
|
const metaCode = metaCodeKey
|
|
65
65
|
if (!metaCode) return
|
|
66
66
|
if (!modelValue) {
|
|
67
|
+
// frameSet 表示的是一帧之内重复设置对应metaCode的值
|
|
68
|
+
// 一帧之内重复设置metaCode的值需要进行merge,也就是下面modelValueDeepMerge走的逻辑
|
|
69
|
+
//(
|
|
70
|
+
// 原因是因为一帧之后重复设置,如果不走merge,会出现val值直接覆盖原本对应的metaCode的值,
|
|
71
|
+
// 这个在正常情况下没什么问题,但是如果刚开始根数据对应的层级对应出现断层为空,在进行emit(update:modelValue)进行赋值之后
|
|
72
|
+
// 并不能立即更新到对应的props.modelValue下面去,所以会出现 同时通过config.refValue设置同层级,并且是根数据断层的情况下;会出现覆盖
|
|
73
|
+
// )
|
|
74
|
+
config.parent && (config.parent.frameSet = true)
|
|
75
|
+
nextTick(() => {
|
|
76
|
+
config.parent && (config.parent.frameSet = false)
|
|
77
|
+
})
|
|
67
78
|
emit('update:modelValue', {
|
|
68
79
|
[metaCode]: val
|
|
69
80
|
})
|
|
70
81
|
} else {
|
|
71
|
-
if (
|
|
72
|
-
if (
|
|
73
|
-
|
|
82
|
+
if (config?.frameSet) {
|
|
83
|
+
if (modelValue?.[metaCode]) {
|
|
84
|
+
if (typeof modelValue[metaCode] === 'object' || typeof val === 'object') {
|
|
85
|
+
val = modelValueDeepMerge(modelValue[metaCode], val)
|
|
86
|
+
}
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
if (isNonRefType(modelValue[metaCode]) && isNonRefType(val) && modelValue[metaCode] === val) {
|
package/src/utils/common.js
CHANGED
|
@@ -214,37 +214,29 @@ export function modelValueDeepMerge(
|
|
|
214
214
|
source,
|
|
215
215
|
target,
|
|
216
216
|
) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
let idx = 0
|
|
233
|
-
for(;idx < sourceValue.length && idx < targetValue.length; i ++) {
|
|
234
|
-
ret.push(modelValueDeepMerge[sourceValue[idx], targetValue[idx]])
|
|
217
|
+
let ret = target
|
|
218
|
+
if (typeof source === 'object' && typeof target === 'object') {
|
|
219
|
+
ret = mergeWith(source, target, (sourceValue, targetValue) => {
|
|
220
|
+
if (isArray(sourceValue) && isArray(targetValue)) {
|
|
221
|
+
const ret = []
|
|
222
|
+
let idx = 0
|
|
223
|
+
for(;idx < sourceValue.length && idx < targetValue.length; i ++) {
|
|
224
|
+
ret.push(modelValueDeepMerge[sourceValue[idx], targetValue[idx]])
|
|
225
|
+
}
|
|
226
|
+
if (idx < sourceValue.length) {
|
|
227
|
+
ret.push(...sourceValue.slice(idx))
|
|
228
|
+
} else {
|
|
229
|
+
ret.push(...targetValue.slice(idx))
|
|
230
|
+
}
|
|
231
|
+
return ret
|
|
235
232
|
}
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
} else {
|
|
239
|
-
ret.push(...targetValue.slice(idx))
|
|
233
|
+
if (isPlainObject(targetValue) && isPlainObject(sourceValue)) {
|
|
234
|
+
return modelValueDeepMerge(sourceValue, targetValue);
|
|
240
235
|
}
|
|
241
|
-
return
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
return targetValue;
|
|
247
|
-
});
|
|
236
|
+
return targetValue;
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
248
240
|
if (Array.isArray(source)) {
|
|
249
241
|
if (ret && !Array.isArray(ret)) {
|
|
250
242
|
let arr = []
|