Skip to content

Commit 5e1bb76

Browse files
committed
删去已翻译的英文原文
1 parent 8162eb5 commit 5e1bb76

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

source/api/global-api.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,80 +5,58 @@ order: 5
55

66
### Vue.config
77

8-
`Vue.config` is an object containing Vue's global settings. Here are the list of all the avaiable settings with their default values:
98
`Vue.config` 是包含 Vue 全局设置的对象。下面列出了所有可设置变量及其默认值:
109

1110
``` js
1211
{
13-
// print stack trace for warnings?
1412
// 打印 warnings 的堆栈跟踪?
1513
debug: true,
16-
// attribute prefix for directives
1714
// 指令的属性前缀
1815
prefix: 'v-',
19-
// interpolation delimiters
2016
// 插入分隔符
21-
// for HTML interpolations, add
22-
// 1 extra outer-most character.
2317
// 对于插入HTML,添加一个额外的最外层字符
2418
delimiters: ['{{', '}}'],
25-
// suppress warnings?
2619
// 抑制 warnings?
2720
silent: false,
28-
// interpolate mustache bindings?
2921
// 插入 mustache 绑定?
3022
interpolate: true,
31-
// use async updates (for directives & watchers)?
3223
// (对 directives 和 watchers)使用异步更新?
3324
async: true,
34-
// allow altering observed Array's prototype chain?
3525
// 允许改变所观察的Array的原型链?
3626
proto: true
3727
}
3828
```
3929

40-
You can modify them directly, for example:
4130
你可以直接对其修改,例如:
4231

4332
``` js
44-
Vue.config.debug = true // turn on debugging mode
4533
Vue.config.debug = true // 开启调试模式
4634
```
4735

48-
**Debug Mode**
4936
**调试模式**
5037

51-
When `Vue.config.debug` is set to true, Vue will automatically use synchronous mode and throw a `debugger` statement when there is a warning. This enables the user to inspect the full stack trace in browser dev tools.
5238
`Vue.config.debug` 设置为 true 时,Vue 会自动启动同步模式,并在有警告时抛出一个 `debugger ` 语句。这使得用户能够在浏览器开发工具中检查完整的堆栈跟踪(full stack trace)
5339

54-
<p class="tip">debug mode is not available in the minified production builds.</p>
5540
<p class="tip">调试模式在压缩的生产环境(minified production builds)下是不可用的</p>
5641

57-
**Changing Delimiters**
5842
**改变分隔符(Delimiters)**
5943

60-
When the delimiters are set for text interpolation, the delimiters for HTML interpolation will be generated by adding one outer-most symbol on both sides:
6144
当分隔符(delimiters)是设置为插入文本时,那么设置为插入HTML的分隔符可以通过在两边的最外层加上符号来生成。
6245

6346
``` js
6447
Vue.config.delimiters = ['(%', '%)']
65-
// tags now are (% %) for text
6648
// (% %)是文本的标签
67-
// and ((% %)) for HTML
6849
// 则((% %))是HTML的标签
6950
```
7051

7152
### Vue.extend( options )
7253

7354
- **options** `Object`
7455

75-
Create a "subclass" of the base Vue constructor. All [instantiation options](../api/options.html) can be used here. The special cases to note here are `el` and `data`, which must be functions in this case.
7656
创建一个基类 Vue 构造函数的"子类"。所有的[实例化选项](../api/options.html)都可以在此用到。其中需要特殊提及的是 `el``data`,在这个类里他们必须作为函数使用。
7757

78-
Internally, `Vue.extend()` is called on all component options before instantiating the components. For more details regarding components, see [Component System](../guide/components.html).
7958
在所有组件(components)被初始化之前,`Vue.extend()`被组件选项隐式地调用。关于组件更多的细节,可详见[组件系统](../guide/components.html)
8059

81-
**Example**
8260
**例子**
8361

8462
``` js
@@ -99,7 +77,6 @@ profile.$appendTo('body')
9977

10078
```
10179

102-
Will result in:
10380
将输出:
10481

