2.0.3 • Published 5 months ago
@wu-component/wu-popover v2.0.3
Popover 弹出框
常用于主动操作后的反馈提示。
基础用法
::: demo
<template>
<div style="display: flex; align-items: center;justify-content: center;width: 100%; margin-top: 8px; margin-bottom: 16px">
<wu-plus-popover style="width: 160px">
<wu-plus-button size="mini" type="primary">点击触发弹出底部信息</wu-plus-button>
<div slot="popover" tip="popover">
<div style="height: 28px;line-height: 28px;padding-left: 6px;">提示信息</div>
</div>
</wu-plus-popover>
<wu-plus-popover style="width: 160px" position="top">
<wu-plus-button size="mini" type="primary" >点击触发弹出顶部信息</wu-plus-button>
<div slot="popover" tip="popover">
<div style="height: 28px;line-height: 28px;padding-left: 6px;">提示信息</div>
</div>
</wu-plus-popover>
</div>
</template>
<script>
</script>
:::
不同触发方式
提供点击和鼠标进入触发。
::: demo
<template>
<div style="display: flex; align-items: center;justify-content: center;width: 100%; margin-top: 8px; margin-bottom: 16px">
<div style="display: flex; align-items: center;justify-content: center;width: 100%; margin-top: 8px; margin-bottom: 16px">
<wu-plus-popover style="width: 160px" trigger="hover">
<wu-plus-button size="mini" type="primary" >鼠标进入触触发</wu-plus-button>
<div slot="popover" tip="popover">
<div style="height: 28px;line-height: 28px;padding-left: 6px;">提示信息</div>
</div>
</wu-plus-popover>
<wu-plus-popover style="width: 160px" trigger="click">
<wu-plus-button size="mini" type="primary" >点击触触发</wu-plus-button>
<div slot="popover" tip="popover">
<div style="height: 28px;line-height: 28px;padding-left: 6px;">提示信息</div>
</div>
</wu-plus-popover>
</div>
</div>
</template>
<script>
</script>
:::
主题自定义
开发者可以自定义 slot 的样式。
::: demo
<template>
<div style="display: flex; height: 100px; align-items: center;justify-content: center;width: 100%; margin-top: 8px; margin-bottom: 16px">
<wu-plus-popover style="width: 160px" trigger="click" effect="dark">
<wu-plus-button size="mini" type="primary" >提示信息-修改样式</wu-plus-button>
<div slot="popover" tip="popover">
<div style="height: 28px;color:red;line-height: 28px;padding-left: 6px;">提示信息</div>
</div>
</wu-plus-popover>
</div>
</template>
<script>
</script>
:::
Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
trigger | 触发方式 | String | click、hover、manual | click |
position | 出现位置 | Placement | top-start、top-end、bottom-start、bottom-end、 right-start、right-end、left-start、 left-end、top、bottom、left、right | bottom |
Event
事件名 | 说明 | 参数 |
---|
Slot
参数 | 说明 |
---|---|
popover | 弹出层内容 |
-- | 目标内容 |
2.0.3
5 months ago
2.0.1
1 year ago
2.0.0
1 year ago
1.11.8
1 year ago
1.11.7
1 year ago
1.11.6
1 year ago
1.11.4
1 year ago
1.10.6
1 year ago
1.10.2
1 year ago
1.10.1
1 year ago
1.9.24
2 years ago
1.9.21
2 years ago
1.9.20
2 years ago
1.9.17
2 years ago
1.9.1
2 years ago
1.8.0
2 years ago
1.7.0
2 years ago
1.6.1
2 years ago
1.6.0
2 years ago
1.5.0
2 years ago
1.4.3
2 years ago
1.4.2
2 years ago
1.4.1
2 years ago
1.4.0
2 years ago
1.0.1
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago