2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-17 03:40:32 +03:00

Code restructure (#1)

This commit is contained in:
Randall Wilk
2018-05-26 11:43:23 -05:00
committed by GitHub
parent a521b025c2
commit 3116d06d77
17 changed files with 14548 additions and 245 deletions
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue Context Test Page</title>
</head>
<body>
<div id="app">
<p @contextmenu.prevent="$refs.menu.open($event, { foo: 'bar' })">
Right click on me
</p>
<vue-context ref="menu">
<ul slot-scope="child">
<li @click="onClick(child.data)">Option 1 {{ child.data && child.data.foo }}</li>
<li>Option 2</li>
</ul>
</vue-context>
</div>
<script src="js/dist/index.js"></script>
</body>
</html>
+179
View File
File diff suppressed because one or more lines are too long
+14
View File
@@ -0,0 +1,14 @@
import Vue from 'vue';
import { VueContext } from '../../../dist/vue-context';
new Vue({
components: {
VueContext
},
methods: {
onClick (data) {
console.log(data);
},
},
}).$mount('#app');