mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 23:16:48 +00:00
heo 主题样式、交互微调
This commit is contained in:
@@ -57,12 +57,10 @@ export default function CustomContextMenu(props) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 鼠标点击事件
|
||||
* 鼠标点击即关闭菜单
|
||||
*/
|
||||
const handleClick = event => {
|
||||
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
||||
setShow(false)
|
||||
}
|
||||
setShow(false)
|
||||
}
|
||||
|
||||
window.addEventListener('contextmenu', handleContextMenu)
|
||||
@@ -88,7 +86,6 @@ export default function CustomContextMenu(props) {
|
||||
|
||||
function handleScrollTop() {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
setShow(false)
|
||||
}
|
||||
|
||||
function handleCopyLink() {
|
||||
@@ -96,12 +93,12 @@ export default function CustomContextMenu(props) {
|
||||
navigator.clipboard
|
||||
.writeText(url)
|
||||
.then(() => {
|
||||
console.log('页面地址已复制')
|
||||
// console.log('页面地址已复制')
|
||||
alert(`${locale.COMMON.PAGE_URL_COPIED} : ${url}`)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('复制页面地址失败:', error)
|
||||
})
|
||||
setShow(false)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,8 +127,6 @@ export default function CustomContextMenu(props) {
|
||||
} else {
|
||||
// alert("Please select some text first.");
|
||||
}
|
||||
|
||||
setShow(false)
|
||||
}
|
||||
|
||||
function handleChangeDarkMode() {
|
||||
|
||||
Reference in New Issue
Block a user