mirror of
https://github.com/tenrok/vue-context.git
synced 2026-06-22 23:00:32 +03:00
Test event emitting
This commit is contained in:
+4
-1
@@ -10,7 +10,10 @@
|
|||||||
Right click on me
|
Right click on me
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<vue-context ref="menu" :close-on-scroll="close" :close-on-click="false">
|
<vue-context ref="menu" :close-on-scroll="close"
|
||||||
|
@close="onClose"
|
||||||
|
@open="onOpen"
|
||||||
|
>
|
||||||
<ul slot-scope="child">
|
<ul slot-scope="child">
|
||||||
<li @click="onClick(child.data)">Option 1 {{ child.data && child.data.foo }}</li>
|
<li @click="onClick(child.data)">Option 1 {{ child.data && child.data.foo }}</li>
|
||||||
<li>Option 2</li>
|
<li>Option 2</li>
|
||||||
|
|||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -12,7 +12,15 @@ new Vue({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onClick (data) {
|
onClick (data) {
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onClose () {
|
||||||
|
console.log('closing');
|
||||||
|
},
|
||||||
|
|
||||||
|
onOpen (event, data, top, left) {
|
||||||
|
console.log(data, top, left);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}).$mount('#app');
|
}).$mount('#app');
|
||||||
Reference in New Issue
Block a user