-
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
Showing
5 changed files
with
44 additions
and
5 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
semi: false | ||
singleQuote: true | ||
printWidth: 80 | ||
trailingComma: "none" | ||
proseWrap: "never" | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 80, | ||
"trailingComma": "none", | ||
"proseWrap": "never" | ||
} |
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ loading | |
color | ||
group | ||
icon-button | ||
popover | ||
``` | ||
|
||
## API | ||
|
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 @@ | ||
# Using popover in disabled state | ||
|
||
The native disabled button won't trigger some mouse events so `n-popover` can't listen to it. If you need to use it, you can use `tag` prop to change button's behavior. | ||
|
||
```html | ||
<n-space> | ||
<n-tooltip> | ||
<template #trigger> | ||
<n-button disabled tag="div">Disabled button as div</n-button> | ||
</template> | ||
Lipsum | ||
</n-tooltip> | ||
</n-space> | ||
``` |
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ loading | |
color | ||
group | ||
icon-button | ||
popover | ||
rtl-debug | ||
debug | ||
``` | ||
|
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,21 @@ | ||
# 配合 Popover 的特殊情况 | ||
|
||
原生的 disabled 的 button 不会触发鼠标,因此 `n-popover` 无法监听到相关的事件。如果你需要在这种情况下使用,可以使用 `tag` 属性来调整 button 的行为。 | ||
|
||
```html | ||
<n-space> | ||
<n-tooltip> | ||
<template #trigger> | ||
<n-button disabled tag="div">突破</n-button> | ||
</template> | ||
工作遇到困难,齐心协力一起解决 | ||
</n-tooltip> | ||
<n-button>两天加班换一天调休</n-button> | ||
<n-tooltip> | ||
<template #trigger> | ||
<n-button disabled tag="div">惦记</n-button> | ||
</template> | ||
你必然一身才华,才会被这么多人惦记 | ||
</n-tooltip> | ||
</n-space> | ||
``` |
063024a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: