resolver-egretimp-plus 0.0.78 → 0.0.79
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 +2 -2
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/index.jsx +5 -3
- package/src/utils/common.js +8 -2
- package/src/utils/valid.js +0 -2
package/package.json
CHANGED
package/src/index.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { provide, toRef, watch, computed, ref, defineExpose, reactive, getCurrentInstance } from "vue"
|
|
1
|
+
import { provide, toRef, watch, computed, ref, defineExpose, reactive, getCurrentInstance, toRaw } from "vue"
|
|
2
2
|
import Renderer from './renderer.jsx'
|
|
3
3
|
// import './style/index.scss'
|
|
4
4
|
import { usePageConfig } from './hooks/pageConfig'
|
|
@@ -169,7 +169,8 @@ export default {
|
|
|
169
169
|
reqData: props.loadEvnetsReq,
|
|
170
170
|
respCb: (result) => {
|
|
171
171
|
nativeDataLoad.value = true
|
|
172
|
-
|
|
172
|
+
const val = deepMerge(props.modelValue, result, 'replace')
|
|
173
|
+
emit('update:modelValue', val)
|
|
173
174
|
emit('loadEvnetsCompleted', result)
|
|
174
175
|
}
|
|
175
176
|
}
|
|
@@ -198,7 +199,8 @@ export default {
|
|
|
198
199
|
reqData: props.loadEvnetsReq,
|
|
199
200
|
respCb: (result) => {
|
|
200
201
|
nativeDataLoad.value = true
|
|
201
|
-
|
|
202
|
+
const val = deepMerge(props.modelValue, result, 'replace')
|
|
203
|
+
emit('update:modelValue', val)
|
|
202
204
|
emit('loadEvnetsCompleted', result)
|
|
203
205
|
}
|
|
204
206
|
}
|
package/src/utils/common.js
CHANGED
|
@@ -168,7 +168,13 @@ export function deepMerge(
|
|
|
168
168
|
if (!source) {
|
|
169
169
|
return target;
|
|
170
170
|
}
|
|
171
|
-
let ret = mergeWith(
|
|
171
|
+
let ret = mergeWith(source, target, (sourceValue, targetValue) => {
|
|
172
|
+
if (!targetValue) {
|
|
173
|
+
return sourceValue
|
|
174
|
+
}
|
|
175
|
+
if (!sourceValue) {
|
|
176
|
+
return targetValue
|
|
177
|
+
}
|
|
172
178
|
if (isArray(targetValue) && isArray(sourceValue)) {
|
|
173
179
|
switch (mergeArrays) {
|
|
174
180
|
case 'union':
|
|
@@ -186,7 +192,7 @@ export function deepMerge(
|
|
|
186
192
|
if (isPlainObject(targetValue) && isPlainObject(sourceValue)) {
|
|
187
193
|
return deepMerge(sourceValue, targetValue, mergeArrays);
|
|
188
194
|
}
|
|
189
|
-
return
|
|
195
|
+
return targetValue;
|
|
190
196
|
});
|
|
191
197
|
if (Array.isArray(source)) {
|
|
192
198
|
if (ret && !Array.isArray(ret)) {
|
package/src/utils/valid.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
export function toValidate(formRef, cb, dynamicMapComp) {
|
|
2
2
|
if (!cb) {
|
|
3
3
|
return formRef.value && formRef.value.validate().catch(err => {
|
|
4
|
-
debugger
|
|
5
4
|
validFailAction(err, dynamicMapComp)
|
|
6
5
|
return Promise.reject(err)
|
|
7
6
|
})
|
|
8
7
|
}
|
|
9
8
|
return formRef.value && formRef.value.validate((valid, errInfo) => {
|
|
10
|
-
debugger
|
|
11
9
|
errInfo && validFailAction(errInfo, dynamicMapComp)
|
|
12
10
|
cb && cb(valid, errInfo)
|
|
13
11
|
})
|