Skip to content

Commit fd5e333

Browse files
committed
feat: Add new component <API> as the alias of <Block>
1 parent 981b849 commit fd5e333

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

components/global.js

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ const install = (Vue) => {
2828
Vue.component(component.name, component)
2929
})
3030

31+
// <API> is the alias of <Block> component.
32+
Vue.component('API', Block)
33+
3134
Vue.prototype.$message = Message
3235
}
3336

docs/1-configurations/1-components.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Currently, the following components are mainly built-in:
2222

2323
## Block Component
2424

25-
2625
The `Block` component is mainly used to divide the page structure. Each `Block` component is a content group. It is convenient for you to control the page structure freely and flexibly.
2726

2827
<Example>
@@ -43,6 +42,30 @@ Contents...
4342

4443
<Block>
4544

45+
## API Component
46+
47+
The `API` component is the alias of `<Block>` component.
48+
49+
<Example>
50+
51+
Usage:
52+
53+
```vue
54+
<API>
55+
56+
## Endpoint
57+
58+
GET https://api.github.com/users/:username
59+
60+
</API>
61+
```
62+
63+
</Example>
64+
65+
</Block>
66+
67+
<Block>
68+
4669
## Example Component
4770

4871
The `Example` component is used to specify the content of the dark area on the right in the `<Block>` component. It can clearly identify the current part of the content as a use case.

0 commit comments

Comments
 (0)