feat(Popover): add duration prop (#8355)

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

View File

@ -32,6 +32,7 @@ const [name, bem] = createNamespace('popover');
const popupProps = [
'show',
'overlay',
'duration',
'teleport',
'overlayStyle',
'overlayClass',
@ -68,6 +69,7 @@ export default defineComponent({
props: {
show: Boolean,
overlay: Boolean,
duration: [Number, String],
overlayClass: UnknownProp,
overlayStyle: Object as PropType<CSSProperties>,
offset: {

View File

@ -209,6 +209,7 @@ export default {
| placement | Placement | _string_ | `bottom` |
| theme | Themecan be set to `dark` | _string_ | `light` |
| trigger | Trigger modecan be set to `manual` | `click` |
| duration | Transition duration, unit second | _number \| string_ | `0.3` |
| offset | Distance to reference | _[number, number]_ | `[0, 8]` |
| overlay | Whether to show overlay | _boolean_ | `false` |
| overlay-class `v3.0.10` | Custom overlay class | _string \| Array \| object_ | - |

View File

@ -223,6 +223,7 @@ export default {
| placement | 弹出位置 | _string_ | `bottom` |
| theme | 主题风格,可选值为 `dark` | _string_ | `light` |
| trigger | 触发方式,可选值为 `manual` | `click` |
| duration | 动画时长,单位秒 | _number \| string_ | `0.3` |
| offset | 出现位置的偏移量 | _[number, number]_ | `[0, 8]` |
| overlay | 是否显示遮罩层 | _boolean_ | `false` |
| overlay-class `v3.0.10` | 自定义遮罩层类名 | _string \| Array \| object_ | - |