Skip to content

Commit bd3ef9e

Browse files
committed
Translate API/Instance Properties
1 parent 84f00a0 commit bd3ef9e

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

src/api/index.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -833,37 +833,37 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
833833

834834
- **另见:** [Functional Components](/guide/render-function.html#Functional-Components)
835835

836-
## Instance Properties
836+
## 实例属性
837837

838838
### vm.$data
839839

840-
- **Type:** `Object`
840+
- **类型:** `Object`
841841

842-
- **Details:**
842+
- **详细:**
843843

844-
The data object that the Vue instance is observing. The Vue instance proxies access to the properties on its data object.
844+
Vue 实例观察的数据对象。Vue 实例代理了对其 data 对象属性的访问。
845845

846-
- **See also:** [Options - data](#data)
846+
- **另见:** [选项 - data](#data)
847847

848848
### vm.$el
849849

850-
- **Type:** `HTMLElement`
850+
- **类型:** `HTMLElement`
851851

852-
- **Read only**
852+
- **只读**
853853

854-
- **Details:**
854+
- **详细:**
855855

856-
The root DOM element that the Vue instance is managing.
856+
Vue 实例使用的根 DOM 元素。
857857

858858
### vm.$options
859859

860-
- **Type:** `Object`
860+
- **类型:** `Object`
861861

862-
- **Read only**
862+
- **只读**
863863

864-
- **Details:**
864+
- **详细:**
865865

866-
The instantiation options used for the current Vue instance. This is useful when you want to include custom properties in the options:
866+
用于当前 Vue 实例的初始化选项。当选项中需要自定义属性时会有用处:
867867

868868
``` js
869869
new Vue({
@@ -876,47 +876,47 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
876876

877877
### vm.$parent
878878

879-
- **Type:** `Vue instance`
879+
- **类型:** `Vue instance`
880880

881-
- **Read only**
881+
- **只读**
882882

883-
- **Details:**
883+
- **详细:**
884884

885-
The parent instance, if the current instance has one.
885+
父实例,如果当前实例有的话。
886886

887887
### vm.$root
888888

889-
- **Type:** `Vue instance`
889+
- **类型:** `Vue instance`
890890

891-
- **Read only**
891+
- **只读**
892892

893-
- **Details:**
893+
- **详细:**
894894

895-
The root Vue instance of the current component tree. If the current instance has no parents this value will be itself.
895+
当前组件树的根 Vue 实例。如果当前实例没有父实例,属性值将会是其自身。
896896

897897
### vm.$children
898898

899-
- **Type:** `Array<Vue instance>`
899+
- **类型:** `Array<Vue instance>`
900900

901-
- **Read only**
901+
- **只读**
902902

903-
- **Details:**
903+
- **详细:**
904904

905-
The direct child components of the current instance. **Note there's no order guarantee for `$children`, and it is not reactive.** If you find yourself trying to use `$children` for data binding, consider using an Array and `v-for` to generate child components, and use the Array as the source of truth.
905+
当前实例的直接子组件。**需要注意 `$children` 并不保证顺序,也不是响应式的。**如果你发现自己正在尝试使用 `$children` 来进行数据绑定,考虑使用一个数组配合 `v-for` 来生成子组件,并且使用 Array 作为真正的来源。
906906

907907
### vm.$slots
908908

909-
- **Type:** `Object`
909+
- **类型:** `Object`
910910

911-
- **Read only**
911+
- **只读**
912912

913-
- **Details:**
913+
- **详细:**
914914

915-
Used to access content [distributed by slots](/guide/components.html#Content-Distribution-with-Slots). Each [named slot](/guide/components.html#Named-Slots) has its own corresponding property (e.g. the contents of `slot="foo"` will be found at `vm.$slots.foo`). The `default` property contains any nodes not included in a named slot.
915+
用来访问被 [slot 分发](/guide/components.html#Content-Distribution-with-Slots)的内容。每个[具名 slot](/guide/components.html#Named-Slots) 有其响应的属性(例如:`slot="foo"` 中的内容将会在 `vm.$slots.foo` 中被找到)。`default` 属性包括了所有没有被包含在一个具名 slot 中的节点。
916916

917-
Accessing `vm.$slots` is most useful when writing a component with a [render function](/guide/render-function.html).
917+
在使用 [render 函数](/guide/render-function.html)书写一个组件时,访问 `vm.$slots` 最有帮助。
918918

919-
- **Example:**
919+
- **示例:**
920920

921921
```html
922922
<blog-post>
@@ -949,36 +949,36 @@ All lifecycle hooks automatically have their `this` context bound to the instanc
949949
})
950950
```
951951

952-
- **See also:**
953-
- [`<slot>` Component](#slot)
954-
- [Content Distribution with Slots](/guide/components.html#Content-Distribution-with-Slots)
955-
- [Render Functions](/guide/render-function.html)
952+
- **另见:**
953+
- [`<slot>` 组件](#slot)
954+
- [使用 Slots 进行内容分发](/guide/components.html#Content-Distribution-with-Slots)
955+
- [Render 函数](/guide/render-function.html)
956956

957957
### vm.$refs
958958

959-
- **Type:** `Object`
959+
- **类型:** `Object`
960960

961-
- **Read only**
961+
- **只读**
962962

963-
- **Details:**
963+
- **详细:**
964964

965-
An object that holds child components that have `ref` registered.
965+
一个对象,其中包含了所有拥有 `ref` 注册的子组件。
966966

967-
- **See also:**
968-
- [Child Component Refs](/guide/components.html#Child-Component-Refs)
967+
- **另见:**
968+
- [子组件引用](/guide/components.html#Child-Component-Refs)
969969
- [ref](#ref)
970970

971971
### vm.$isServer
972972

973-
- **Type:** `boolean`
973+
- **类型:** `boolean`
974974

975-
- **Read only**
975+
- **只读**
976976

977-
- **Details:**
977+
- **详细:**
978978

979-
Whether the current Vue instance is running on the server.
979+
当前 Vue 实例是否运行于服务器。
980980

981-
- **See also:** [Server-Side Rendering](/guide/ssr.html)
981+
- **另见:** [服务端渲染](/guide/ssr.html)
982982

983983
## Instance Methods / Data
984984

0 commit comments

Comments
 (0)