Skip to content

Commit

Permalink
动画效果调整
Browse files Browse the repository at this point in the history
  • Loading branch information
bplok20010 committed Aug 5, 2020
1 parent 1ae020d commit 1b23f98
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 99 deletions.
75 changes: 33 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,6 @@ export interface TooltipProps extends Omit<TriggerProps, "popup" | "defaultPopup
delay: 100,
trigger: ["hover"],
outsideHideEventName: ["mousedown", "click"],
transition: {
classNames: {
appear: "tooltip-animated",
appearActive: "tooltip-fade-in",
appearDone: "",
enter: "tooltip-animated",
enterActive: "tooltip-fade-in",
enterDone: "",
exit: "tooltip-animated",
exitActive: "tooltip-fade-out",
exitDone: "",
},
timeout: 300,
},
}
```

Expand Down Expand Up @@ -154,82 +140,86 @@ export interface TooltipProps extends Omit<TriggerProps, "popup" | "defaultPopup
box-sizing: border-box;
}

.rw-tooltip-placement-top > .rw-tooltip-arrow,
.rw-tooltip-placement-top-left > .rw-tooltip-arrow,
.rw-tooltip-placement-top-right > .rw-tooltip-arrow {
.rw-tooltip-placement-top>.rw-tooltip-arrow,
.rw-tooltip-placement-top-left>.rw-tooltip-arrow,
.rw-tooltip-placement-top-right>.rw-tooltip-arrow {
bottom: -5px;
border-width: 5px 5px 0;
border-top-color: rgba(0, 0, 0, 0.9);
}

.rw-tooltip-placement-bottom > .rw-tooltip-arrow,
.rw-tooltip-placement-bottom-left > .rw-tooltip-arrow,
.rw-tooltip-placement-bottom-right > .rw-tooltip-arrow {
.rw-tooltip-placement-bottom>.rw-tooltip-arrow,
.rw-tooltip-placement-bottom-left>.rw-tooltip-arrow,
.rw-tooltip-placement-bottom-right>.rw-tooltip-arrow {
top: -5px;
border-width: 0 5px 5px;
border-bottom-color: rgba(0, 0, 0, 0.9);
}

.rw-tooltip-placement-left > .rw-tooltip-arrow,
.rw-tooltip-placement-left-top > .rw-tooltip-arrow,
.rw-tooltip-placement-left-bottom > .rw-tooltip-arrow {
.rw-tooltip-placement-left>.rw-tooltip-arrow,
.rw-tooltip-placement-left-top>.rw-tooltip-arrow,
.rw-tooltip-placement-left-bottom>.rw-tooltip-arrow {
right: -5px;
border-width: 5px 0 5px 5px;
border-left-color: rgba(0, 0, 0, 0.9);
}

.rw-tooltip-placement-right > .rw-tooltip-arrow,
.rw-tooltip-placement-right-top > .rw-tooltip-arrow,
.rw-tooltip-placement-right-bottom > .rw-tooltip-arrow {
.rw-tooltip-placement-right>.rw-tooltip-arrow,
.rw-tooltip-placement-right-top>.rw-tooltip-arrow,
.rw-tooltip-placement-right-bottom>.rw-tooltip-arrow {
left: -5px;
border-width: 5px 5px 5px 0;
border-right-color: rgba(0, 0, 0, 0.9);
}

.rw-tooltip-placement-top-left > .rw-tooltip-arrow,
.rw-tooltip-placement-bottom-left > .rw-tooltip-arrow {
.rw-tooltip-placement-top-left>.rw-tooltip-arrow,
.rw-tooltip-placement-bottom-left>.rw-tooltip-arrow {
left: 16px;
}

.rw-tooltip-placement-top > .rw-tooltip-arrow,
.rw-tooltip-placement-bottom > .rw-tooltip-arrow {
.rw-tooltip-placement-top>.rw-tooltip-arrow,
.rw-tooltip-placement-bottom>.rw-tooltip-arrow {
left: 50%;
margin-left: -5px;
}

.rw-tooltip-placement-top-right > .rw-tooltip-arrow,
.rw-tooltip-placement-bottom-right > .rw-tooltip-arrow {
.rw-tooltip-placement-top-right>.rw-tooltip-arrow,
.rw-tooltip-placement-bottom-right>.rw-tooltip-arrow {
right: 16px;
}

.rw-tooltip-placement-left-top > .rw-tooltip-arrow,
.rw-tooltip-placement-right-top > .rw-tooltip-arrow {
.rw-tooltip-placement-left-top>.rw-tooltip-arrow,
.rw-tooltip-placement-right-top>.rw-tooltip-arrow {
top: 8px;
}

.rw-tooltip-placement-left > .rw-tooltip-arrow,
.rw-tooltip-placement-right > .rw-tooltip-arrow {
.rw-tooltip-placement-left>.rw-tooltip-arrow,
.rw-tooltip-placement-right>.rw-tooltip-arrow {
top: 50%;
margin-top: -5px;
}

.rw-tooltip-placement-left-bottom > .rw-tooltip-arrow,
.rw-tooltip-placement-right-bottom > .rw-tooltip-arrow {
.rw-tooltip-placement-left-bottom>.rw-tooltip-arrow,
.rw-tooltip-placement-right-bottom>.rw-tooltip-arrow {
bottom: 8px;
}

.tooltip-animated {
animation-duration: 0.3s;
.rw-tooltip-animated {
animation-duration: 0.2s;
}

.tooltip-fade-in {
.rw-tooltip-fade-in {
animation-name: TooltipFadeIn;
}

.tooltip-fade-out {
.rw-tooltip-fade-out {
animation-name: TooltipFadeOut;
}

.rw-tooltip-exit-done {
opacity: 0;
}

@keyframes TooltipFadeIn {
from {
opacity: 0;
Expand All @@ -239,6 +229,7 @@ export interface TooltipProps extends Omit<TriggerProps, "popup" | "defaultPopup
opacity: 1;
}
}

@keyframes TooltipFadeOut {
from {
opacity: 1;
Expand Down
4 changes: 2 additions & 2 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"index.css": "static/css/index.4ca12b27.chunk.css",
"index.js": "static/js/index.4ca12b27.chunk.js",
"index.css": "static/css/index.fa4784b4.chunk.css",
"index.js": "static/js/index.fa4784b4.chunk.js",
"runtime-index.js": "static/js/runtime-index.92eae014.js",
"static/js/2.b694e620.chunk.js": "static/js/2.b694e620.chunk.js",
"index.html": "index.html"
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html><head><meta charset="utf-8"/><title>Tooltip</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1"/><style>.demo{width:80%;margin:100px auto;background:#fff;font-size:12px;overflow:auto}</style><link href="static/css/index.4ca12b27.chunk.css" rel="stylesheet"></head><body style="background:#f5f5f5"><div class="demo" id="demo"></div><script src="static/js/runtime-index.92eae014.js"></script><script src="static/js/2.b694e620.chunk.js"></script><script src="static/js/index.4ca12b27.chunk.js"></script></body></html>
<!doctype html><html><head><meta charset="utf-8"/><title>Tooltip</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1"/><style>.demo{width:80%;margin:100px auto;background:#fff;font-size:12px;overflow:auto}</style><link href="static/css/index.fa4784b4.chunk.css" rel="stylesheet"></head><body style="background:#f5f5f5"><div class="demo" id="demo"></div><script src="static/js/runtime-index.92eae014.js"></script><script src="static/js/2.b694e620.chunk.js"></script><script src="static/js/index.fa4784b4.chunk.js"></script></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/static/js/index.4ca12b27.chunk.js

This file was deleted.

Loading

0 comments on commit 1b23f98

Please sign in to comment.