You've already forked SmartisanNote.Remake
优化: 将本地存储从localStorage迁移至IndexedDB以支持更大数据量存储
This commit is contained in:
@@ -73,7 +73,7 @@ onMounted(() => {
|
||||
// 加载预设的模拟数据
|
||||
store.loadMockData()
|
||||
} else {
|
||||
// 从localStorage加载用户数据
|
||||
// 从Storage加载用户数据
|
||||
store.loadData()
|
||||
}
|
||||
})
|
||||
@@ -102,8 +102,8 @@ const filteredNotes = computed(() => {
|
||||
return store.notes.filter(note => {
|
||||
// 先检查搜索条件
|
||||
const matchesSearch = !lowerCaseQuery ||
|
||||
(note.title && note.title.toLowerCase().includes(lowerCaseQuery)) ||
|
||||
(note.content && note.content.toLowerCase().includes(lowerCaseQuery))
|
||||
(note.title && typeof note.title === 'string' && note.title.toLowerCase().includes(lowerCaseQuery)) ||
|
||||
(note.content && typeof note.content === 'string' && note.content.toLowerCase().includes(lowerCaseQuery))
|
||||
|
||||
if (!matchesSearch) return false
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ const store = useAppStore()
|
||||
const router = useRouter()
|
||||
|
||||
// 页面挂载时加载初始数据
|
||||
// 从localStorage加载用户设置和便签数据
|
||||
// 从Storage加载用户设置和便签数据
|
||||
onMounted(() => {
|
||||
store.loadData()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user