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

Commit2098b44

Browse files
stop overriding dynamic styles
1 parent55bd8f5 commit2098b44

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

‎client/packages/lowcoder/src/comps/comps/textComp.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ let TextTmpComp = (function () {
150150
};
151151
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
152152
constvalue=props.text.value;
153-
154-
useMergeCompStyles(
155-
propsasRecord<string,any>,
156-
dispatch
157-
);
153+
154+
//useMergeCompStyles(
155+
// props as Record<string, any>,
156+
// dispatch
157+
//);
158158

159159
return(
160160
<TextContainer

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { UICompType, uiCompRegistry } from "../uiCompRegistry";
3333
import{getNpmPackageMeta}from"../utils/remote";
3434
import{compPluginsList}from"constants/compPluginConstants";
3535
importSelectfrom"antd/es/select";
36+
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
3637

3738
exporttypeNewChildren<ChildrenCompMapextendsRecord<string,Comp<unknown>>>=
3839
ChildrenCompMap&{
@@ -281,6 +282,7 @@ function UIView(props: {
281282
}){
282283
constcomp=props.comp;
283284
constchildrenProps=childrenToProps(comp.children);
285+
constchildrenJsonProps=comp.toJsonValue();
284286
constparentDisabled=useContext(DisabledContext);
285287
constdisabled=childrenProps['disabled'];
286288
if(disabled!==undefined&&typeofdisabled==='boolean'){
@@ -296,6 +298,11 @@ function UIView(props: {
296298
}
297299
//END ADD BY FRED
298300

301+
useMergeCompStyles(
302+
childrenJsonPropsasRecord<string,any>,
303+
comp.dispatch
304+
);
305+
299306
// render condition for modal and drawer as we are not getting compType here
300307
if(comp.children.hasOwnProperty('showMask')&&comp.children.hasOwnProperty('maskClosable')){
301308
return(

‎client/packages/lowcoder/src/pages/setting/theme/ThemeCompPanel.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ export const ThemeCompPanel = (props: any) => {
199199

200200
if(newComp){
201201
constcompChildrens=newComp.children;
202-
letstyleChildrenKeys=Object.keys(compChildrens).filter(child=>child.toLowerCase().endsWith('style'));
202+
letstyleChildrenKeys=Object.keys(compChildrens).filter(child=>child.toLowerCase().endsWith('style'||'styles'));
203203
letstyleChildrens:Record<string,any>={};
204204
styleChildrenKeys.forEach((childKey:string)=>{
205205
styleChildrens[childKey]=compChildrens[childKey];
206206
})
207207
if(compChildrens.container){
208-
styleChildrenKeys=Object.keys(compChildrens.container.children).filter(child=>child.toLowerCase().endsWith('style'));
208+
styleChildrenKeys=Object.keys(compChildrens.container.children).filter(child=>child.toLowerCase().endsWith('style'||'styles'));
209209
styleChildrenKeys.forEach((childKey:string)=>{
210210
styleChildrens[childKey]=compChildrens.container.children[childKey];
211211
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp