(item: T)
| 127 | } |
| 128 | |
| 129 | const getItemMenuItems = (item: T): MenuProps['items'] => { |
| 130 | if (!copyItem) return [] |
| 131 | return [ |
| 132 | { |
| 133 | key: 'copy', |
| 134 | label: '复制为副本', |
| 135 | icon: <CopyOutlined />, |
| 136 | onClick: ({ domEvent }) => { |
| 137 | domEvent.stopPropagation() |
| 138 | const newItem = copyItem(item) |
| 139 | onSelect(newItem.id) |
| 140 | } |
| 141 | } |
| 142 | ] |
| 143 | } |
| 144 | |
| 145 | const menuItems: MenuProps['items'] = [ |
| 146 | { key: 'folder', label: '新建文件夹', icon: <FolderOutlined /> }, |
no outgoing calls
no test coverage detected