docs: [config-provider] add slot scope (#5792)

This commit is contained in:
三咲智子 2022-02-06 09:20:37 +08:00 committed by GitHub
parent ea90c4c148
commit 8d1e66a5bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 19 deletions

View File

@ -11,8 +11,7 @@
"typescript",
"typescriptreact",
"html",
"vue",
"markdown"
"vue"
],
"eslint.validate": [
"javascript",
@ -20,8 +19,7 @@
"typescript",
"typescriptreact",
"html",
"vue",
"markdown"
"vue"
],
"vite.devCommand": "pnpm run dev -- --",
"i18n-ally.localesPaths": "packages/locale/lang",

View File

@ -5,11 +5,11 @@ lang: en-US
# Config Provider
Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere
Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere.
## i18n related configurations
## i18n Configurations
Configure i18n related properties via Config Provider, to get language switching feature
Configure i18n related properties via Config Provider, to get language switching feature.
:::demo Use two attributes to provide i18n related config
@ -17,7 +17,7 @@ config-provider/usage
:::
## button configurations
## Button Configurations
:::demo
@ -25,7 +25,7 @@ config-provider/button
:::
## message configurations
## Message Configurations
:::demo
@ -35,13 +35,13 @@ config-provider/message
## Config Provider Attributes
| Attribute | Description | Type | Accepted Values | Default |
| --------- | ----------------------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------- | ----------------------- |
| locale | Locale Object | Object\<Language\> | [languages](https://github.com/element-plus/element-plus/tree/dev/packages/locale/lang) | English |
| size | global component size | string | large / default /small | default |
| zIndex | global Initial zIndex | number | - | - |
| button | button related configuration, [see the following table](#button-attributes) | ButtonGlobalConfig | - | see the following table |
| message | message related configuration, [see the following table](#message-attributes) | MessageGlobalConfig | - | see the following table |
| Attribute | Description | Type | Accepted Values | Default |
| --------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| locale | Locale Object | [Language](https://github.com/element-plus/element-plus/blob/a98ff9b40c0c3d2b9959f99919bd8363e3e3c25a/packages/locale/index.ts#L5) | [languages](https://github.com/element-plus/element-plus/tree/dev/packages/locale/lang) | [English](https://github.com/element-plus/element-plus/blob/dev/packages/locale/lang/en.ts) |
| size | global component size | string | large / default /small | default |
| zIndex | global Initial zIndex | number | - | - |
| button | button related configuration, [see the following table](#button-attributes) | ButtonGlobalConfig | - | see the following table |
| message | message related configuration, [see the following table](#message-attributes) | MessageGlobalConfig | - | see the following table |
## Button Attributes
@ -57,6 +57,6 @@ config-provider/message
## ConfigProvider Slots
| Name | Description |
| ---- | ------------------------- |
| — | customize default content |
| Name | Description | Scope |
| ---- | ------------------------- | ------------------------------------------------------- |
| - | customize default content | config: provided global config (inherited from the top) |