4 Commits

Author SHA1 Message Date
79eb6d8fd1 Merge 432e38ef88 into 902d84dded 2025-02-14 07:32:31 +00:00
432e38ef88 [ImgBot] Optimize images
*Total -- 2,029.61kb -> 1,419.05kb (30.08%)

/src/assets/images/IMG-20250104114722956.png -- 457.81kb -> 303.46kb (33.71%)
/public/social-card.png -- 1,455.18kb -> 1,028.25kb (29.34%)
/src/assets/images/IMG-5D773F6926C2C236AC8FF3150AE233AD.png -- 40.57kb -> 29.74kb (26.71%)
/src/assets/images/IMG-3D020E6C18045F751BC938C45EC88E95.png -- 76.04kb -> 57.60kb (24.25%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2025-02-14 07:32:27 +00:00
902d84dded Update docs and sort content 2025-02-14 07:31:48 +00:00
9a5bea6580 Update docs and sort content 2025-02-14 07:24:46 +00:00
7 changed files with 46 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 KiB

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,5 +1,5 @@
---
title: 如何在 Cursor 中使用 DeepSeek-Coder
title: 如何在 cursor 中使用 deepseek-coder
date: 2024-07-25T00:00:00.000Z
author: KazooTTT
type: Post
@ -18,7 +18,7 @@ link-notionnext: >-
https://kazoottt.notion.site/cursor-deepseek-coder-f759bbe6aa4b4317969544927430146b
toAstro: true
date_created: 2025-01-04T03:44:53.000Z
date_modified: 2025-02-07T03:17:03.000Z
date_modified: 2025-02-12T02:52:44.000Z
---
# 如何在 cursor 中使用 deepseek-coder

View File

@ -0,0 +1,42 @@
---
title: 碎片-2025-02-14 15时00分 状态没变更记录一次没阻止冒泡导致的bug
date: 2025-02-14T00:00:00.000Z
author: KazooTTT
tags:
- 前端
description: 基础不牢,地动山摇
slug: fragmented-notes-2025-02-14-15-00-49
published: true
toAstro: true
astroType: null
category: 前端
date_created: 2025-02-14T07:10:55.000Z
date_modified: 2025-02-14T07:18:42.000Z
excalidrawFile: '[[记录一次没阻止冒泡导致的bug.excalidraw]]'
---
举个例子:
![IMG-3D020E6C18045F751BC938C45EC88E95](../../assets/images/IMG-3D020E6C18045F751BC938C45EC88E95.png)
- 预期删除了当前激活的item之后list中第一个item被激活。
- 错误的现象删除了当前激活的item之后无任何item被激活。
由于我点击删除按钮的时候没有阻止冒泡而删除的按钮的父组件是item它们都有绑定click事件。
所以调用的步骤就是:
1. 首先调用删除item的回调并且由于我的激活index就是目标要删除的index所以是期望设置activeIndex = 2
2. 但是由于没有阻止冒泡所以在设置了activeIndex = 2之后又去调用了activeIndex = 1
3. 最后导致看起来状态没有发生变化这样的bug
![IMG-5D773F6926C2C236AC8FF3150AE233AD](../../assets/images/IMG-5D773F6926C2C236AC8FF3150AE233AD.png)
最后的解决方法是在删除item的回调中阻止冒泡。
```tsx
onClick = (e)=>{
e.stopPropagation()
deleteItemByIndex(index)
}
```

View File

@ -1,6 +1,6 @@
---
date_created: 2025-02-09T08:34:48.000Z
date_modified: 2025-02-10T03:08:27.000Z
date_modified: 2025-02-13T10:39:35.000Z
title: 不引入astro wiki plugin实现链接跳转的思路
date: 2025-02-09T00:00:00.000Z
author: KazooTTT
@ -21,6 +21,7 @@ description: >-
作为唯一标识,从而实现正确的链接跳转。
toAstro: true
astroType: post
excalidrawFile: '[[不引入astro wiki plugin实现链接跳转的思路.excalidraw]]'
---
## 背景