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

Commitc9cdee7

Browse files
committed
add placeholder styling for input
1 parentc9a8de4 commitc9cdee7

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

‎client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,23 @@ export function getStyle(style: InputLikeStyleType, labelStyle?: LabelStyleType)
315315
}
316316
317317
&::-webkit-input-placeholder {
318-
color:${style.text};
319-
opacity:0.4;
318+
color:${style.placeholder};
319+
opacity:1;
320+
}
321+
322+
&::-moz-placeholder {
323+
color:${style.placeholder};
324+
opacity:1;
325+
}
326+
327+
&:-ms-input-placeholder {
328+
color:${style.placeholder};
329+
opacity:1;
330+
}
331+
332+
&::placeholder {
333+
color:${style.placeholder};
334+
opacity:1;
320335
}
321336
322337
.ant-input-show-count-suffix,

‎client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,14 @@ export type DepColorConfig = CommonColorConfig & {
244244
transformer:(color:string, ...rest:string[])=>string;
245245
};
246246

247+
exporttypePlaceholderConfig=CommonColorConfig&{
248+
readonlyplaceholder?:string;
249+
};
250+
247251
exporttypeSingleColorConfig=
248252
|SimpleColorConfig
249253
|DepColorConfig
254+
|PlaceholderConfig
250255
|RadiusConfig
251256
|BorderWidthConfig
252257
|RotationConfig
@@ -1309,11 +1314,19 @@ export const DisabledSliderStyle = [
13091314
...DISABLED_SLIDER_STYLE_FIELDS,
13101315
]asconst;
13111316

1317+
constPLACEHOLDER={
1318+
name:"placeholder",
1319+
label:"Placeholder",
1320+
depName:"text",
1321+
transformer:(color:string)=>lightenColor(color,0.4),
1322+
}asconst;
1323+
13121324
exportconstInputLikeStyle=[
13131325
getStaticBackground(SURFACE_COLOR),
13141326
BOXSHADOW,
13151327
BOXSHADOWCOLOR,
13161328
...STYLING_FIELDS_SEQUENCE.filter((style)=>style.name!=='rotation'&&style.name!=='lineHeight'),
1329+
PLACEHOLDER,
13171330
...ACCENT_VALIDATE,
13181331
]asconst;
13191332

@@ -2536,3 +2549,4 @@ export function marginCalculator(margin: string) {
25362549
}
25372550

25382551
exporttype{ThemeDetail};
2552+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp