mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-16 23:41:20 +08:00
Compare commits
4 Commits
b60f893cbf
...
79eb6d8fd1
Author | SHA1 | Date | |
---|---|---|---|
79eb6d8fd1 | |||
432e38ef88 | |||
902d84dded | |||
9a5bea6580 |
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 |
BIN
src/assets/images/IMG-3D020E6C18045F751BC938C45EC88E95.png
Normal file
BIN
src/assets/images/IMG-3D020E6C18045F751BC938C45EC88E95.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
BIN
src/assets/images/IMG-5D773F6926C2C236AC8FF3150AE233AD.png
Normal file
BIN
src/assets/images/IMG-5D773F6926C2C236AC8FF3150AE233AD.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@ -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
|
||||
|
@ -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]]'
|
||||
---
|
||||
|
||||
举个例子:
|
||||
|
||||

|
||||
|
||||
- 预期:删除了当前激活的item之后,list中第一个item被激活。
|
||||
- 错误的现象:删除了当前激活的item之后,无任何item被激活。
|
||||
|
||||
由于我点击删除按钮的时候,没有阻止冒泡,而删除的按钮的父组件是item,它们都有绑定click事件。
|
||||
|
||||
所以调用的步骤就是:
|
||||
|
||||
1. 首先调用删除item的回调,并且由于我的激活index就是目标要删除的index,所以是期望设置activeIndex = 2
|
||||
2. 但是由于没有阻止冒泡,所以在设置了activeIndex = 2之后,又去调用了activeIndex = 1
|
||||
3. 最后导致看起来状态没有发生变化这样的bug
|
||||
|
||||

|
||||
|
||||
最后的解决方法是:在删除item的回调中,阻止冒泡。
|
||||
|
||||
```tsx
|
||||
onClick = (e)=>{
|
||||
e.stopPropagation()
|
||||
deleteItemByIndex(index)
|
||||
}
|
||||
```
|
@ -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]]'
|
||||
---
|
||||
|
||||
## 背景
|
||||
|
Reference in New Issue
Block a user