mirror of
https://github.com/tenrok/vue-context.git
synced 2026-06-22 17:40:33 +03:00
Scrollable (#3)
* Add ability to close context menu on scroll * Update README * Update test page * Update changelog
This commit is contained in:
+2
-2
@@ -4,13 +4,13 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Vue Context Test Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<body style="height:2000px;">
|
||||
<div id="app">
|
||||
<p @contextmenu.prevent="$refs.menu.open($event, { foo: 'bar' })">
|
||||
Right click on me
|
||||
</p>
|
||||
|
||||
<vue-context ref="menu">
|
||||
<vue-context ref="menu" :close-on-scroll="close">
|
||||
<ul slot-scope="child">
|
||||
<li @click="onClick(child.data)">Option 1 {{ child.data && child.data.foo }}</li>
|
||||
<li>Option 2</li>
|
||||
|
||||
Vendored
+103
-158
File diff suppressed because one or more lines are too long
@@ -6,6 +6,10 @@ new Vue({
|
||||
VueContext
|
||||
},
|
||||
|
||||
data: {
|
||||
close: true
|
||||
},
|
||||
|
||||
methods: {
|
||||
onClick (data) {
|
||||
console.log(data);
|
||||
|
||||
Reference in New Issue
Block a user