mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
docs: [config-provider] add slot scope (#5792)
This commit is contained in:
parent
ea90c4c148
commit
8d1e66a5bf
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -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",
|
||||
|
@ -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) |
|
||||
|
Loading…
Reference in New Issue
Block a user