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

Commit1a24bef

Browse files
added header options in openApi data source in query editor
1 parent7a26dc6 commit1a24bef

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { ControlParams, ControlType } from "comps/controls/controlParams";
3131
importMarkdownTooltipfrom"lowcoder-design/src/components/MarkdownTooltip";
3232
import{KeyValueControlParams,keyValueListControl}from"comps/controls/keyValueControl";
3333
import{VariablesControl}from"../httpQuery/graphqlQuery";
34+
import{HttpHeaderPropertyView}from"../httpQuery/httpQueryConstants";
3435

3536
functionwrapConfig<CPextends{}=ControlParams>(
3637
paramsControl:ControlType,
@@ -144,18 +145,21 @@ function ActionSelectView(props: ActionSelectViewProps) {
144145
);
145146
}
146147

147-
functionunionConfigToComp(config:QueryConfig):CompConstructor{
148-
constchildrenMap:Record<string,CompConstructor>={};
148+
exportfunctionunionConfigToComp(config:QueryConfig):CompConstructor{
149+
constchildrenMap:Record<string,CompConstructor>={
150+
};
149151
config.actions.forEach((child)=>{
150152
childrenMap[child.actionName]=configToComp(child.params);
151153
});
152154

153155
constTmpComp=withTypeAndChildrenAbstract(
154156
childrenMap,
155157
config.actions[0].actionName,
156-
{},
158+
{
159+
headers:withDefault(keyValueListControl(),[{key:"",value:""}]),
160+
},
157161
"actionName",
158-
"action"
162+
"action",
159163
);
160164

161165
returnclassextendsTmpComp{
@@ -171,6 +175,14 @@ function unionConfigToComp(config: QueryConfig): CompConstructor {
171175
currentActionName={currentActionName}
172176
onActionChange={(value)=>this.dispatchChangeAndPreserveAction({actionName:value})}
173177
/>
178+
{/* Headers */}
179+
<QueryConfigWrapper>
180+
<QueryConfigLabel>Headers</QueryConfigLabel>
181+
<QueryConfigItemWrapper>
182+
{this.children.headers.propertyView({keyFlexBasics:184,valueFlexBasics:232})}
183+
</QueryConfigItemWrapper>
184+
</QueryConfigWrapper>
185+
174186
{this.children.action.getPropertyView()}
175187
</>
176188
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp