Skip to content

Commit

Permalink
feat: optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and LYErin committed Dec 30, 2021
1 parent 106b557 commit a8da9ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/popover/demos/enUS/flip.demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Use `flip` to decide whether to adjust, use `flipLevel` to decide the level of a
<template #trigger>
<n-button> Offset </n-button>
</template>
<span
>The default level 1 is to adjust within the existing position. If the
<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
>
large enough, any offset will be blocked!
</span>
</n-popover>
```
8 changes: 4 additions & 4 deletions src/popover/demos/zhCN/flip.demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
使用 `flip` 决定是否调整,使用`flipLevel`决定调整等级

```html
<n-popover trigger="click" placement="bottom-start" :flip-level="2">
<n-popover trigger="click" placement="bottom" :flip-level="2">
<template #trigger>
<n-button> 我要调整 </n-button>
</template>
<span
>默认等级1是在已有位置内调整,如若已有位置不满足还是被遮挡了,可以设置等级为2,会在同纬度进行适当偏移的。注意:如果弹出信息足够大,怎么偏移都是会被遮挡哦!</span
>
<span>
默认等级1是在已有位置内调整,如若已有位置不满足还是被遮挡了,可以设置等级为2,会在同纬度进行适当偏移的。注意:如果弹出信息足够大,怎么偏移都是会被遮挡哦!注意:如果弹出信息足够大,怎么偏移都是会被遮挡哦!注意:如果弹出信息足够大,怎么偏移都是会被遮挡哦!
</span>
</n-popover>
```
3 changes: 1 addition & 2 deletions src/popover/src/PopoverBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,8 @@ export default defineComponent({
x: this.x,
y: this.y,
flip: this.flip,
placement: this.placement,
flip: this.flip,
flipLevel: this.flipLevel,
placement: this.placement,
containerClass: this.namespace,
ref: 'followerRef',
overlap: this.overlap,
Expand Down

0 comments on commit a8da9ce

Please sign in to comment.