10582
``` html
@@ -109,49 +86,38 @@ Will result in:
10986
### Vue.directive( id, [definition] )
11087

11188
- **id** `String`
112-
- **definition** `Function` or `Object` *optional*
11389
- **definition** `Function` or `Object` *可选的*
11490

115-
Register or retrieve a global custom directive. For more details see [Writing Custom Directives](../guide/custom-directive.html).
11691
注册或取得一个全局自定义的指令。详情见[编写自定义指令](../guide/custom-directive.html)
11792

11893
### Vue.filter( id, [definition] )
11994

12095
- **id** `String`
121-
- **definition** `Function` *optional*
12296
- **definition** `Function` *可选的*
12397

124-
Register or retrieve a global custom filter. For more details see [Writing Custom Filters](../guide/custom-filter.html).
12598
注册或取得一个全局自定义的过滤器。详情见[编写自定义过滤器](../guide/custom-filter.html)
12699

127100
### Vue.component( id, [definition] )
128101

129102
- **id** `String`
130-
- **definition** `Function Constructor` or `Object` *optional*
131103
- **definition** `Function Constructor` or `Object` *可选的*
132104

133-
Register or retrieve a global component. For more details see [Component System](../guide/components.html).
134105
注册或取得一个全局自定义的组件。详情见[组件系统](../guide/components.html)
135106

136107
### Vue.transition( id, [definition] )
137108

138109
- **id** `String`
139-
- **definition** `Object` *optional*
140110
- **definition** `Object` *可选的*
141111

142-
Register or retrieve a global JavaScript transition effect definition. For more details see the guide for [JavaScript Transitions](../guide/transitions.html#JavaScript_Functions).
143112
注册或取得一个全局 JavaScript 转换效应(transition effect)定义。详见[JavaScript转换](../guide/transitions.html#JavaScript_Functions)的指导。
144113

145114
### Vue.partial( id, [definition] )
146115

147116
- **id** `String`
148-
- **definition** `String | Node` *optional*
149117
- **definition** `String | Node` *可选的*
150118

151-
Register or retrieve a global partial. The definition can be a template string, a querySelector that starts with `#`, a DOM element (whose innerHTML will be used as the template string), or a DocumentFragment.
152119
注册或取得一个全局的partial。定义可以是一个string模板,一个以`#`开头的querySelector,一个DOM元素(其内嵌HTML作为string模板使用)或者一个DocumentFragment
153120

154-
**Example**
155121
**例子**
156122
HTML
157123

@@ -174,7 +140,6 @@ new Vue({
174140
})
175141
```
176142

177-
Will result in:
178143
将输出:
179144

180145
``` html
@@ -187,19 +152,15 @@ Will result in:
187152

188153
- **callback** `Function`
189154

190-
Vue.js batches view updates and executes them all asynchronously. It uses `requestAnimationFrame` if available and falls back to `setTimeout(fn, 0)`. This method calls the callback after the next view update, which can be useful when you want to wait until the view has been updated.
191155
Vue.js 批量处理视图更新并对其异步执行。如果可用的话它会使用 `requestAnimationFrame` 并返回到 `setTimeout(fn, 0)`。这个方法在下一个视图更新后调用回调,当你想一直等待到该视图被更新了,用这个方法会很好。
192156

193157
### Vue.use( plugin, [args...] )
194158

195159
- **plugin** `Object` or `Function`
196-
- **args...** *optional*
197160
- **args...** *可选的*
198161

199-
Mount a Vue.js plugin. If the plugin is an Object, it must have an `install` method. If it is a function itself, it will be treated as the install method. The install method will be called with Vue as the argument. For more details, see [Plugins](../guide/extending.html#Extend_with_Plugins).
200162
挂载一个 Vue.js 的插件。如果该插件是一个对象,它必须有一个 `install` 的方法。如果它本身就是一个方法,它必须被作为安装方法来对待。安装方法将会被 Vue 作为一个参数来调用。更多详情请阅[插件](../guide/extending.html#Extend_with_Plugins)
201163

202164
### Vue.util
203165

204-
Exposes the internal `util` module, which contains a number of utility methods. This is intended for advanced plugin/directive authoring, so you will need to look at the source code to see what's available.
205166
公开内部的 `util` 模块。该模块包含一些列实用方法(utility methods)。这是被为用来编写高级插件/指令,因此你必须查看源码来确定哪些是可操作的。

0 commit comments

Comments
 (0)