# @wu-component/wu-popover

> > TODO: description

Latest version **2.0.3** (published 2023-12-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @wu-component/wu-popover
pnpm add @wu-component/wu-popover
yarn add @wu-component/wu-popover
bun add @wu-component/wu-popover
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2023-12-11 |
| First published | 2022-08-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 10 |
| Dependencies | 3 |
| Unpacked size | 113.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 216 |
| Author | Marvin |
| Maintainers | canyuegongzi |

## Links

- npm: https://www.npmjs.com/package/@wu-component/wu-popover
- Repository: https://github.com/wu-component/web-component-plus
- Homepage: https://github.com/wu-component/web-component-plus#readme
- Issues: https://github.com/wu-component/web-component-plus/issues
- npm.io page: https://npm.io/package/@wu-component/wu-popover

## Dependencies (3)

- [@popperjs/core](https://npm.io/package/@popperjs/core.md) ^2.11.5
- [@wu-component/common](https://npm.io/package/@wu-component/common.md) latest
- [@wu-component/web-core-plus](https://npm.io/package/@wu-component/web-core-plus.md) latest

## Recent versions

- 2.0.3 (latest) — 2023-12-11
- 2.0.0 (next) — 2023-02-26
- 2.0.1 — 2023-02-26
- 1.11.8 — 2023-02-16
- 1.11.7 — 2023-02-16
- 1.11.6 — 2023-02-15
- 1.11.4 — 2023-02-14
- 1.10.6 — 2023-02-13
- 1.10.2 — 2023-02-13
- 1.10.1 — 2023-02-13
- 1.9.24 — 2022-11-13
- 1.9.21 — 2022-11-12
- 1.9.20 — 2022-11-12
- 1.9.17 — 2022-11-12
- 1.9.1 — 2022-11-05
- … 19 more at https://npm.io/package/@wu-component/wu-popover/versions

## README

## Popover 弹出框

常用于主动操作后的反馈提示。

### 基础用法

::: demo
```html
<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
```html
<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
```html
<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、<br> right-start、right-end、left-start、 <br> left-end、top、bottom、left、right| bottom |

### Event

| 事件名      | 说明    | 参数     | 
|---------- |-------- |---------- |

### Slot

| 参数      | 说明    |
|---------- |-------- |
| popover  | 弹出层内容 |
| --  | 目标内容 |

---
_Source: https://npm.io/package/@wu-component/wu-popover · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
