P粉8632950572023-08-18 18:58:07
In the handleSaveClick function, you can use the e.preventDefault() function. When the embed image button is clicked, the handleSaveClick function will be executed, e.preventDefault() should prevent the default behavior of the link, ensuring that it does not navigate to the URL.
const handleSaveClick = async (e, activity, index) => { e.preventDefault(); // 阻止默认行为(跟随链接) e.stopPropagation(); // 阻止事件冒泡 // 在这里添加你的按钮点击逻辑 // ... }
Additionally, you should consider replacing the anchor tag of a clickable area or button with another suitable element.