Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9150955

Browse files
committed
minor changes
1 parent1dc120e commit9150955

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎README.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#vue-comps-tooltip
22

3-
aadvanced tooltip.
3+
aunstyled tooltip, which adjusts opening direction to be in viewport.
44

55
###[Demo](https://vue-comps.github.io/vue-comps-tooltip)
66

@@ -30,15 +30,13 @@ see [`dev/`](dev/) for examples.
3030
####Props
3131
Name | type | default | description
3232
---:| --- | ---| ---
33-
class | Array/Object |["tooltip"] | vue-class of the`div`|
34-
style | Array/Object |[] | vue-style of the`div`|
3533
offset | Number | 0 | offset to the parent
3634
anchor | String | "snwe" | direction of opening, viewport dependet. "s" forces to open down. "sn" would try to open down, the up.
3735
ignore-parent | Boolean | false | will not set-up`mouseenter`/`mouseleave` listener on parent
3836
is-opened| Boolean| false | (two-way) set to open / close|
3937
transition-in | Function | no animation | set animation. Argument: {el,pos,style,cb}
4038
transition-out | Function | no animation | set animation. Argument: {el,style,cb}
41-
parent | Element | parentElement | where the tooltip should attach
39+
parent | Element | parentElement | where the tooltip should attach its listeners
4240
position | String | "parent" | Either "parent" or "body".[Detailed description](#Positioning)
4341

4442
####Events

‎src/tooltip.vue‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ div(
55
style="position:absolute;display:block;box-sizing:border-box"
66
v-if="opened"
77
v-el:tt
8-
v-bind:class="class"
8+
v-bind:class="computedClass"
9+
v-bind:id="id"
910
)
1011
slot No content
1112
</template>
@@ -17,9 +18,12 @@ module.exports =
1718
require("vue-mixins/getViewportSize")
1819
require("vue-mixins/isOpened")
1920
require("vue-mixins/style")
21+
require("vue-mixins/class")
2022
]
2123
2224
props:
25+
"id":
26+
type:String
2327
"style":
2428
default:-> []
2529
"class":
@@ -30,6 +34,7 @@ module.exports =
3034
"offset":
3135
type:Number
3236
default:0
37+
coerce:Number
3338
"transitionIn":
3439
type:Function
3540
default: ({el,pos,style,cb})->
@@ -50,6 +55,7 @@ module.exports =
5055
"zIndex":
5156
type:Number
5257
default:100
58+
coerce:Number
5359
"position":
5460
type:String
5561
default:"parent"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp