mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-12 12:04:16 +00:00
pass ctx prop
This commit is contained in:
parent
847700bb9b
commit
d5ba75fee3
@ -5,11 +5,11 @@ import { createIconRender } from "components/Icons"
|
|||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
export default (props) => {
|
export default (props) => {
|
||||||
const { items = [], cords, clickedComponent } = props
|
const { items = [], cords, clickedComponent, ctx } = props
|
||||||
|
|
||||||
const handleItemClick = async (item) => {
|
const handleItemClick = async (item) => {
|
||||||
if (typeof item.action === "function") {
|
if (typeof item.action === "function") {
|
||||||
await item.action(clickedComponent)
|
await item.action(clickedComponent, ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user