diff --git a/src/dialog/Dialog.js b/src/dialog/Dialog.js index 4b132f926..18058a819 100644 --- a/src/dialog/Dialog.js +++ b/src/dialog/Dialog.js @@ -225,7 +225,9 @@ export default createComponent({ > {Title} {this.genContent(title, messageSlot)} - {this.theme === 'round' ? this.genRoundButtons() : this.genButtons()} + {this.theme === 'round-button' + ? this.genRoundButtons() + : this.genButtons()} ); diff --git a/src/dialog/README.md b/src/dialog/README.md index 82faf94ae..c7fed18ab 100644 --- a/src/dialog/README.md +++ b/src/dialog/README.md @@ -30,22 +30,22 @@ Dialog.alert({ }); ``` -### Round Style +### Round Button Style -use round style. +Use round button style. ```js Dialog.alert({ title: 'Title', message: 'Content', - theme: 'round', + theme: 'round-button', }).then(() => { // on close }); Dialog.alert({ message: 'Content', - theme: 'round', + theme: 'round-button', }).then(() => { // on close }); diff --git a/src/dialog/README.zh-CN.md b/src/dialog/README.zh-CN.md index 1ac85430f..67818beda 100644 --- a/src/dialog/README.zh-CN.md +++ b/src/dialog/README.zh-CN.md @@ -56,22 +56,22 @@ Dialog.alert({ }); ``` -### 圆角风格 +### 圆角按钮风格 -样式为圆角风格。 +将 theme 选项设置为 `round-button` 可以展示圆角按钮风格的弹窗,该选项从 2.10.0 版本开始支持。 ```js Dialog.alert({ title: '标题', message: '弹窗内容', - theme: 'round', + theme: 'round-button', }).then(() => { // on close }); Dialog.alert({ message: '弹窗内容', - theme: 'round', + theme: 'round-button', }).then(() => { // on close }); diff --git a/src/dialog/demo/index.vue b/src/dialog/demo/index.vue index 41e3dd17b..50c2198c7 100644 --- a/src/dialog/demo/index.vue +++ b/src/dialog/demo/index.vue @@ -9,7 +9,7 @@ - + {{ t('alert1') }} @@ -52,7 +52,7 @@ export default { 'zh-CN': { alert1: '提示弹窗', alert2: '提示弹窗(无标题)', - round: '圆角样式', + round: '圆角按钮样式', confirm: '确认弹窗', asyncClose: '异步关闭', componentCall: '组件调用', @@ -61,6 +61,7 @@ export default { 'en-US': { alert1: 'Alert', alert2: 'Alert without title', + round: 'Round Button Style', confirm: 'Confirm dialog', asyncClose: 'Async Close', componentCall: 'Component Call', @@ -91,7 +92,7 @@ export default { onClickRound() { this.$dialog.alert({ - theme: 'round', + theme: 'round-button', title: this.t('title'), message: this.t('content'), }); @@ -99,7 +100,7 @@ export default { onClickRound2() { this.$dialog.alert({ - theme: 'round', + theme: 'round-button', message: this.t('content'), }); },