-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Nov 29, 2021
1 parent
806e746
commit 61e23fb
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Adjust the popover | ||
|
||
Use `flip` to decide whether to adjust, use `flipLevel` to decide the level of adjustment. | ||
|
||
```html | ||
<n-popover | ||
trigger="click" | ||
placement="bottom-start" | ||
:flip="true" | ||
:flip-level="1" | ||
> | ||
<template #trigger> | ||
<n-button> Offset </n-button> | ||
</template> | ||
<span | ||
>The default level 1 is to adjust within the existing position. If the | ||
existing position is not satisfied, then you can set the level to 2, which | ||
will be offset appropriately at the same latitude. Note: if the popover is | ||
large enough, any offset will be blocked!</span | ||
> | ||
</n-popover> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 弹出信息的位置调整 | ||
|
||
使用 `flip` 决定是否调整,使用`flipLevel`决定调整等级 | ||
|
||
```html | ||
<n-popover trigger="click" placement="bottom-start" :flip-level="2"> | ||
<template #trigger> | ||
<n-button> 我要调整 </n-button> | ||
</template> | ||
<span | ||
>默认等级1是在已有位置内调整,如若已有位置不满足还是被遮挡了,可以设置等级为2,会在同纬度进行适当偏移的。注意:如果弹出信息足够大,怎么偏移都是会被遮挡哦!</span | ||
> | ||
</n-popover> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Popover 在内容周围弹出一些隐藏的信息。Popover 里面没什么内 | |
|
||
```demo | ||
basic | ||
flip | ||
trigger | ||
delay | ||
no-arrow | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters