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

Commit7998c85

Browse files
authored
Merge branch 'dev' into feat/Layout-Mode
2 parents0e2a9fd +5dd8d32 commit7998c85

File tree

26 files changed

+432
-200
lines changed

26 files changed

+432
-200
lines changed
Lines changed: 1 addition & 0 deletions
Loading

‎client/packages/lowcoder-design/src/icons/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,5 @@ export { ReactComponent as CommentIcon } from "icons/icon-comment-comp.svg";
297297
export{ReactComponentasMentionIcon}from"icons/icon-mention-comp.svg";
298298
export{ReactComponentasAutoCompleteCompIcon}from"icons/icon-autocomplete-comp.svg";
299299
export{ReactComponentasWidthIcon}from"icons/icon-width.svg";
300-
export{ReactComponentasResponsiveLayoutCompIcon}from"icons/icon-responsive-layout-comp.svg";
300+
export{ReactComponentasResponsiveLayoutCompIcon}from"icons/icon-responsive-layout-comp.svg";
301+
export{ReactComponentasTextSizeIcon}from"./icon-text-size.svg";

‎client/packages/lowcoder/src/api/commonSettingApi.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface ThemeDetail {
4747
margin?:string;
4848
padding?:string;
4949
gridColumns?:string;//Added By Aqib Mirza
50+
textSize?:string;
5051
}
5152

5253
exportfunctiongetThemeDetailName(key:keyofThemeDetail){
@@ -70,6 +71,8 @@ export function getThemeDetailName(key: keyof ThemeDetail) {
7071
//Added By Aqib Mirza
7172
case"gridColumns":
7273
returntrans("themeDetail.gridColumns");
74+
case"textSize":
75+
returntrans("style.textSize");
7376
}
7477
return"";
7578
}
@@ -84,6 +87,7 @@ export function isThemeColorKey(key: string) {
8487
case"margin":
8588
case"padding":
8689
case"gridColumns"://Added By Aqib Mirza
90+
case"textSize":
8791
returntrue;
8892
}
8993
returnfalse;

‎client/packages/lowcoder/src/api/userApi.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ interface FormLoginRequest extends CommonLoginParam {
2929
password:string;
3030
register:boolean;
3131
authId?:string;
32+
orgId?:string;
3233
}
3334

