diff --git a/README.md b/README.md index 3f866306b7..cb8e00ad45 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,101 @@ -# vue.js 2.0 正式版 中文翻译文档(正在进行中...) http://vuefe.cn +# vue.js 2.0 中文翻译文档(即将完成 - 急需校对人员) http://vuefe.cn -> 基于 hexo && vuejs.org > 求小伙伴共同翻译,有兴趣加qq 315129552 +> 目前急需校对人员 - 中文翻译分支 2.0-cn +## Guide 翻译进度 + +### Essentials 基础 + +序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +1 | 是 | installation.md | 安装 | @dingyiming | @dingyiming +2 | 是 | index.md | 介绍 | @hijiangtao | @dingyiming @hijiangtao +3 | 是 | instance.md | 实例 | @dingyiming | @dingyiming +4 | 是 | syntax.md | 模板语法 | @daix6 | @tingtien @daix6 +5 | 是 | computed.md | 计算属 性 | @dingyiming | @dingyiming +6 | 是 | class-and-style.md | Class 与 Style 绑定 | @595074187 | @595074187 +7 | 是 | conditional.md | 条件渲染 | @dingyiming | @dingyiming +8 | 是 | list.md | 列表渲染 | @tingtien | @tingtien +9 | 是 | events.md | 事件处理器 | @dingyiming | @dingyiming +10 | 是 | forms.md | 表单控件绑定 | @dingyiming | @dingyiming +11 | 是 | components.md | 组件 | @ezreally | @ezreally + +### Advanced 进阶 + +序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +12 | 是 | transitions.md | 过渡: 进入, 离开, 和 列表 | @awe | @awe +13 | 是 | transitioning-state.md | 过渡状态 | @awe | @awe +14 | 是 | render-function.md | Render 函数 | @awe | @awe +15 | x | reactivity.md | 深入响应式原理 | | @veaba +16 | 是 | custom-directive.md | 自定义指令 | @harrytospring | @harrytospring +17 | 是 | mixins.md | 混合 | @harrytospring | @harrytospring +18 | x | plugins.md | 插件 | | @hgcoder +19 | 是 | single-file-components.md | 单文件组件 | @ATLgo | @ATLgo +20 | 是 | routing.md | 路由 | @dingyiming | @dingyiming +21 | 是 | state-management.md | 状态管理 | @dear-lizhihua | @dear-lizhihua +22 | 是 | unit-testing.md | 单元测试 | @70data | @70data +23 | 是 | ssr.md | 服务端渲染 | @dingyiming | @dingyiming + +### Migration 迁移 + +序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +24 | 是 | migration.md | 1.x迁移 | @harrytospring | @harrytospring +27 | 是 | migration-vue-router.md | vue-router 0.7.x 迁移 | @forzajuve10 | @forzajuve10 + +### Meta 更多 + +序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +25 | 是 | comparison.md | 对比其他框架 | @yongbolv | @yongbolv @daix6 +26 | 是 | join.md | 加入Vue.js社区 | @daix6 | @daix6 + + +## API 翻译 + +### 关于 API 翻译说明 + +- 文中多次使用的几个词,请大家保持一致的翻译,参考了 `vue1.x` 翻译 + - `Type` => 类型 + - `See also` => 另见 + - `Details` => 详细 + - `Options` => 选项 + - `Example` => 示例 + - `Restriction` => 限制 + - `default` => 默认值 + - `Props` => 特性 + - `prop` => 特性 (在 `props` 是指 一个 API 时候,不要翻译成中文) + + +- 冒号 使用中文输入法下的,之前如有问题的,可以修改下。 + +> 以下小节均在 `src/api/index.md` 一个文档中 + +## API翻译进度 + +序号 | 是否完成 | 对应小节名称 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +1 | 是 | Global Config | 全局配置 | @dear-lizhihua | @dear-lizhihua +2 | 是 | Global API | 全局API | @dear-lizhihua | @dear-lizhihua +3 | 是 | Options / Data | 选项 / 数据 | @dear-lizhihua | @dear-lizhihua +4 | 是 | Options / DOM | 选项 / DOM | @ATLgo | @ATLgo +5 | 是 | Options / Lifecycle Hooks | 选项 / 生命周期钩子 | @ATLgo | @ATLgo +6 | 是 | Options / Assets | 选项 / 资源 | @dingyiming | @dingyiming +7 | x | Options / Misc | 选项 / 杂项 | | @dingyiming +8 | 是 | Instance Properties | 实例属性 | @coolzjy | @coolzjy +9 | x | Instance Methods / Data | 实例方法 / 数据 | | @dingyiming +10 | x | Instance Methods / Events | 实例方法 / 事件 | | @mlyknown +11 | x | Instance Methods / Lifecycle | 实例方法 / 生命周期 | | @mlyknown +12 | x | Directives | 指令| | @tingtien +13 | 是 | Special Attributes | 特殊元素 | @70data | @70data +14 | x | Built-In Components | 内置的组件 | | @dear-lizhihua +15 | 是 | VNode Interface | VNode接口 | @70data | @70data +16 | 是 | Server-Side Rendering | 服务端渲染| @70data | @70data + ## 开发 ``` @@ -26,15 +117,4 @@ Start a dev server at `localhost:4000` ``` hexo g hexo d -``` - -## 当前说明(2016.09.26) - -* 基于hexo 和vuejs.org源码 -* 翻译有些滞后,刚刚更新,希望有兴趣的小伙伴直接找我,共勉 -* 文段中英文字母与中文用空一格做间隔,有助于阅读 -* 请尽量对照 vuejs 官方 1.0 中文文档进行翻译,也可以即时看出vue1和vue2直接的区别 -* 导航上 添加了 更新 模块,用于链接到github的 release信息,后面希望单独把changelog放到 /changelog中跟进翻译每次的版本更新内容 -* (畅想:加入热点标记功能 - 点击热点新建github 对应 issue ,话题链接 / 增强文档交互即时纠错) -* (畅想: 首页加入弹幕交互功能) -* (畅想: 添加hacknews-vue2案例解析 以及更多自定义案例解析) +``` \ No newline at end of file diff --git a/src/about/apidoc.md b/src/about/apidoc.md new file mode 100644 index 0000000000..81cb89fee5 --- /dev/null +++ b/src/about/apidoc.md @@ -0,0 +1,35 @@ +--- +title: 参与API翻译 +type: about +order: 2 +--- + +> 官方文档仓库:http://vuejs.org/guide/ +> 翻译文档仓库:https://github.com/vuefe/vuejs.org + +- 加QQ群参与翻译: `427447379` +- [翻译Guide认领](https://github.com/vuefe/vuejs.org/issues/1) +- [翻译API认领](https://github.com/vuefe/vuejs.org/issues/44) +- [翻译指引](https://github.com/vuefe/vuejs.org/issues/25) + +## API文档翻译进度 + + +序号 | 是否完成 | 对应小节名称 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +1 | 是 | Global Config | 全局配置 | @dear-lizhihua | @dear-lizhihua +2 | 是 | Global API | 全局API | @dear-lizhihua | @dear-lizhihua +3 | 是 | Options / Data | 选项 / 数据 | @dear-lizhihua | @dear-lizhihua +4 | 是 | Options / DOM | 选项 / DOM | @ATLgo | @ATLgo +5 | 是 | Options / Lifecycle Hooks | 选项 / 生命周期钩子 | @ATLgo | @ATLgo +6 | 是 | Options / Assets | 选项 / 资源 | @dingyiming | @dingyiming +7 | x | Options / Misc | 选项 / 杂项 | | @dingyiming +8 | 是 | Instance Properties | 实例属性 | @coolzjy | @coolzjy +9 | x | Instance Methods / Data | 实例方法 / 数据 | | @dingyiming +10 | x | Instance Methods / Events | 实例方法 / 事件 | | @mlyknown +11 | x | Instance Methods / Lifecycle | 实例方法 / 生命周期 | | @mlyknown +12 | x | Directives | 指令| | @tingtien +13 | 是 | Special Attributes | 特殊元素 | @70data | @70data +14 | x | Built-In Components | 内置的组件 | | @dear-lizhihua +15 | 是 | VNode Interface | VNode接口 | @70data | @70data +16 | 是 | Server-Side Rendering | 服务端渲染| @70data | @70data \ No newline at end of file diff --git a/src/about/guide.md b/src/about/guide.md index 79d4a353b2..bc777240f0 100644 --- a/src/about/guide.md +++ b/src/about/guide.md @@ -1,40 +1,36 @@ --- -title: 参与指南 +title: 参与教程翻译 type: about -order: 2 +order: 1 --- +> 官方文档仓库:http://vuejs.org/guide/ +> 翻译文档仓库:https://github.com/vuefe/vuejs.org + - 加QQ群参与翻译: `427447379` - [翻译Guide认领](https://github.com/vuefe/vuejs.org/issues/1) +- [翻译API认领](https://github.com/vuefe/vuejs.org/issues/44) - [翻译指引](https://github.com/vuefe/vuejs.org/issues/25) -## 翻译进度 - -> 原文地址:http://vuejs.org/guide/ -> 仓库:https://github.com/vuefe/vuejs.org - -### 说明 - -- 翻译前,请在此回复认领 -- 认领格式 :` 我翻译 + 文档序号` 即可 +## 教程(guide)文档翻译进度 -## 以下所有文档所在目录为 `src/guide/xxx.md` +> 以下所有文档所在目录为 `src/guide/xxx.md` ### Essentials 基础 序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 ----- | ------- | ------------- | --- | --- | --- -1 | 是 | installation.md | 安装 | @dingyiming | - -2 | 否 | index.md | 介绍 | | @dingyiming -3 | 是 | instance.md | 实例 | @dingyiming | - -4 | × | syntax.md | 模板语法 | | | -5 | 是 | computed.md | 计算属性 | @dingyiming | - -6 | × | class-and-style.md | Class 与 Style 绑定 | | -7 | 是 | conditional.md | 条件渲染 | @dingyiming | - +1 | 是 | installation.md | 安装 | @dingyiming | @dingyiming +2 | 是 | index.md | 介绍 | @hijiangtao | @dingyiming @hijiangtao +3 | 是 | instance.md | 实例 | @dingyiming | @dingyiming +4 | 是 | syntax.md | 模板语法 | @daix6 | @tingtien @daix6 +5 | 是 | computed.md | 计算属 性 | @dingyiming | @dingyiming +6 | 是 | class-and-style.md | Class 与 Style 绑定 | @595074187 | @595074187 +7 | 是 | conditional.md | 条件渲染 | @dingyiming | @dingyiming 8 | 是 | list.md | 列表渲染 | @tingtien | @tingtien -9 | 是 | events.md | 事件处理器 | @dingyiming | - -10 | 是 | forms.md | 表单控件绑定 | @dingyiming | - -11 | × | components.md | 组件 | | @ezreally +9 | 是 | events.md | 事件处理器 | @dingyiming | @dingyiming +10 | 是 | forms.md | 表单控件绑定 | @dingyiming | @dingyiming +11 | 是 | components.md | 组件 | @ezreally | @ezreally ### Advanced 进阶 @@ -47,16 +43,22 @@ order: 2 16 | 是 | custom-directive.md | 自定义指令 | @harrytospring | @harrytospring 17 | 是 | mixins.md | 混合 | @harrytospring | @harrytospring 18 | x | plugins.md | 插件 | | @hgcoder -19 | x | single-file-components.md | 单文件组件 | | +19 | 是 | single-file-components.md | 单文件组件 | @ATLgo | @ATLgo 20 | 是 | routing.md | 路由 | @dingyiming | @dingyiming -21 | x | state-management.md | 状态管理 | | -22 | x | unit-testing.md | 单元测试 | | @70data +21 | 是 | state-management.md | 状态管理 | @dear-lizhihua | @dear-lizhihua +22 | 是 | unit-testing.md | 单元测试 | @70data | @70data 23 | 是 | ssr.md | 服务端渲染 | @dingyiming | @dingyiming -24 | x | migration.md | 1.x迁移 | | @harrytospring + +### Migration 迁移 + +序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 +----- | ------- | ------------- | --- | --- | --- +24 | 是 | migration.md | 1.x迁移 | @harrytospring | @harrytospring +27 | 是 | migration-vue-router.md | vue-router 0.7.x 迁移 | @forzajuve10 | @forzajuve10 ### Meta 更多 序号 | 是否完成 | 对应文档文件名 | 中文标题 | 贡献者 | 认领者 ----- | ------- | ------------- | --- | --- | --- -25 | x | comparison.md | 对比其他框架 | | @yongbolv @daix6 -26 | x | join.md | 加入Vue.js社区 | | @daix6 +25 | 是 | comparison.md | 对比其他框架 | @yongbolv | @yongbolv @daix6 +26 | 是 | join.md | 加入Vue.js社区 | @daix6 | @daix6 \ No newline at end of file diff --git a/src/about/index.md b/src/about/index.md index 83e2b741fc..a1d59e16df 100644 --- a/src/about/index.md +++ b/src/about/index.md @@ -1,8 +1,47 @@ --- -title: 关于翻译 +title: 参与指南 type: about -order: 1 +order: 0 --- +> 官方文档仓库:http://vuejs.org/guide/ +> 翻译文档仓库:https://github.com/vuefe/vuejs.org + - 加QQ群参与翻译: `427447379` -- [翻译Guide认领](https://github.com/vuefe/vuejs.org/issues/1) \ No newline at end of file +- [翻译Guide认领](https://github.com/vuefe/vuejs.org/issues/1) +- [翻译API认领](https://github.com/vuefe/vuejs.org/issues/44) +- [翻译指引](https://github.com/vuefe/vuejs.org/issues/25) + + +## 说明 + +- 翻译前,请在对应 issue 回复认领 +- 认领格式 :` 我翻译 + 文档序号` 即可 +- 支持多人协作翻译,冲突可以解决,认领过的,如果你觉着他太慢,可以再次认领,加速翻译,知道大家都是牺牲业余时间来贡献,所以慢也是可以理解的,慢就需要大家一起帮帮忙了!谢谢。 + +## 基础指引 + +### 基础环境 + +- `node lastest` +- `npm lastest` +- `npm i -g hexo` +- `git bash` + +### 主要步骤 + +- `github fork` 仓库代码到自己的账号下 +- `git clone fork` 的仓库代码到本地 +- 进入项目目录 ,`npm install` 安装依赖 +- `hexo s` 启动项目,浏览器打开 `localhost:4000` 查看当前文档情况,已支持browsersync热加载 ,可边改边看 +- 然后用自己喜欢的编辑器,比如`sublime text 3` 打开项目目录,找到 `src/guide` 目录 , 也就是当前文档翻译的目录,根据github 仓库中,认领issue中对照文件名.md ,认领自己打算翻译的内容,然后打开该文件就可以进行翻译了! + + +- 翻译完后,使用git 提交更新到自己的仓库,后,在`https://github.com/vuefe/vuejs.org/pulls` 提交合并请求 + + + - 希望大家看清楚需要合并的分支,为`vuefe vuejs.org/2.0-cn` 分支,不要向`vuejs` 官方分支发起合并请求,也不要向 `vuefe vuejs.org/master` 分支发起合并请求,谢谢。 + +- 在QQ群里呼叫群主,合并请求 +- 群主合并内容,并记录贡献, 更新在线静态站内容 + diff --git a/src/api/index.md b/src/api/index.md index 2f6bfc908a..d30ffc1d5f 100644 --- a/src/api/index.md +++ b/src/api/index.md @@ -2,31 +2,31 @@ type: api --- -## Global Config +## 全局配置 -`Vue.config` is an object containing Vue's global configurations. You can modify its properties listed below before bootstrapping your application: +`Vue.config` is 是一个对象,包含 Vue 的全局配置。可以在启动应用之前修改下列属性: ### silent -- **Type:** `boolean` +- **类型:** `boolean` -- **Default:** `false` +- **默认值:** `false` -- **Usage:** +- **用法:** ``` js Vue.config.silent = true ``` - Suppress all Vue logs and warnings. + 取消 Vue 所有的日志与警告。 ### optionMergeStrategies -- **Type:** `{ [key: string]: Function }` +- **类型:** `{ [key: string]: Function }` -- **Default:** `{}` +- **默认值:** `{}` -- **Usage:** +- **用法:** ``` js Vue.config.optionMergeStrategies._my_option = function (parent, child, vm) { @@ -40,34 +40,34 @@ type: api // Profile.options._my_option = 2 ``` - Define custom merging strategies for options. + 自定义选项的混合策略。 - The merge strategy receives the value of that option defined on the parent and child instances as the first and second arguments, respectively. The context Vue instance is passed as the third argument. + 合并策略函数接收定义在父实例和子实例上的 option,分别作为第一个和第二个参数的值,Vue实例上下文被作为第三个参数传入。 -- **See also**: [Custom Option Merging Strategies](/guide/mixins.html#Custom-Option-Merge-Strategies) +- **参考**: [自定义选项的混合策略](/guide/mixins.html#Custom-Option-Merge-Strategies) ### devtools -- **Type:** `boolean` +- **类型:** `boolean` -- **Default:** `true` (`false` in production builds) +- **默认值:** `true` (生产版为 `false`) -- **Usage:** +- **用法:** ``` js - // make sure to set this synchronously immediately after loading Vue + // 务必在加载 Vue 之后,立即同步设置以下内容 Vue.config.devtools = true ``` - Configure whether to allow [vue-devtools](https://github.com/vuejs/vue-devtools) inspection. This option's default value is `true` in development builds and `false` in production builds. You can set it to `true` to enable inspection for production builds. + 配置是否允许 [vue-devtools](https://github.com/vuejs/vue-devtools) 检查代码。开发版本默认为 `true`,生产版本默认为 `false`。生产版本设为 `true` 可以启用检查。 ### errorHandler -- **Type:** `Function` +- **类型:** `Function` -- **Default:** Error is thrown in place +- **默认值:** 默认抛出错误 -- **Usage:** +- **用法:** ``` js Vue.config.errorHandler = function (err, vm) { @@ -75,41 +75,41 @@ type: api } ``` - Assign a handler for uncaught errors during component render and watchers. The handler gets called with the error and the Vue instance. + 指定组件的渲染和观察期间未捕获错误的处理函数。处理函数被调用时,可获取错误信息和 Vue 实例。 ### keyCodes -- **Type:** `{ [key: string]: number }` +- **类型:** `{ [key: string]: number }` -- **Default:** `{}` +- **默认值:** `{}` -- **Usage:** +- **用法:** ``` js Vue.config.keyCodes = { esc: 27 } ``` - Define custom key aliases for v-on. + 自定义 v-on 键位别名。 -## Global API +## 全局 API
{{firstName}} {{lastName}} aka {{alias}}
', data: function () { @@ -120,82 +120,82 @@ type: api } } }) - // create an instance of Profile and mount it on an element + // 创建 Profile 实例,并挂载到一个元素上。 new Profile().$mount('#mount-point') ``` - Will result in: + 结果如下: ``` htmlWalter White aka Heisenberg
``` -- **See also:** [Components](/guide/components.html) +- **参考:** [组件](/guide/components.html)Note that __you should not use an arrow function with the `data` property__ (e.g. `data: () => { return { a: this.myProp }}`). The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect and `this.myProp` will be undefined.
+注意,__不应该对 `data` 属性使用箭头函数__ (例如`data: () => { return { a: this.myProp }}`)。理由是箭头函数绑定了父级作用域的上下文,所以 this 将不会按照期望指向 Vue 实例,`this.myProp` 将是 undefined。
-- **See also:** [Reactivity in Depth](/guide/reactivity.html) +- **另见:** [深入响应式原理](/guide/reactivity.html) ### props -- **Type:** `ArrayNote that __you should not use an arrow function to define a computed property__ (e.g. `aDouble: () => this.a * 2`). The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect and `this.a` will be undefined.
+注意,__不应该使用箭头函数来定义计算属性函数__ (例如 `aDouble: () => this.a * 2`)。理由是箭头函数绑定了父级作用域的上下文,所以 `this` 将不会按照期望指向 Vue 实例,`this.a` 将是 undefined。
- Computed properties are cached, and only re-computed on reactive dependency changes. + 计算属性的结果会被缓存,除非依赖的响应式属性变化才会重新计算。 -- **Example:** +- **示例:** ```js var vm = new Vue({ data: { a: 1 }, computed: { - // get only, just need a function + // 仅读取,值只须为函数 aDouble: function () { return this.a * 2 }, - // both get and set + // 读取和设置 aPlus: { get: function () { return this.a + 1 @@ -451,20 +453,20 @@ type: api vm.aDouble // -> 4 ``` -- **See also:** - - [Computed Properties](/guide/computed.html) +- **另见:** + - [计算属性](/guide/computed.html) ### methods -- **Type:** `{ [key: string]: Function }` +- **类型:** `{ [key: string]: Function }` -- **Details:** +- **详细:** - Methods to be mixed into the Vue instance. You can access these methods directly on the VM instance, or use them in directive expressions. All methods will have their `this` context automatically bound to the Vue instance. + methods 将被混入到 Vue 实例中。可以直接通过 VM 实例访问这些方法,或者在指令表达式中使用。方法中的 `this` 自动绑定为 Vue 实例。 -Note that __you should not use an arrow function to define a method__ (e.g. `plus: () => this.a++`). The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect and `this.a` will be undefined.
+注意,__不应该使用箭头函数来定义 method 函数__ (例如 `plus: () => this.a++`)。理由是箭头函数绑定了父级作用域的上下文,所以 `this` 将不会按照期望指向 Vue 实例,`this.a` 将是 undefined。
-- **Example:** +- **示例:** ```js var vm = new Vue({ @@ -479,17 +481,17 @@ type: api vm.a // 2 ``` -- **See also:** [Methods and Event Handling](/guide/events.html) +- **另见:** [方法与事件处理器](/guide/events.html) ### watch -- **Type:** `{ [key: string]: string | Function | Object }` +- **类型:** `{ [key: string]: string | Function | Object }` -- **Details:** +- **详细:** - An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The Vue instance will call `$watch()` for each entry in the object at instantiation. + 一个对象,键是需要观察的表达式,值是对应回调函数。值也可以是方法名,或者包含选项的对象。Vue 实例将会在实例化时调用 `$watch()`,遍历 watch 对象的每一个属性。 -- **Example:** +- **示例:** ``` js var vm = new Vue({ @@ -502,9 +504,9 @@ type: api a: function (val, oldVal) { console.log('new: %s, old: %s', val, oldVal) }, - // string method name + // 方法名 b: 'someMethod', - // deep watcher + // 深度 watcher c: { handler: function (val, oldVal) { /* ... */ }, deep: true @@ -514,9 +516,9 @@ type: api vm.a = 2 // -> new: 2, old: 1 ``` -Note that __you should not use an arrow function to define a watcher__ (e.g. `searchQuery: newValue => this.updateAutocomplete(newValue)`). The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect and `this.updateAutocomplete` will be undefined.
+注意,__不应该使用箭头函数来定义 watcher 函数__ (例如 `searchQuery: newValue => this.updateAutocomplete(newValue)`)。理由是箭头函数绑定了父级作用域的上下文,所以 `this` 将不会按照期望指向 Vue 实例,`this.updateAutocomplete` 将是 undefined。
-- **See also:** [Instance Methods - vm.$watch](#vm-watch) +- **另见:** [实例方法 - vm.$watch](#vm-watch) ## 选项 / DOM @@ -695,49 +697,49 @@ type: api - **另见:** [生命周期图示](/guide/instance.html#Lifecycle-Diagram) -## Options / Assets +## 选项 / 资源 ### directives -- **Type:** `Object` +- **类型:** `Object` -- **Details:** +- **详细:** - A hash of directives to be made available to the Vue instance. +一个 用于 Vue 实例 的带 hash 的指令。 -- **See also:** - - [Custom Directives](/guide/custom-directive.html) - - [Assets Naming Convention](/guide/components.html#Assets-Naming-Convention) +- **另见:** + - [自定义指令](/guide/custom-directive.html) + - [资源命名约定](/guide/components.html#Assets-Naming-Convention) ### filters -- **Type:** `Object` +- **类型:** `Object` -- **Details:** +- **详细:** - A hash of filters to be made available to the Vue instance. +一个 用于 Vue 实例 的带 hash 的过滤器。 -- **See also:** +- **另见:** - [`Vue.filter`](#Vue-filter) ### components -- **Type:** `Object` +- **类型:** `Object` -- **Details:** +- **详细:** - A hash of components to be made available to the Vue instance. +一个 用于 Vue 实例 的带 hash 的组件。 -- **See also:** - - [Components](/guide/components.html) +- **另见:** + - [组件](/guide/components.html) -## Options / Misc +## 选项 / 杂项 ### parent -- **Type:** `Vue instance` +- **类型:** `Vue instance` -- **Details:** +- **详细:** Specify the parent instance for the instance to be created. Establishes a parent-child relationship between the two. The parent will be accessible as `this.$parent` for the child, and the child will be pushed into the parent's `$children` array. @@ -745,15 +747,15 @@ type: api ### mixins -- **Type:** `Array