From f2f3756cc0797c885ec766e4bacc97c76d31fbaa Mon Sep 17 00:00:00 2001 From: yuantao Date: Fri, 17 Oct 2025 09:09:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E6=A3=80=E6=9F=A5=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console.txt | 465 ++++++++++++++++++++++++------------- src/pages/NoteListPage.vue | 6 +- 2 files changed, 314 insertions(+), 157 deletions(-) diff --git a/console.txt b/console.txt index 0c20ede..e465495 100644 --- a/console.txt +++ b/console.txt @@ -1,155 +1,310 @@ -RichTextEditor.vue:35 Editor mounted -RichTextEditor.vue:37 Editor ref available -RichTextEditor.vue:39 Setting initial content -RichTextEditor.vue:43 Initial content set successfully -RichTextEditor.vue:1183 Adjusting existing images -RichTextEditor.vue:58 Initial viewport height: 667 -RichTextEditor.vue:62 Set viewport height CSS variable -RichTextEditor.vue:66 Adding viewport resize listener - Setting content: dasdasdsadad​ -RichTextEditor.vue:1257 Creating drag handle -RichTextEditor.vue:1276 Creating drag handle for existing image -RichTextEditor.vue:1280 Added drag handle -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1241 Setting draggable attribute -RichTextEditor.vue:1250 Added drag event listeners -RichTextEditor.vue:1255 Existing handle: null -RichTextEditor.vue:1257 Creating drag handle -RichTextEditor.vue:1276 Creating drag handle for existing image -RichTextEditor.vue:1280 Added drag handle -RichTextEditor.vue:75 Adding drag event listeners to existing images -RichTextEditor.vue:77 Found existing images: 2 -RichTextEditor.vue:79 Adding drag listeners to image: ​ -RichTextEditor.vue:79 Adding drag listeners to image: ​ -RichTextEditor.vue:1188 Found image elements: 2 -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1354 Adding drag event listeners to images in setContent -RichTextEditor.vue:1356 Found images in setContent: 2 -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1188 Found image elements: 2 -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1354 Adding drag event listeners to images in setContent -RichTextEditor.vue:1356 Found images in setContent: 2 -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1188 Found image elements: 2 -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1354 Adding drag event listeners to images in setContent -RichTextEditor.vue:1356 Found images in setContent: 2 -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1188 Found image elements: 2 -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1354 Adding drag event listeners to images in setContent -RichTextEditor.vue:1356 Found images in setContent: 2 -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1188 Found image elements: 2 -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1354 Adding drag event listeners to images in setContent -RichTextEditor.vue:1356 Found images in setContent: 2 -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1188 Found image elements: 2 -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1190 Processing image: ​ -RichTextEditor.vue:1193 Adjusting height for image -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1238 Adding drag functionality to image: ​ -RichTextEditor.vue:1255 Existing handle:
​ -RichTextEditor.vue:1354 Adding drag event listeners to images in setContent -RichTextEditor.vue:1356 Found images in setContent: 2 -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1358 Adding drag listeners to image in setContent: ​ -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1230 Adjusted image dimensions: 355.3 355.3 -RichTextEditor.vue:1287 Adding event listeners to drag handle -RichTextEditor.vue:1287 Adding event listeners to drag handle +prepare.js:1 🍍 "app" store installed 🆕 +NoteListPage.vue:291 搜索栏获得焦点 +NoteListPage.vue:296 搜索栏失去焦点 +NoteListPage.vue:291 搜索栏获得焦点 +NoteListPage.vue:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase') + at NoteListPage.vue:104:57 + at wrappedFn (reactivity.esm-bundler.js:878:19) + at Array.filter () + at apply (reactivity.esm-bundler.js:886:27) + at Proxy.filter (reactivity.esm-bundler.js:778:12) + at ComputedRefImpl.fn (NoteListPage.vue:102:22) + at refreshComputed (reactivity.esm-bundler.js:391:28) + at isDirty (reactivity.esm-bundler.js:362:68) + at refreshComputed (reactivity.esm-bundler.js:380:90) + at get value (reactivity.esm-bundler.js:1655:5) +(匿名) @ NoteListPage.vue:104 +wrappedFn @ reactivity.esm-bundler.js:878 +apply @ reactivity.esm-bundler.js:886 +filter @ reactivity.esm-bundler.js:778 +(匿名) @ NoteListPage.vue:102 +refreshComputed @ reactivity.esm-bundler.js:391 +isDirty @ reactivity.esm-bundler.js:362 +refreshComputed @ reactivity.esm-bundler.js:380 +get value @ reactivity.esm-bundler.js:1655 +unref @ reactivity.esm-bundler.js:1500 +get @ reactivity.esm-bundler.js:1506 +(匿名) @ NoteListPage.vue:35 +renderFnWithContext @ runtime-core.esm-bundler.js:695 +(匿名) @ runtime.js:286 +renderComponentRoot @ runtime-core.esm-bundler.js:6590 +componentUpdateFn @ runtime-core.esm-bundler.js:5468 +run @ reactivity.esm-bundler.js:237 +runIfDirty @ reactivity.esm-bundler.js:275 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +flushJobs @ runtime-core.esm-bundler.js:408 +Promise.then +queueFlush @ runtime-core.esm-bundler.js:322 +queueJob @ runtime-core.esm-bundler.js:317 +effect2.scheduler @ runtime-core.esm-bundler.js:5519 +trigger @ reactivity.esm-bundler.js:265 +endBatch @ reactivity.esm-bundler.js:323 +notify @ reactivity.esm-bundler.js:614 +trigger @ reactivity.esm-bundler.js:588 +set value @ reactivity.esm-bundler.js:1472 +set @ reactivity.esm-bundler.js:1510 +_createVNode.onUpdate:modelValue._cache.._cache. @ NoteListPage.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +emit @ runtime-core.esm-bundler.js:6473 +(匿名) @ runtime-core.esm-bundler.js:8188 +handleInput @ Search.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +invoker @ runtime-dom.esm-bundler.js:730 +NoteListPage.vue:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase') + at NoteListPage.vue:104:57 + at wrappedFn (reactivity.esm-bundler.js:878:19) + at Array.filter () + at apply (reactivity.esm-bundler.js:886:27) + at Proxy.filter (reactivity.esm-bundler.js:778:12) + at ComputedRefImpl.fn (NoteListPage.vue:102:22) + at refreshComputed (reactivity.esm-bundler.js:391:28) + at get value (reactivity.esm-bundler.js:1655:5) + at ComputedRefImpl.fn (NoteListPage.vue:130:28) + at refreshComputed (reactivity.esm-bundler.js:391:28) +(匿名) @ NoteListPage.vue:104 +wrappedFn @ reactivity.esm-bundler.js:878 +apply @ reactivity.esm-bundler.js:886 +filter @ reactivity.esm-bundler.js:778 +(匿名) @ NoteListPage.vue:102 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +(匿名) @ NoteListPage.vue:130 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +unref @ reactivity.esm-bundler.js:1500 +get @ reactivity.esm-bundler.js:1506 +(匿名) @ NoteListPage.vue:35 +renderFnWithContext @ runtime-core.esm-bundler.js:695 +(匿名) @ runtime.js:286 +renderComponentRoot @ runtime-core.esm-bundler.js:6590 +componentUpdateFn @ runtime-core.esm-bundler.js:5468 +run @ reactivity.esm-bundler.js:237 +runIfDirty @ reactivity.esm-bundler.js:275 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +flushJobs @ runtime-core.esm-bundler.js:408 +Promise.then +queueFlush @ runtime-core.esm-bundler.js:322 +queueJob @ runtime-core.esm-bundler.js:317 +effect2.scheduler @ runtime-core.esm-bundler.js:5519 +trigger @ reactivity.esm-bundler.js:265 +endBatch @ reactivity.esm-bundler.js:323 +notify @ reactivity.esm-bundler.js:614 +trigger @ reactivity.esm-bundler.js:588 +set value @ reactivity.esm-bundler.js:1472 +set @ reactivity.esm-bundler.js:1510 +_createVNode.onUpdate:modelValue._cache.._cache. @ NoteListPage.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +emit @ runtime-core.esm-bundler.js:6473 +(匿名) @ runtime-core.esm-bundler.js:8188 +handleInput @ Search.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +invoker @ runtime-dom.esm-bundler.js:730 +NoteListPage.vue:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase') + at NoteListPage.vue:104:57 + at wrappedFn (reactivity.esm-bundler.js:878:19) + at Array.filter () + at apply (reactivity.esm-bundler.js:886:27) + at Proxy.filter (reactivity.esm-bundler.js:778:12) + at ComputedRefImpl.fn (NoteListPage.vue:102:22) + at refreshComputed (reactivity.esm-bundler.js:391:28) + at get value (reactivity.esm-bundler.js:1655:5) + at ComputedRefImpl.fn (NoteListPage.vue:130:28) + at refreshComputed (reactivity.esm-bundler.js:391:28) +(匿名) @ NoteListPage.vue:104 +wrappedFn @ reactivity.esm-bundler.js:878 +apply @ reactivity.esm-bundler.js:886 +filter @ reactivity.esm-bundler.js:778 +(匿名) @ NoteListPage.vue:102 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +(匿名) @ NoteListPage.vue:130 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +unref @ reactivity.esm-bundler.js:1500 +get @ reactivity.esm-bundler.js:1506 +(匿名) @ NoteListPage.vue:35 +renderFnWithContext @ runtime-core.esm-bundler.js:695 +(匿名) @ runtime.js:286 +renderComponentRoot @ runtime-core.esm-bundler.js:6590 +componentUpdateFn @ runtime-core.esm-bundler.js:5468 +run @ reactivity.esm-bundler.js:237 +runIfDirty @ reactivity.esm-bundler.js:275 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +flushJobs @ runtime-core.esm-bundler.js:408 +Promise.then +queueFlush @ runtime-core.esm-bundler.js:322 +queueJob @ runtime-core.esm-bundler.js:317 +effect2.scheduler @ runtime-core.esm-bundler.js:5519 +trigger @ reactivity.esm-bundler.js:265 +endBatch @ reactivity.esm-bundler.js:323 +notify @ reactivity.esm-bundler.js:614 +trigger @ reactivity.esm-bundler.js:588 +set value @ reactivity.esm-bundler.js:1472 +set @ reactivity.esm-bundler.js:1510 +_createVNode.onUpdate:modelValue._cache.._cache. @ NoteListPage.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +emit @ runtime-core.esm-bundler.js:6473 +(匿名) @ runtime-core.esm-bundler.js:8188 +handleInput @ Search.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +invoker @ runtime-dom.esm-bundler.js:730 +NoteListPage.vue:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase') + at NoteListPage.vue:104:57 + at wrappedFn (reactivity.esm-bundler.js:878:19) + at Array.filter () + at apply (reactivity.esm-bundler.js:886:27) + at Proxy.filter (reactivity.esm-bundler.js:778:12) + at ComputedRefImpl.fn (NoteListPage.vue:102:22) + at refreshComputed (reactivity.esm-bundler.js:391:28) + at get value (reactivity.esm-bundler.js:1655:5) + at ComputedRefImpl.fn (NoteListPage.vue:130:28) + at refreshComputed (reactivity.esm-bundler.js:391:28) +(匿名) @ NoteListPage.vue:104 +wrappedFn @ reactivity.esm-bundler.js:878 +apply @ reactivity.esm-bundler.js:886 +filter @ reactivity.esm-bundler.js:778 +(匿名) @ NoteListPage.vue:102 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +(匿名) @ NoteListPage.vue:130 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +unref @ reactivity.esm-bundler.js:1500 +get @ reactivity.esm-bundler.js:1506 +(匿名) @ NoteListPage.vue:35 +renderFnWithContext @ runtime-core.esm-bundler.js:695 +(匿名) @ runtime.js:286 +renderComponentRoot @ runtime-core.esm-bundler.js:6590 +componentUpdateFn @ runtime-core.esm-bundler.js:5468 +run @ reactivity.esm-bundler.js:237 +runIfDirty @ reactivity.esm-bundler.js:275 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +flushJobs @ runtime-core.esm-bundler.js:408 +Promise.then +queueFlush @ runtime-core.esm-bundler.js:322 +queueJob @ runtime-core.esm-bundler.js:317 +effect2.scheduler @ runtime-core.esm-bundler.js:5519 +trigger @ reactivity.esm-bundler.js:265 +endBatch @ reactivity.esm-bundler.js:323 +notify @ reactivity.esm-bundler.js:614 +trigger @ reactivity.esm-bundler.js:588 +set value @ reactivity.esm-bundler.js:1472 +set @ reactivity.esm-bundler.js:1510 +_createVNode.onUpdate:modelValue._cache.._cache. @ NoteListPage.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +emit @ runtime-core.esm-bundler.js:6473 +(匿名) @ runtime-core.esm-bundler.js:8188 +handleInput @ Search.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +invoker @ runtime-dom.esm-bundler.js:730 +NoteListPage.vue:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase') + at NoteListPage.vue:104:57 + at wrappedFn (reactivity.esm-bundler.js:878:19) + at Array.filter () + at apply (reactivity.esm-bundler.js:886:27) + at Proxy.filter (reactivity.esm-bundler.js:778:12) + at ComputedRefImpl.fn (NoteListPage.vue:102:22) + at refreshComputed (reactivity.esm-bundler.js:391:28) + at get value (reactivity.esm-bundler.js:1655:5) + at ComputedRefImpl.fn (NoteListPage.vue:130:28) + at refreshComputed (reactivity.esm-bundler.js:391:28) +(匿名) @ NoteListPage.vue:104 +wrappedFn @ reactivity.esm-bundler.js:878 +apply @ reactivity.esm-bundler.js:886 +filter @ reactivity.esm-bundler.js:778 +(匿名) @ NoteListPage.vue:102 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +(匿名) @ NoteListPage.vue:130 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +unref @ reactivity.esm-bundler.js:1500 +get @ reactivity.esm-bundler.js:1506 +(匿名) @ NoteListPage.vue:35 +renderFnWithContext @ runtime-core.esm-bundler.js:695 +(匿名) @ runtime.js:286 +renderComponentRoot @ runtime-core.esm-bundler.js:6590 +componentUpdateFn @ runtime-core.esm-bundler.js:5468 +run @ reactivity.esm-bundler.js:237 +runIfDirty @ reactivity.esm-bundler.js:275 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +flushJobs @ runtime-core.esm-bundler.js:408 +Promise.then +queueFlush @ runtime-core.esm-bundler.js:322 +queueJob @ runtime-core.esm-bundler.js:317 +effect2.scheduler @ runtime-core.esm-bundler.js:5519 +trigger @ reactivity.esm-bundler.js:265 +endBatch @ reactivity.esm-bundler.js:323 +notify @ reactivity.esm-bundler.js:614 +trigger @ reactivity.esm-bundler.js:588 +set value @ reactivity.esm-bundler.js:1472 +set @ reactivity.esm-bundler.js:1510 +_createVNode.onUpdate:modelValue._cache.._cache. @ NoteListPage.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +emit @ runtime-core.esm-bundler.js:6473 +(匿名) @ runtime-core.esm-bundler.js:8188 +handleInput @ Search.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +invoker @ runtime-dom.esm-bundler.js:730 +NoteListPage.vue:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase') + at NoteListPage.vue:104:57 + at wrappedFn (reactivity.esm-bundler.js:878:19) + at Array.filter () + at apply (reactivity.esm-bundler.js:886:27) + at Proxy.filter (reactivity.esm-bundler.js:778:12) + at ComputedRefImpl.fn (NoteListPage.vue:102:22) + at refreshComputed (reactivity.esm-bundler.js:391:28) + at get value (reactivity.esm-bundler.js:1655:5) + at ComputedRefImpl.fn (NoteListPage.vue:130:28) + at refreshComputed (reactivity.esm-bundler.js:391:28) +(匿名) @ NoteListPage.vue:104 +wrappedFn @ reactivity.esm-bundler.js:878 +apply @ reactivity.esm-bundler.js:886 +filter @ reactivity.esm-bundler.js:778 +(匿名) @ NoteListPage.vue:102 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +(匿名) @ NoteListPage.vue:130 +refreshComputed @ reactivity.esm-bundler.js:391 +get value @ reactivity.esm-bundler.js:1655 +unref @ reactivity.esm-bundler.js:1500 +get @ reactivity.esm-bundler.js:1506 +(匿名) @ NoteListPage.vue:35 +renderFnWithContext @ runtime-core.esm-bundler.js:695 +(匿名) @ runtime.js:286 +renderComponentRoot @ runtime-core.esm-bundler.js:6590 +componentUpdateFn @ runtime-core.esm-bundler.js:5468 +run @ reactivity.esm-bundler.js:237 +runIfDirty @ reactivity.esm-bundler.js:275 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +flushJobs @ runtime-core.esm-bundler.js:408 +Promise.then +queueFlush @ runtime-core.esm-bundler.js:322 +queueJob @ runtime-core.esm-bundler.js:317 +effect2.scheduler @ runtime-core.esm-bundler.js:5519 +trigger @ reactivity.esm-bundler.js:265 +endBatch @ reactivity.esm-bundler.js:323 +notify @ reactivity.esm-bundler.js:614 +trigger @ reactivity.esm-bundler.js:588 +set value @ reactivity.esm-bundler.js:1472 +set @ reactivity.esm-bundler.js:1510 +_createVNode.onUpdate:modelValue._cache.._cache. @ NoteListPage.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +emit @ runtime-core.esm-bundler.js:6473 +(匿名) @ runtime-core.esm-bundler.js:8188 +handleInput @ Search.vue:31 +callWithErrorHandling @ runtime-core.esm-bundler.js:199 +callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206 +invoker @ runtime-dom.esm-bundler.js:730 +NoteListPage.vue:296 搜索栏失去焦点 diff --git a/src/pages/NoteListPage.vue b/src/pages/NoteListPage.vue index 543b8b3..87e81e7 100644 --- a/src/pages/NoteListPage.vue +++ b/src/pages/NoteListPage.vue @@ -97,11 +97,13 @@ const trashNotesCount = computed(() => { // 根据当前文件夹过滤便签 const filteredNotes = computed(() => { // 预处理搜索查询,提高性能 - const lowerCaseQuery = searchQuery.value.toLowerCase().trim() + const lowerCaseQuery = searchQuery.value?.toLowerCase().trim() || '' return store.notes.filter(note => { // 先检查搜索条件 - const matchesSearch = !lowerCaseQuery || note.title.toLowerCase().includes(lowerCaseQuery) || note.content.toLowerCase().includes(lowerCaseQuery) + const matchesSearch = !lowerCaseQuery || + (note.title && note.title.toLowerCase().includes(lowerCaseQuery)) || + (note.content && note.content.toLowerCase().includes(lowerCaseQuery)) if (!matchesSearch) return false