MCPcopy Create free account
hub / github.com/experdot/pointer / getItemMenuItems

Function getItemMenuItems

src/renderer/src/components/common/ConfigTree.tsx:129–143  ·  view source on GitHub ↗
(item: T)

Source from the content-addressed store, hash-verified

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 /> },

Callers 1

getContextMenuItemsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected