diff --git a/docs/en/api/options.md b/docs/en/api/options.md index 4b07cca5e..20e57e1ec 100644 --- a/docs/en/api/options.md +++ b/docs/en/api/options.md @@ -172,6 +172,8 @@ Pass properties for components to use in injection. See [provide/inject](https:/ - type: `boolean` - default: `true` +Sets all watchers to run synchronously. + When `sync` is `true`, the Vue component is rendered synchronously. When `sync` is `false`, the Vue component is rendered asynchronously. diff --git a/docs/zh-cn/api/options.md b/docs/zh-cn/api/options.md index 6841567f1..f9c2de6b1 100644 --- a/docs/zh-cn/api/options.md +++ b/docs/zh-cn/api/options.md @@ -13,6 +13,7 @@ - [`attrs`](#attrs) - [`listeners`](#listeners) - [`provide`](#provide) +- [`sync`](#sync) ### `context` @@ -166,6 +167,13 @@ expect(wrapper.vm.$route).toBeInstanceOf(Object) 为组件传递用于注入的属性。可查阅 [provie/inject](https://cn.vuejs.org/v2/api/#provide-inject) 了解更多。 +### `sync` + +- 类型:`boolean` +- 默认值:`true` + +将所有的侦听器都设置为同步执行。 + ## 其它选项 当 `mount` 和 `shallow` 的选项包含了挂载选项之外的选项时,则会将它们通过[扩展](https://vuejs.org/v2/api/#extends)覆写到其组件选项。