3435
exportinterfaceGetUserResponseextendsApiResponse{

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ class ResponsiveLayoutImplComp extends ResponsiveLayoutBaseComp implements ICont
287287
},
288288
}asCompAction;
289289
}
290-
if(value.type==="delete"&&columns.length<=1){
290+
const{ path}=action;
291+
if(value.type==="delete"&&path[0]==='columns'&&columns.length<=1){
291292
messageInstance.warning(trans("responsiveLayout.atLeastOneColumnError"));
292293
// at least one column
293294
returnthis;

‎client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx‎

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import{BoolControl}from"comps/controls/boolControl";
2-
import{NumberControl,StringControl}from"comps/controls/codeControl";
2+
import{ColorOrBoolCodeControl,NumberControl,RadiusControl,StringControl}from"comps/controls/codeControl";
33
import{dropdownControl,HorizontalAlignmentControl}from"comps/controls/dropdownControl";
4-
import{MultiCompBuilder,stateComp,valueComp}from"comps/generators";
4+
import{MultiCompBuilder,stateComp,valueComp,withContext,withDefault}from"comps/generators";
55
import{withSelectedMultiContext}from"comps/generators/withSelectedMultiContext";
66
import{genRandomKey}from"comps/utils/idGenerator";
77
import{trans}from"i18n";
88
import_from"lodash";
99
import{
1010
changeChildAction,
1111
changeValueAction,
12+
CompAction,
13+
CompActionTypes,
1214
ConstructorToComp,
1315
ConstructorToDataType,
1416
ConstructorToNodeType,
@@ -19,8 +21,11 @@ import {
1921
withFunction,
2022
wrapChildAction,
2123
}from"lowcoder-core";
22-
import{AlignClose,AlignLeft,AlignRight}from"lowcoder-design";
24+
import{AlignClose,AlignLeft,AlignRight,IconRadius,TextSizeIcon,controlItem}from"lowcoder-design";
2325
import{ColumnTypeComp,ColumnTypeCompMap}from"./columnTypeComp";
26+
import{ColorControl}from"comps/controls/colorControl";
27+
import{JSONValue}from"util/jsonTypes";
28+
importstyledfrom"styled-components";
2429

2530
exporttypeRender=ReturnType<ConstructorToComp<typeofRenderComp>["getOriginalComp"]>;
2631
exportconstRenderComp=withSelectedMultiContext(ColumnTypeComp);
@@ -51,6 +56,31 @@ const columnFixOptions = [
5156
},
5257
]asconst;
5358

59+
constcellColorLabel=trans("table.cellColor");
60+
constCellColorTempComp=withContext(
61+
newMultiCompBuilder({color:ColorOrBoolCodeControl},(props)=>props.color)
62+
.setPropertyViewFn((children)=>
63+
children.color.propertyView({
64+
label:cellColorLabel,
65+
tooltip:trans("table.cellColorDesc"),
66+
})
67+
)
68+
.build(),
69+
["currentCell"]asconst
70+
);
71+
72+
//@ts-ignore
73+
exportclassCellColorCompextendsCellColorTempComp{
74+
overridegetPropertyView(){
75+
returncontrolItem({filterText:cellColorLabel},super.getPropertyView());
76+
}
77+
}
78+
79+
// fixme, should be infer from RowColorComp, but withContext type incorrect
80+
exporttypeCellColorViewType=(param:{
81+
currentCell:JSONValue|undefined;//number | string;
82+
})=>string;
83+
5484
exportconstcolumnChildrenMap={
5585
// column title
5686
title:StringControl,
@@ -67,8 +97,19 @@ export const columnChildrenMap = {
6797
tempHide:stateComp<boolean>(false),
6898
fixed:dropdownControl(columnFixOptions,"close"),
6999
editable:BoolControl,
100+
background:withDefault(ColorControl,""),
101+
text:withDefault(ColorControl,""),
102+
border:withDefault(ColorControl,""),
103+
borderWidth:withDefault(RadiusControl,""),
104+
radius:withDefault(RadiusControl,""),
105+
textSize:withDefault(RadiusControl,""),
106+
cellColor:CellColorComp,
70107
};
71108

109+
constStyledIcon=styled.span`
110+
margin: 0 4px 0 14px;
111+
`;
112+
72113
/**
73114
* export for test.
74115
* Put it here temporarily to avoid circular dependencies
@@ -90,6 +131,21 @@ const ColumnInitComp = new MultiCompBuilder(columnChildrenMap, (props, dispatch)
90131
.build();
91132

92133
exportclassColumnCompextendsColumnInitComp{
134+
overridereduce(action:CompAction){
135+
letcomp=super.reduce(action);
136+
if(action.type===CompActionTypes.UPDATE_NODES_V2){
137+
comp=comp.setChild(
138+
"cellColor",
139+
comp.children.cellColor.reduce(
140+
CellColorComp.changeContextDataAction({
141+
currentCell:undefined,
142+
})
143+
)
144+
);
145+
}
146+
returncomp;
147+
}
148+
93149
overridegetView(){
94150
constsuperView=super.getView();
95151
constcolumnType=this.children.render.getSelectedComp().getComp().children.compType.getView();
@@ -143,6 +199,36 @@ export class ColumnComp extends ColumnInitComp {
143199
})}
144200
{this.children.autoWidth.getView()==="fixed"&&
145201
this.children.width.propertyView({label:trans("prop.width")})}
202+
{controlItem({},(
203+
<divstyle={{marginTop:'8px'}}>
204+
<b>{"Style"}</b>
205+
</div>
206+
))}
207+
{this.children.background.propertyView({
208+
label:trans('style.background'),
209+
})}
210+
{this.children.text.propertyView({
211+
label:trans('text'),
212+
})}
213+
{this.children.border.propertyView({
214+
label:trans('style.border')
215+
})}
216+
{this.children.borderWidth.propertyView({
217+
label:trans('style.borderWidth'),
218+
preInputNode:<StyledIconas={IconRadius}title=""/>,
219+
placeholder:'1px',
220+
})}
221+
{this.children.radius.propertyView({
222+
label:trans('style.borderRadius'),
223+
preInputNode:<StyledIconas={IconRadius}title=""/>,
224+
placeholder:'3px',
225+
})}
226+
{this.children.textSize.propertyView({
227+
label:trans('style.textSize'),
228+
preInputNode:<StyledIconas={TextSizeIcon}title=""/>,
229+
placeholder:'14px',
230+
})}
231+
{this.children.cellColor.getPropertyView()}
146232
</>
147233
);
148234
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp