From 33ba9f5b0b9623b5e81c6ddd54faf2b67718b2e8 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Thu, 17 Nov 2016 15:44:13 +0800 Subject: [PATCH] Loading: update doc --- examples/docs/en-US/loading.md | 8 ++++---- examples/docs/zh-CN/loading.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/docs/en-US/loading.md b/examples/docs/en-US/loading.md index 0a3b819eb..cf7edea0f 100644 --- a/examples/docs/en-US/loading.md +++ b/examples/docs/en-US/loading.md @@ -152,7 +152,7 @@ You can customize a text message. ### Full screen loading -Show a full screen animation while loading data. +Show a full screen animation while loading data. :::demo Add the `fullscreen` modifier to create a full screen mask, and it will append to body. In this case, if you disable scrolling on body, you add another modifier `lock`. @@ -189,15 +189,15 @@ Show a full screen animation while loading data. ### Service You can also invoke Loading with a service. Import Loading service: ```javascript -import { LoadingService } from 'element-ui'; +import { Loading } from 'element-ui'; ``` Invoke it: ```javascript -LoadingService(options); +Loading.service(options); ``` The parameter `options` is the configuration of Loading, and its details can be found in the following table. `LoadingService` returns a Loading instance, and you can close it by invoking its `close` method: ```javascript -let loadingInstance = LoadingService(options); +let loadingInstance = Loading.service(options); loadingInstance.close(); ``` If Element is imported entirely, a globally method `$loading` will be registered to Vue.prototype. You can invoke it like this: `this.$loading(options)`, and it also returns a Loading instance. diff --git a/examples/docs/zh-CN/loading.md b/examples/docs/zh-CN/loading.md index e507f3152..3bdde4d1c 100644 --- a/examples/docs/zh-CN/loading.md +++ b/examples/docs/zh-CN/loading.md @@ -193,15 +193,15 @@ ### 服务 Loading 还可以以服务的方式调用。引入 Loading 服务: ```javascript -import { LoadingService } from 'element-ui'; +import { Loading } from 'element-ui'; ``` 在需要调用时: ```javascript -LoadingService(options); +Loading.service(options); ``` 其中 `options` 参数为 Loading 的配置项,具体见下表。`LoadingService` 会返回一个 Loading 实例,可通过调用该实例的 `close` 方法来关闭它: ```javascript -let loadingInstance = LoadingService(options); +let loadingInstance = Loading.service(options); loadingInstance.close(); ``` 如果完整引入了 Element,那么 Vue.prototype 上会有一个全局方法 `$loading`,它的调用方式为:`this.$loading(options)`,同样会返回一个 Loading 实例。