Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17d38c1

Browse files
update varibles usage in query comp
1 parentd3e06ba commit17d38c1

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

‎client/packages/lowcoder/src/comps/queries/queryComp.tsx‎

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import {
3737
FetchCheckNode,
3838
FetchInfo,
3939
fromRecord,
40-
fromValue,
4140
isCustomAction,
4241
MultiBaseComp,
4342
multiChangeAction,
@@ -369,7 +368,7 @@ QueryCompTmp = class extends QueryCompTmp {
369368
}
370369
if(action.type===CompActionTypes.EXECUTE_QUERY){
371370
if(getReduceContext().disableUpdateState)returnthis;
372-
if(!action.args)action.args=this.children.variables.toJsonValue().filter(kv=>kv.key).reduce((acc,curr)=>Object.assign(acc,{[curr.keyasstring]:curr.value}),{});
371+
action.args=action.args||{};
373372
action.args.$queryName=this.children.name.getView();
374373

375374
returnthis.executeQuery(action);
@@ -711,25 +710,18 @@ class QueryListComp extends QueryListTmpComp implements BottomResListComp {
711710
}
712711

713712
nameAndExposingInfo():NameAndExposingInfo{
714-
constresult:NameAndExposingInfo={};
713+
letresult:NameAndExposingInfo={};
715714
Object.values(this.children).forEach((comp)=>{
716715
result[comp.children.name.getView()]=comp.exposingInfo();
717716

718-
constvariables=comp.children.variables.toJsonValue();
719-
variables.forEach((variable:Record<string,any>)=>{
720-
result[variable.key]={
721-
property:fromRecord({
722-
value:fromValue(variable.value),
723-
}),
724-
propertyValue:{
725-
value:variable.value,
726-
},
727-
propertyDesc:{},
728-
methods:{},
729-
};
730-
})
717+
constvariables=comp.children.variables.nameAndExposingInfo();
718+
if(variables){
719+
result={
720+
...result,
721+
...variables,
722+
}
723+
}
731724
});
732-
733725
returnresult;
734726
}
735727

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp