diff --git a/README.md b/README.md index b2fa5eb..cb20653 100644 --- a/README.md +++ b/README.md @@ -347,7 +347,7 @@ export default { > Similarly, in Vue 2 you will need to call `del` to [ensure a key deletion triggers view updates](https://vuejs.org/v2/api/#Vue-delete) in reactive objects (similar to `Vue.delete` but for `reactive objects` created by the Composition API). In Vue 3 you can just delete them by calling `delete foo.bar`. ```ts -import { reactive, set } from '@vue/composition-api' +import { reactive, set, del } from '@vue/composition-api' const a = reactive({ foo: 1 diff --git a/README.zh-CN.md b/README.zh-CN.md index c8e658b..a61cdcb 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -187,7 +187,7 @@ b.list[1].count === 1 // true > ⚠️ 警告: `set` 和 `del` 并非 Vue 3 的一部分。由于 [Vue 2.x 响应式系统的限制](https://vuejs.org/v2/guide/reactivity.html#For-Objects),我们在插件中提供该 API 作为添加响应式属性的一个变通方案。在 Vue 3 中,你只需要直接为属性赋值即可。 ```ts -import { reactive, set } from '@vue/composition-api' +import { reactive, set, del } from '@vue/composition-api' const a = reactive({ foo: 1 diff --git a/src/apis/effectScope.ts b/src/apis/effectScope.ts index cde52c5..89521ed 100644 --- a/src/apis/effectScope.ts +++ b/src/apis/effectScope.ts @@ -84,7 +84,7 @@ export function recordEffectScope( scope.effects.push(effect) return } - // destory on parent component unmounted + // destroy on parent component unmounted const vm = getCurrentInstance()?.proxy vm && vm.$on('hook:destroyed', () => effect.stop()) } @@ -103,7 +103,7 @@ export function onScopeDispose(fn: () => void) { } else if (__DEV__) { warn( `onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.` + ` to be associated with.` ) } }