feat(Popover): add overlay-style prop (#8354)

This commit is contained in:
neverland 2021-03-15 20:20:41 +08:00 committed by GitHub
parent 536f2fad38
commit c452926cd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import {
nextTick, nextTick,
PropType, PropType,
onMounted, onMounted,
CSSProperties,
TeleportProps, TeleportProps,
onBeforeUnmount, onBeforeUnmount,
defineComponent, defineComponent,
@ -32,6 +33,7 @@ const popupProps = [
'show', 'show',
'overlay', 'overlay',
'teleport', 'teleport',
'overlayStyle',
'overlayClass', 'overlayClass',
'closeOnClickOverlay', 'closeOnClickOverlay',
] as const; ] as const;
@ -67,6 +69,7 @@ export default defineComponent({
show: Boolean, show: Boolean,
overlay: Boolean, overlay: Boolean,
overlayClass: UnknownProp, overlayClass: UnknownProp,
overlayStyle: Object as PropType<CSSProperties>,
offset: { offset: {
type: (Array as unknown) as PropType<[number, number]>, type: (Array as unknown) as PropType<[number, number]>,
default: () => [0, 8], default: () => [0, 8],

View File

@ -212,6 +212,7 @@ export default {
| offset | Distance to reference | _[number, number]_ | `[0, 8]` | | offset | Distance to reference | _[number, number]_ | `[0, 8]` |
| overlay | Whether to show overlay | _boolean_ | `false` | | overlay | Whether to show overlay | _boolean_ | `false` |
| overlay-class `v3.0.10` | Custom overlay class | _string \| Array \| object_ | - | | overlay-class `v3.0.10` | Custom overlay class | _string \| Array \| object_ | - |
| overlay-style `v3.0.10` | Custom overlay style | _object_ | - |
| close-on-click-action | Whether to close when clicking action | _boolean_ | `true` | | close-on-click-action | Whether to close when clicking action | _boolean_ | `true` |
| close-on-click-outside | Whether to close when clicking outside | _boolean_ | `true` | | close-on-click-outside | Whether to close when clicking outside | _boolean_ | `true` |
| close-on-click-overlay `v3.0.10` | Whether to close when clicking overlay | _boolean_ | `true` | | close-on-click-overlay `v3.0.10` | Whether to close when clicking overlay | _boolean_ | `true` |

View File

@ -226,6 +226,7 @@ export default {
| offset | 出现位置的偏移量 | _[number, number]_ | `[0, 8]` | | offset | 出现位置的偏移量 | _[number, number]_ | `[0, 8]` |
| overlay | 是否显示遮罩层 | _boolean_ | `false` | | overlay | 是否显示遮罩层 | _boolean_ | `false` |
| overlay-class `v3.0.10` | 自定义遮罩层类名 | _string \| Array \| object_ | - | | overlay-class `v3.0.10` | 自定义遮罩层类名 | _string \| Array \| object_ | - |
| overlay-style `v3.0.10` | 自定义遮罩层样式 | _object_ | - |
| close-on-click-action | 是否在点击选项后关闭 | _boolean_ | `true` | | close-on-click-action | 是否在点击选项后关闭 | _boolean_ | `true` |
| close-on-click-outside | 是否在点击外部元素后关闭菜单 | _boolean_ | `true` | | close-on-click-outside | 是否在点击外部元素后关闭菜单 | _boolean_ | `true` |
| close-on-click-overlay `v3.0.10` | 是否在点击遮罩层后关闭菜单 | _boolean_ | `true` | | close-on-click-overlay `v3.0.10` | 是否在点击遮罩层后关闭菜单 | _boolean_ | `true` |