|
|
|
|
@ -16,8 +16,6 @@ interface HandleButtonGroupProps {
|
|
|
|
|
onNavTo: (id: number, type: string) => void;
|
|
|
|
|
onSourceCodeView: (row: ComponentItem) => void;
|
|
|
|
|
onShowEdit: (row: ComponentItem, index: number) => void;
|
|
|
|
|
onCopyHandler: (row: ComponentItem) => void;
|
|
|
|
|
onShareCollaboration: (row: ComponentItem) => void;
|
|
|
|
|
onExportComponent: (id: number) => void;
|
|
|
|
|
onStopComponentShow: (row: ComponentItem) => void;
|
|
|
|
|
onRowDel: (row: ComponentItem) => void;
|
|
|
|
|
@ -32,8 +30,6 @@ const HandleButtonGroup: React.FC<HandleButtonGroupProps> = ({
|
|
|
|
|
onNavTo,
|
|
|
|
|
onSourceCodeView,
|
|
|
|
|
onShowEdit,
|
|
|
|
|
onCopyHandler,
|
|
|
|
|
onShareCollaboration,
|
|
|
|
|
onExportComponent,
|
|
|
|
|
onStopComponentShow,
|
|
|
|
|
onRowDel
|
|
|
|
|
@ -48,24 +44,6 @@ const HandleButtonGroup: React.FC<HandleButtonGroupProps> = ({
|
|
|
|
|
const renderDropdownMenu = () => {
|
|
|
|
|
const items = [];
|
|
|
|
|
|
|
|
|
|
// 组件复制
|
|
|
|
|
if (!isEligible([componentStatusConstant.DEFAULT, componentStatusConstant.DESIGN], row.componentStatus)) {
|
|
|
|
|
items.push(
|
|
|
|
|
<Menu.Item key="copy">
|
|
|
|
|
<Button type="text" onClick={() => onCopyHandler(row)}>组件复制</Button>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 分享协作
|
|
|
|
|
if (!isEligible([componentStatusConstant.DESIGN, componentStatusConstant.DEFAULT], row.componentStatus)) {
|
|
|
|
|
items.push(
|
|
|
|
|
<Menu.Item key="share">
|
|
|
|
|
<Button type="text" onClick={() => onShareCollaboration(row)}>分享协作</Button>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 导出组件
|
|
|
|
|
items.push(
|
|
|
|
|
<Menu.Item key="export">
|
|
|
|
|
|