Add label picker

This commit is contained in:
2022-03-12 16:33:46 +08:00
parent c84c0b903b
commit f832a5af00
12 changed files with 128 additions and 16 deletions
+4
View File
@@ -5,4 +5,8 @@ div.label-list-panel-root {
min-height: 100%;
padding: 10px;
box-sizing: border-box;
}
div.label-list-pabel-err-msg {
padding-bottom: 5px;
}
+7
View File
@@ -3,6 +3,7 @@ import { Component } from "react";
import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status";
import { useSetting, IMixinSettingProps } from "@Context/Setting";
import { Label } from "@Model/Label";
import { ErrorMessage } from "@Component/ErrorMessage/ErrorMessage";
import "./LabelList.scss";
interface ILabelListProps {
@@ -29,6 +30,12 @@ class LabelList extends Component<ILabelListProps & IMixinStatusProps & IMixinSe
this.labelInnerClick = false;
}}
>
{labels.length <=0 ?
<ErrorMessage
className="label-list-pabel-err-msg"
i18nKey="Panel.Info.Label.List.Error.Nodata"
/> : null
}
<LabelListComponent
labels={labels}
focusLabel={this.props.status ? this.props.status.focusLabel : undefined}