From 2c71424b32e6e5f0a2ea0abb4fa8d5d767c975f8 Mon Sep 17 00:00:00 2001 From: Yugang Cao <34439652+Talljack@users.noreply.github.com> Date: Fri, 31 Dec 2021 00:39:01 +0800 Subject: [PATCH] fix: popselect remove arrow prop (#2081) Co-authored-by: yugang.cao --- src/popover/demos/enUS/index.demo-entry.md | 6 +++--- src/popover/demos/zhCN/index.demo-entry.md | 2 +- src/popselect/src/Popselect.tsx | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/popover/demos/enUS/index.demo-entry.md b/src/popover/demos/enUS/index.demo-entry.md index 7e3e63df088..38e56f84cff 100644 --- a/src/popover/demos/enUS/index.demo-entry.md +++ b/src/popover/demos/enUS/index.demo-entry.md @@ -36,12 +36,12 @@ header | overlap | `boolean` | `false` | Overlap trigger element. | | placement | `'top-start' \| 'top' \| 'top-end' \| 'right-start' \| 'right' \| 'right-end' \| 'bottom-start' \| 'bottom' \| 'bottom-end' \| 'left-start' \| 'left' \| 'left-end' \| ` | `'top'` | Popover placement. | | raw | `boolean` | `false` | Whether to use no default styles. | -| show-arrow | `boolean` | `true` | Whether to show arrow if set. | -| show | `boolean` | `undefined` | Whether to show arrow. | +| show-arrow | `boolean` | `true` | Whether to show arrow if set, popselect component does not support. | +| show | `boolean` | `undefined` | Whether to show popover. | | title | `string` | `undefined` | Popover title. | | to | `string \| HTMLElement \| false` | `'body'` | Container node of the popover content. `false` will keep it at trigger container. | | trigger | `'hover' \| 'click' \| 'focus' \| 'manual'` | `'hover'` | The popover trigger type. | -| width | `number \| 'trigger'` | `undefined` | `'trigger'` means popover's witdh will follow its trigger's width. | +| width | `number \| 'trigger'` | `undefined` | `'trigger'` means popover's width will follow its trigger's width. | | x | `number` | `undefined` | The CSS `left` pixel value when popover manually positioned (x, y need to be set together). | | y | `number` | `undefined` | The CSS `top` pixel value when popover manually positioned (x, y need to be set together). | | z-index | `number` | `undefined` | The z-index of the popover. | diff --git a/src/popover/demos/zhCN/index.demo-entry.md b/src/popover/demos/zhCN/index.demo-entry.md index 0c256bb15d8..17cef1b5a02 100644 --- a/src/popover/demos/zhCN/index.demo-entry.md +++ b/src/popover/demos/zhCN/index.demo-entry.md @@ -42,7 +42,7 @@ zindex-debug.vue | overlap | `boolean` | `false` | 覆盖触发元素 | | placement | `'top-start' \| 'top' \| 'top-end' \| 'right-start' \| 'right' \| 'right-end' \| 'bottom-start' \| 'bottom' \| 'bottom-end' \| 'left-start' \| 'left' \| 'left-end' \| ` | `'top'` | popover 的弹出位置 | | raw | `boolean` | `false` | 是否不添加默认样式 | -| show-arrow | `boolean` | `true` | 是否显示箭头 | +| show-arrow | `boolean` | `true` | 是否显示箭头, popselect 组件不支持 | | show | `boolean` | `undefined` | 是否展示 popover | | title | `string` | `undefined` | popover 的 title 信息 | | to | `string \| HTMLElement \| false` | `'body'` | 弹出内容的卸载位置,false 会待在原地 | diff --git a/src/popselect/src/Popselect.tsx b/src/popselect/src/Popselect.tsx index 2b2e2dbc1c8..6aede1fc5fa 100644 --- a/src/popselect/src/Popselect.tsx +++ b/src/popselect/src/Popselect.tsx @@ -14,7 +14,7 @@ import { popselectInjectionKey } from './interface' const popselectProps = { ...(useTheme.props as ThemeProps), - ...popoverBaseProps, + ...omit(popoverBaseProps, ['showArrow', 'arrow']), placement: { ...popoverBaseProps.placement, default: 'bottom' @@ -23,7 +23,6 @@ const popselectProps = { type: String as PropType, default: 'hover' }, - showArrow: Boolean, ...panelProps }