|
|
@@ -6,7 +6,11 @@ const { Link } = Typography;
|
|
|
|
|
|
interface IWidgetNoteCtl {
|
|
|
trigger?: string; //界面上显示的文字
|
|
|
- note?: string; //note内容
|
|
|
+ /**
|
|
|
+ * note 内容。注释里含有嵌套模版时后端不下发这个字段,
|
|
|
+ * 内容以 children(已渲染的嵌套模版)的形式传进来。
|
|
|
+ */
|
|
|
+ note?: string;
|
|
|
children?: React.ReactNode;
|
|
|
}
|
|
|
const NoteCtl = ({ trigger, note, children }: IWidgetNoteCtl) => {
|
|
|
@@ -14,7 +18,9 @@ const NoteCtl = ({ trigger, note, children }: IWidgetNoteCtl) => {
|
|
|
return (
|
|
|
<>
|
|
|
<Popover
|
|
|
- content={<div style={{ width: 500 }}>{note ?? children}</div>}
|
|
|
+ content={
|
|
|
+ <div style={{ width: 500 }}>{note ? note : children}</div>
|
|
|
+ }
|
|
|
placement="bottom"
|
|
|
>
|
|
|
<Link>{show}</Link>
|