You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/tutorial/01-svelte/05-events/04-component-events/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Sự kiện trong component
3
3
---
4
4
5
-
Component cũng có thể phái_(dispatch)_ các sự kiện. Bạn cần phải tạo một _event dispatcher_ để có thể làm điều này.
5
+
Component cũng có thể gởi_(dispatch)_ các sự kiện. Bạn cần phải tạo một _event dispatcher_ để có thể làm điều này. Hãy sửa lại `Inner.svelte`:
6
6
7
7
```svelte
8
8
/// file: Inner.svelte
@@ -19,7 +19,7 @@ Component cũng có thể phái _(dispatch)_ các sự kiện. Bạn cần phả
19
19
</script>
20
20
```
21
21
22
-
> Bạn phải gọi `createEventDispatcher` khi component được khởi tạo lần đầu - bạn không thể chúng gọi sau này, chẳng hạn như trong callback của `setTimeout`. Việc này sẽ liên kết `dispatch` với instance của component.
22
+
> Bạn phải gọi `createEventDispatcher` khi component được khởi tạo lần đầu - bạn không thể gọi sau này, chẳng hạn như trong callback của `setTimeout`. Việc này sẽ liên kết `dispatch` với instance của component.
23
23
24
24
Sau đó, thêm hàm xử lý `on:message` vào `App.svelte`:
0 commit comments