|
@@ -4,7 +4,7 @@ import AnthologyList from "./AnthologyList";
|
|
|
|
|
|
|
|
interface IWidget {
|
|
interface IWidget {
|
|
|
studioName?: string;
|
|
studioName?: string;
|
|
|
- trigger?: JSX.Element;
|
|
|
|
|
|
|
+ trigger?: React.ReactNode;
|
|
|
onSelect?: Function;
|
|
onSelect?: Function;
|
|
|
onCancel?: Function;
|
|
onCancel?: Function;
|
|
|
}
|
|
}
|
|
@@ -28,14 +28,16 @@ const Widget = ({ studioName, trigger, onSelect, onCancel }: IWidget) => {
|
|
|
<span onClick={showModal}>{trigger}</span>
|
|
<span onClick={showModal}>{trigger}</span>
|
|
|
<Modal
|
|
<Modal
|
|
|
width={"80%"}
|
|
width={"80%"}
|
|
|
- title="选择文集"
|
|
|
|
|
|
|
+ title="加入文集"
|
|
|
open={isModalOpen}
|
|
open={isModalOpen}
|
|
|
onOk={handleOk}
|
|
onOk={handleOk}
|
|
|
onCancel={handleCancel}
|
|
onCancel={handleCancel}
|
|
|
>
|
|
>
|
|
|
<AnthologyList
|
|
<AnthologyList
|
|
|
|
|
+ title={"选择文集"}
|
|
|
studioName={studioName}
|
|
studioName={studioName}
|
|
|
showCreate={false}
|
|
showCreate={false}
|
|
|
|
|
+ showOption={false}
|
|
|
onTitleClick={(id: string) => {
|
|
onTitleClick={(id: string) => {
|
|
|
if (typeof onSelect !== "undefined") {
|
|
if (typeof onSelect !== "undefined") {
|
|
|
onSelect(id);
|
|
onSelect(id);
|