mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-11 05:02:10 +08:00
fix: dependencies访问extendApi
This commit is contained in:
@@ -103,16 +103,17 @@ function resetValues() {
|
||||
function updateValues(
|
||||
values: Recordable<CollapsibleParamSchema['defaultValue']>,
|
||||
) {
|
||||
const newValue = {} as Recordable<CollapsibleParamSchema['defaultValue']>;
|
||||
const allowedKeys = new Set(props.params.map((param) => param.key));
|
||||
const patch = {} as Recordable<CollapsibleParamSchema['defaultValue']>;
|
||||
|
||||
for (const key in values) {
|
||||
if (!Object.hasOwn(values, key)) continue;
|
||||
if (!Object.hasOwn(modelValue.value, key)) continue;
|
||||
if (!allowedKeys.has(key)) continue;
|
||||
|
||||
newValue[key] = values[key];
|
||||
|
||||
modelValue.value = { ...modelValue.value, ...newValue };
|
||||
patch[key] = values[key];
|
||||
}
|
||||
|
||||
modelValue.value = { ...modelValue.value, ...patch };
|
||||
}
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user