You've already forked SmartisanNote.Remake
优化 便签列表页上下滑动时不再触发标签条的移动;
优化 添加了新的vite编译配置;
This commit is contained in:
@@ -189,9 +189,9 @@ const handleStarToggle = async noteId => {
|
||||
if (note) {
|
||||
try {
|
||||
await store.updateNote(noteId, { isStarred: !note.isStarred })
|
||||
console.log(`Note ${noteId} starred status updated`)
|
||||
console.log(`便签 ${noteId} 星标状态已更新`)
|
||||
} catch (error) {
|
||||
console.error('Failed to update note star status:', error)
|
||||
console.error('更新便签星标状态失败:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,9 +201,9 @@ const handleTopToggle = async noteId => {
|
||||
if (note) {
|
||||
try {
|
||||
await store.updateNote(noteId, { isTop: !note.isTop })
|
||||
console.log(`Note ${noteId} top status updated`)
|
||||
console.log(`便签 ${noteId} 置顶状态已更新`)
|
||||
} catch (error) {
|
||||
console.error('Failed to update note top status:', error)
|
||||
console.error('更新便签置顶状态失败:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,15 +216,15 @@ const confirmDeleteNote = async noteId => {
|
||||
if (currentFolder.value === 'trash') {
|
||||
// 在回收站中删除便签,彻底删除
|
||||
await store.permanentlyDeleteNote(noteToDelete.value)
|
||||
console.log(`Note ${noteToDelete.value} permanently deleted`)
|
||||
console.log(`便签 ${noteToDelete.value} 已彻底删除`)
|
||||
} else {
|
||||
// 不在回收站中,将便签移至回收站
|
||||
await store.moveToTrash(noteToDelete.value)
|
||||
console.log(`Note ${noteToDelete.value} moved to trash`)
|
||||
console.log(`便签 ${noteToDelete.value} 已移至回收站`)
|
||||
}
|
||||
noteToDelete.value = null
|
||||
} catch (error) {
|
||||
console.error('Failed to delete note:', error)
|
||||
console.error('删除便签失败:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,29 +271,29 @@ const handleFolderToggle = () => {
|
||||
|
||||
const handleSearch = query => {
|
||||
// 搜索功能已在computed属性filteredAndSortedNotes中实现
|
||||
console.log('Search for:', query)
|
||||
console.log('搜索:', query)
|
||||
|
||||
// 可以在这里添加搜索统计或其它功能
|
||||
if (query && query.length > 0) {
|
||||
console.log(`Found ${filteredAndSortedNotes.value.length} matching notes`)
|
||||
console.log(`找到 ${filteredAndSortedNotes.value.length} 个匹配的便签`)
|
||||
}
|
||||
}
|
||||
|
||||
const handleClearSearch = () => {
|
||||
// 清除搜索已在v-model中处理
|
||||
console.log('Search cleared')
|
||||
console.log('搜索已清除')
|
||||
|
||||
// 清除搜索后可以重置一些状态
|
||||
setSearchQuery('')
|
||||
}
|
||||
|
||||
const handleSearchFocus = () => {
|
||||
console.log('Search bar focused')
|
||||
console.log('搜索栏获得焦点')
|
||||
// 可以在这里添加获得焦点时的特殊处理
|
||||
}
|
||||
|
||||
const handleSearchBlur = () => {
|
||||
console.log('Search bar blurred')
|
||||
console.log('搜索栏失去焦点')
|
||||
// 可以在这里添加失去焦点时的特殊处理
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user