Use rainbow bg color to mark build in label

This commit is contained in:
2022-03-28 15:47:34 +08:00
parent 126324bb0c
commit 241161ebb6
6 changed files with 65 additions and 30 deletions
@@ -1,4 +1,5 @@
@import "../Theme/Theme.scss";
@import "../PickerList/RainbowBg.scss";
$line-min-height: 24px;
+9 -17
View File
@@ -97,20 +97,8 @@ class ObjectPicker extends Component<IObjectPickerProps & IMixinStatusProps, IOb
public render(): ReactNode {
let disPlayInfo: IDisplayInfo;
let isDelete: boolean = false;
if (this.props.value) {
disPlayInfo = getObjectDisplayInfo(this.props.value);
isDelete = this.props.value.isDeleted();
} else {
disPlayInfo = {
name: "Input.Error.Select",
icon: "Label",
color: "transparent",
needI18n: true
}
}
let disPlayInfo: IDisplayInfo = getObjectDisplayInfo(this.props.value);
let isDelete: boolean = !!this.props.value?.isDeleted();
return <>
<TextField
@@ -129,9 +117,13 @@ class ObjectPicker extends Component<IObjectPickerProps & IMixinStatusProps, IOb
}}
>
<div
className="list-color"
className={
"list-color" + (
disPlayInfo.allLabel ? " rainbow-back-ground-color" : ""
)
}
style={{
backgroundColor: disPlayInfo.color
backgroundColor: disPlayInfo.color
}}
/>
<div className="list-button">
@@ -145,7 +137,7 @@ class ObjectPicker extends Component<IObjectPickerProps & IMixinStatusProps, IOb
}}
>
{
disPlayInfo.needI18n ?
disPlayInfo.internal ?
<Localization i18nKey={disPlayInfo.name as any}/> :
<span>{disPlayInfo.name}</span>
}