diff --git a/examples/docs/en-US/alert.md b/examples/docs/en-US/alert.md index 7369a72bd..a83f7f2c8 100644 --- a/examples/docs/en-US/alert.md +++ b/examples/docs/en-US/alert.md @@ -118,6 +118,42 @@ Displaying an icon improves readability. ``` ::: +## Centered text + +Use the `center` attribute to center the text. + +::: demo + +```html + +``` +::: + ### With description Description includes a message with more detailed information. @@ -176,6 +212,7 @@ Description includes a message with more detailed information. | type | component type | string | success/warning/info/error | info | | description | descriptive text. Can also be passed with the default slot | string | — | — | | closable | if closable or not | boolean | — | true | +| center | whether to center the text | boolean | — | false | | close-text | customized close button text | string | — | — | | show-icon | if a type icon is displayed | boolean | — | false | diff --git a/examples/docs/en-US/message.md b/examples/docs/en-US/message.md index fd6e92054..fabc441c7 100644 --- a/examples/docs/en-US/message.md +++ b/examples/docs/en-US/message.md @@ -214,7 +214,7 @@ A close button can be added. ::: ### Centered text -Use the `center` attribute to center the text +Use the `center` attribute to center the text. :::demo diff --git a/examples/docs/zh-CN/alert.md b/examples/docs/zh-CN/alert.md index 09451c5b4..4208cc98b 100644 --- a/examples/docs/zh-CN/alert.md +++ b/examples/docs/zh-CN/alert.md @@ -115,6 +115,41 @@ ``` ::: +### 文字居中 + +使用 `center` 属性让文字水平居中。 + +::: demo +```html + +``` +::: + ### 带有辅助性文字介绍 包含标题和内容,解释更详细的警告。 @@ -171,6 +206,7 @@ | type | 主题 | string | success/warning/info/error | info | | description | 辅助性文字。也可通过默认 slot 传入 | string | — | — | | closable | 是否可关闭 | boolean | — | true | +| center | 文字是否居中 | boolean | — | true | | close-text | 关闭按钮自定义文本 | string | — | — | | show-icon | 是否显示图标 | boolean | — | false | diff --git a/examples/docs/zh-CN/message.md b/examples/docs/zh-CN/message.md index 00f88cdb9..776879efd 100644 --- a/examples/docs/zh-CN/message.md +++ b/examples/docs/zh-CN/message.md @@ -214,7 +214,7 @@ ::: ### 文字居中 -使用 `center` 属性让文字水平居中 +使用 `center` 属性让文字水平居中。 :::demo diff --git a/packages/alert/src/main.vue b/packages/alert/src/main.vue index de8609386..30eb620b2 100644 --- a/packages/alert/src/main.vue +++ b/packages/alert/src/main.vue @@ -2,7 +2,7 @@