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

Commit39b92aa

Browse files
author
FalkWolsky
committed
Supressed editDSL actions - as we have pure viewer
1 parent647d7f4 commit39b92aa

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

‎viewer/packages/lowcoder/src/comps/generators/uiCompBuilder.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function HidableView(props: {
4444
</>
4545
);
4646
}
47-
}
47+
}
4848

4949
exportfunctionuiChildren<
5050
ChildrenCompMapextendsRecord<string,Comp<unknown>>,
@@ -87,6 +87,13 @@ export class UICompBuilder<
8787
this.viewFn=viewFn;
8888
}
8989

90+
// TODO: Kagayaki - we need to check, how can we "remove" setPropertyViewFn - but keep the support for the component plugins (npmLoader) (remote-comp)
91+
setPropertyViewFn(
92+
propertyViewFn:any
93+
){
94+
returntrue;
95+
}
96+
9097
setExposeStateConfigs(
9198
configs:ExposingConfig<ChildrenToComp<ChildrenCompMap>>[]
9299
){

‎viewer/packages/lowcoder/src/comps/utils/useCompInstance.tsx‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,20 @@ export function getCompContainer<T extends CompConstructor>(params: GetContainer
204204
// 1ms
205205
constreduceFn=wrapWithPromiseHandling((act:CompAction)=>{
206206
letaction=act;
207-
if(reduceContext&&reduceContext.readOnly&&action.editDSL){
207+
208+
/* if (reduceContext && reduceContext.readOnly && action.editDSL) {
208209
log.info("editDSL should be false in view mode, action: ", action);
209-
action={ ...action,editDSL:false};
210-
}
210+
//action = { ...action, editDSL: false };
211+
} */
211212

212213
// console.info("~~ action: ", action);
213214
tmpComp=reduceContext
214215
?reduceInContext(reduceContext,()=>tmpComp.reduce(action))
215216
:tmpComp.reduce(action);
216-
actions.push(action);
217+
218+
if(reduceContext&&!reduceContext.readOnly&&!action.editDSL){
219+
actions.push(action);
220+
}
217221

218222
// record the time of the first calm down
219223
if(!this.appCalmDowned){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp