diff --git a/src/action-sheet/README.md b/src/action-sheet/README.md index a46d05f4c..960421ebc 100644 --- a/src/action-sheet/README.md +++ b/src/action-sheet/README.md @@ -97,6 +97,7 @@ export default { | title | Title | `string` | - | | cancel-text | Text of cancel button | `string` | - | | overlay | Whether to show overlay | `boolean` | `true` | +| round | Whether to show round corner | `boolean` | `false` | | close-on-click-action | Whether to close when click action | `boolean` | `false` | | close-on-click-overlay | Whether to close when click overlay | `boolean` | `true` | | lazy-render | Whether to lazy render util appeared | `boolean` | `true` | diff --git a/src/action-sheet/README.zh-CN.md b/src/action-sheet/README.zh-CN.md index c2feb946d..27dc1e64c 100644 --- a/src/action-sheet/README.zh-CN.md +++ b/src/action-sheet/README.zh-CN.md @@ -104,6 +104,7 @@ export default { | title | 标题 | `string` | - | - | | cancel-text | 取消按钮文字 | `string` | - | - | | overlay | 是否显示遮罩层 | `boolean` | `true` | - | +| round | 是否显示圆角 | `boolean` | `false` | 2.0.9 | | close-on-click-action | 是否在点击选项后关闭 | `boolean` | `false` | 2.0.0 | | close-on-click-overlay | 是否在点击遮罩层后关闭 | `boolean` | `true` | - | | lazy-render | 是否在显示弹层时才渲染节点 | `boolean` | `true` | - | diff --git a/src/action-sheet/index.tsx b/src/action-sheet/index.tsx index cd64dba6f..7b7f802e5 100644 --- a/src/action-sheet/index.tsx +++ b/src/action-sheet/index.tsx @@ -21,6 +21,7 @@ export type ActionSheetItem = { export type ActionSheetProps = PopupMixinProps & { title?: string; + round?: boolean; actions?: ActionSheetItem[]; duration: number; cancelText?: string; @@ -116,6 +117,7 @@ function ActionSheet( +
Option
+ +`; diff --git a/src/action-sheet/test/index.spec.js b/src/action-sheet/test/index.spec.js index 007b2f18b..f1b147d4a 100644 --- a/src/action-sheet/test/index.spec.js +++ b/src/action-sheet/test/index.spec.js @@ -137,3 +137,15 @@ test('close-on-click-action prop', () => { expect(onInput).toHaveBeenCalledWith(false); }); + +test('round prop', () => { + const wrapper = mount(ActionSheet, { + propsData: { + value: true, + round: true, + actions: [{ name: 'Option' }] + } + }); + + expect(wrapper).toMatchSnapshot(); +});