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

Commitb20c196

Browse files
committed
Fixed MultiIcon styled issue
1 parentbc86b04 commitb20c196

File tree

8 files changed

+23
-24
lines changed

8 files changed

+23
-24
lines changed

‎client/packages/lowcoder/src/components/resultPanel/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { DarkActiveTextColor, GreyTextColor } from "../../constants/style";
99
import{defaultasAntdTable}from"antd/es/table";
1010
import{Switch}from"components/Switch";
1111
import{MultiIconDisplay}from"@lowcoder-ee/comps/comps/multiIconDisplay";
12-
import{CloseIcon,SuccessIcon}from"icons";
12+
import{CloseIcon,ErrorIcon,SuccessIcon}from"icons";
1313

1414
exportconstHeaderWrapper=styled.div`
1515
display: flex;
@@ -236,7 +236,7 @@ export function useResultPanel(params: BottomResCompResult & { onClose: () => vo
236236
header:(
237237
<>
238238
<HeaderTitle>
239-
<IconWrapper>{success ?<MultiIconDisplayidentifier={SuccessIcon}/> :<MultiIconDisplayidentifier="/icon:svg/ErrorIcon"/>}</IconWrapper>
239+
<IconWrapper>{success ?<MultiIconDisplayidentifier={SuccessIcon}/> :<MultiIconDisplayidentifier={ErrorIcon}/>}</IconWrapper>
240240
{title}
241241
{runTime ?(
242242
<TimeLabel>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ const appendStyleSuffix = (name: string) => {
5555

5656
// Multi icon Display Component
5757

58-
constbaseMultiIconDisplay:React.FC<any>=({identifier, width='24px', height='24px', style})=>{
58+
constbaseMultiIconDisplay:React.FC<any>=(props)=>{
59+
const{identifier, width, height, style, ...others}=props;
5960

6061
consticonData=parseIconIdentifier(identifier);
6162

@@ -84,7 +85,7 @@ const baseMultiIconDisplay: React.FC<any> = ({identifier, width = '24px', height
8485
style={{width, height, ...style,}}/>;
8586
}elseif(iconData.type==='customize'){
8687
constIcon=iconData.dataasReact.FC<any>;//TreeSelectCompIcon
87-
return<Suspensefallback={null}><Iconstyle={{width:width,height:height, ...style}}/></Suspense>;
88+
return<Suspensefallback={null}><Icon{...others}style={{width, height, ...style}}/></Suspense>;
8889
}else{
8990
returnnull;// Unknown type
9091
}

‎client/packages/lowcoder/src/comps/index-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ var uiCompMap: Registry = {
238238
enName:"Table",
239239
description:trans("uiComp.tableCompDesc"),
240240
categories:["dashboards","projectmanagement"],
241-
icon:MultiIcon("/icon:svg/TableCompIcon"),
241+
icon:MultiIcon(TableCompIcon),
242242
keywords:trans("uiComp.tableCompKeywords"),
243243
comp:TableComp,
244244
layoutInfo:{

‎client/packages/lowcoder/src/pages/ApplicationV2/MarketplaceResCard.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ const MONTH_MILLIS = 30 * 24 * 60 * 60 * 1000;
147147
exportfunctionMarketplaceResCard(props:{res:HomeRes;}){
148148
const{ res}=props;
149149

150-
console.log(res);
151-
152150
constsubTitle=trans("home.resCardSubTitle",{time:timestampToHumanReadable(res.lastModifyTime,MONTH_MILLIS),creator:res.creator});
153151

154152
constresInfo=HomeResInfo[res.type];

‎client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ export default function ApplicationHome() {
211211
text:<TabLabel>{trans("home.profile")}</TabLabel>,
212212
routePath:USER_PROFILE_URL,
213213
routeComp:UserProfileView,
214-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={UserIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/UserIcon"{...otherProps}width={"24px"}/>,
214+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={UserIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={UserIcon}{...otherProps}width={"24px"}/>,
215215
},
216216
{
217217
text:<TabLabel>{trans("home.news")}</TabLabel>,
218218
routePath:NEWS_URL,
219219
routeComp:NewsView,
220-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={NewsIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/NewsIcon"{...otherProps}width={"24px"}/>,
220+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={NewsIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={NewsIcon}{...otherProps}width={"24px"}/>,
221221
visible:({ user})=>user.orgDev,
222222
style:{color:"red"},
223223
},
@@ -226,15 +226,15 @@ export default function ApplicationHome() {
226226
routePath:ORG_HOME_URL,
227227
routePathExact:false,
228228
routeComp:OrgView,
229-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={WorkspacesIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/WorkspacesIcon"{...otherProps}width={"24px"}/>,
229+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={WorkspacesIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={WorkspacesIcon}{...otherProps}width={"24px"}/>,
230230
visible:({ user})=>!user.orgDev,
231231
},
232232
{
233233
text:<TabLabel>{trans("home.marketplace")}</TabLabel>,
234234
routePath:MARKETPLACE_URL,
235235
routePathExact:false,
236236
routeComp:MarketplaceView,
237-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={MarketplaceIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/MarketplaceIcon"{...otherProps}width={"24px"}/>,
237+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={MarketplaceIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={MarketplaceIcon}{...otherProps}width={"24px"}/>,
238238
},
239239
]
240240
},
@@ -245,13 +245,13 @@ export default function ApplicationHome() {
245245
text:<MoreFoldersWrapper>{trans("home.allFolders")}</MoreFoldersWrapper>,
246246
routePath:FOLDERS_URL,
247247
routeComp:RootFolderListView,
248-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={FolderIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/FolderIcon"{...otherProps}width={"24px"}/>,
248+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={FolderIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={FolderIcon}{...otherProps}width={"24px"}/>,
249249
},
250250
{
251251
text:<TabLabel>{trans("home.allApplications")}</TabLabel>,
252252
routePath:ALL_APPLICATIONS_URL,
253253
routeComp:HomeView,
254-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={AppsIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/AppsIcon"{...otherProps}width={"24px"}/>,
254+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={AppsIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={AppsIcon}{...otherProps}width={"24px"}/>,
255255
},
256256
],
257257
},
@@ -263,15 +263,15 @@ export default function ApplicationHome() {
263263
text:<TabLabel>{trans("home.queryLibrary")}</TabLabel>,
264264
routePath:QUERY_LIBRARY_URL,
265265
routeComp:QueryLibraryEditor,
266-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={HomeQueryLibraryIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/HomeQueryLibraryIcon"{...otherProps}width={"24px"}/>,
266+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={HomeQueryLibraryIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={HomeQueryLibraryIcon}{...otherProps}width={"24px"}/>,
267267
visible:({ user})=>user.orgDev,
268268
},
269269
{
270270
text:<TabLabel>{trans("home.datasource")}</TabLabel>,
271271
routePath:DATASOURCE_URL,
272272
routePathExact:false,
273273
routeComp:DatasourceHome,
274-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={HomeDataSourceIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/HomeDataSourceIcon"{...otherProps}width={"24px"}/>,
274+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={HomeDataSourceIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={HomeDataSourceIcon}{...otherProps}width={"24px"}/>,
275275
visible:({ user})=>user.orgDev,
276276
onSelected:(_,currentPath)=>currentPath.split("/")[1]==="datasource",
277277
},
@@ -284,7 +284,7 @@ export default function ApplicationHome() {
284284
routePath:"/ee/6600ae8724a23f365ba2ed4c/admin",
285285
routePathExact:false,
286286
routeComp:AppEditor,
287-
icon:({ selected, ...otherProps})=>selected ?(<MultiIconDisplayidentifier={EnterpriseIcon}{...otherProps}width={"24px"}/>) :(<MultiIconDisplayidentifier="/icon:svg/EnterpriseIcon"{...otherProps}width={"24px"}/>),
287+
icon:({ selected, ...otherProps})=>selected ?(<MultiIconDisplayidentifier={EnterpriseIcon}{...otherProps}width={"24px"}/>) :(<MultiIconDisplayidentifier={EnterpriseIcon}{...otherProps}width={"24px"}/>),
288288
visible:({ user})=>user.orgDev,
289289
},
290290
],
@@ -309,7 +309,7 @@ export default function ApplicationHome() {
309309
routePath:SETTING_URL,
310310
routePathExact:false,
311311
routeComp:Setting,
312-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={HomeSettingIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/HomeSettingIcon"{...otherProps}width={"24px"}/>,
312+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={HomeSettingIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={HomeSettingIcon}{...otherProps}width={"24px"}/>,
313313
visible:({ user})=>user.orgDev,
314314
onSelected:(_,currentPath)=>currentPath.split("/")[1]==="setting",
315315
}
@@ -322,7 +322,7 @@ export default function ApplicationHome() {
322322
text:<TabLabel>{trans("home.trash")}</TabLabel>,
323323
routePath:TRASH_URL,
324324
routeComp:TrashView,
325-
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={RecyclerIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier="/icon:svg/RecyclerIcon"{...otherProps}width={"24px"}/>,
325+
icon:({ selected, ...otherProps})=>selected ?<MultiIconDisplayidentifier={RecyclerIcon}{...otherProps}width={"24px"}/> :<MultiIconDisplayidentifier={RecyclerIcon}{...otherProps}width={"24px"}/>,
326326
visible:({ user})=>user.orgDev,
327327
},
328328
],

‎client/packages/lowcoder/src/pages/editor/LeftContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
ScrollBar,
99
Tooltip,
1010
UnShow,
11-
TacoButton,LeftClose,LeftCommon,FoldedIcon,
11+
TacoButton,LeftClose,LeftCommon,FoldedIcon,UnfoldIcon,
1212
}from"lowcoder-design";
1313
importReact,{ReactNode,useCallback,useContext,useMemo,useState}from"react";
1414
import{hookCompCategory}from"comps/hooks/hookCompTypes";
@@ -493,7 +493,7 @@ export const LeftContent = (props: LeftContentProps) => {
493493
</div>
494494
)}
495495
switcherIcon={(props:any)=>
496-
props.expanded ?<MultiIconDisplayidentifier={FoldedIcon}/> :<MultiIconDisplayidentifier="/icon:svg/UnfoldIcon"/>
496+
props.expanded ?<MultiIconDisplayidentifier={FoldedIcon}/> :<MultiIconDisplayidentifier={UnfoldIcon}/>
497497
}
498498
expandedKeys={expandedKeys}
499499
onExpand={(keys)=>setExpandedKeys(keys)}

‎client/packages/lowcoder/src/pages/editor/LeftLayersContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{CompInfo,EditorContext}from"comps/editorState";
22
import{
33
BaseSection,FoldedIcon,LeftCommon,LeftShow,
4-
ScrollBar,
4+
ScrollBar,UnfoldIcon,
55
}from"lowcoder-design";
66
importReact,{useCallback,useContext,useMemo,useState,useEffect,useRef}from"react";
77
import_,{get,set}from"lodash";
@@ -524,7 +524,7 @@ export const LeftLayersContent = (props: LeftLayersContentProps) => {
524524
{CompStateIcon[props.typeasUICompType]||<MultiIconDisplayidentifier={LeftCommon}/>}
525525
</div>
526526
)}
527-
switcherIcon={(props:any)=>props.expanded ?<MultiIconDisplayidentifier={FoldedIcon}/> :<MultiIconDisplayidentifier="/icon:svg/UnfoldIcon"/>}
527+
switcherIcon={(props:any)=>props.expanded ?<MultiIconDisplayidentifier={FoldedIcon}/> :<MultiIconDisplayidentifier={UnfoldIcon}/>}
528528
expandedKeys={expandedKeys}
529529
onExpand={(keys)=>setExpandedKeys(keys)}
530530
titleRender={(nodeData)=>getTreeNode(nodeDataasNodeItem,uiCompInfos)}

‎client/packages/lowcoder/src/pages/editor/codeEditorPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { CompNameContext } from "../../comps/editorState";
1010
import{isEmpty}from"lodash";
1111
import{trans}from"i18n";
1212
import{MultiIcon,MultiIconDisplay}from"@lowcoder-ee/comps/comps/multiIconDisplay";
13-
import{CodeEditorCloseIcon,CodeEditorPinnedIcon,CodeEditorUnPinnedIcon,DragIcon}from"icons";
13+
import{CodeEditorCloseIcon,CodeEditorOpenIcon,CodeEditorPinnedIcon,CodeEditorUnPinnedIcon,DragIcon}from"icons";
1414

1515
constWrapper=styled.div`
1616
max-width: 60vw;
@@ -218,7 +218,7 @@ export const CodeEditorPanel = (props: {
218218
)}
219219
>
220220
<OpenButtonclassName={"code-editor-panel-open-button"}onClick={()=>setVisible(true)}>
221-
<MultiIconDisplayidentifier={"/icon:svg/CodeEditorOpenIcon"}/>
221+
<MultiIconDisplayidentifier={CodeEditorOpenIcon}/>
222222
</OpenButton>
223223
</Trigger>
224224
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp