2.0.3 • Published 5 months ago

@wu-component/wu-popover v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

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触发方式Stringclick、hover、manualclick
position出现位置Placementtop-start、top-end、bottom-start、bottom-end、 right-start、right-end、left-start、 left-end、top、bottom、left、rightbottom

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