mirror of
https://github.com/tenrok/vue-context.git
synced 2026-06-20 16:40:33 +03:00
wip
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import Advanced1 from './advanced-1';
|
||||
import Advanced2 from './advanced-2';
|
||||
import NestedMenus from './nested-menus';
|
||||
|
||||
// Need a separate vue app for each of these so we can render the markdown properly.
|
||||
new Vue({
|
||||
@@ -14,3 +15,9 @@ new Vue({
|
||||
Advanced2,
|
||||
},
|
||||
}).$mount('#advanced-2-app');
|
||||
|
||||
new Vue({
|
||||
components: {
|
||||
NestedMenus,
|
||||
},
|
||||
}).$mount('#nested-menus');
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
:key="index"
|
||||
@contextmenu.prevent="$refs.menu.open"
|
||||
>
|
||||
<div class="flex items-center px-4 py-4 sm:px-6"
|
||||
:class="{ 'pt-0': index === 0, 'pb-0': index + 1 === items.length }"
|
||||
>
|
||||
<div class="flex items-center px-4 py-4 sm:px-6">
|
||||
<div class="min-w-0 flex-1 md:grid md:grid-cols-2 md:gap-4">
|
||||
<div class="text-sm leading-5 font-medium text-gray-600 truncate" v-text="item"></div>
|
||||
</div>
|
||||
@@ -53,28 +51,28 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueContext from 'vue-context';
|
||||
import 'vue-context/src/sass/vue-context.scss';
|
||||
import VueContext from 'vue-context';
|
||||
import 'vue-context/src/sass/vue-context.scss';
|
||||
|
||||
export default {
|
||||
components: { VueContext },
|
||||
export default {
|
||||
components: { VueContext },
|
||||
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
'Cras justo odio',
|
||||
'Dapibus ac facilisis in',
|
||||
'Morbi leo risus',
|
||||
'Porta ac consectetur ac',
|
||||
'Vestibulum at eros'
|
||||
]
|
||||
};
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
'Cras justo odio',
|
||||
'Dapibus ac facilisis in',
|
||||
'Morbi leo risus',
|
||||
'Porta ac consectetur ac',
|
||||
'Vestibulum at eros',
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
alertText(text) {
|
||||
alert(`You clicked: ${text}`);
|
||||
},
|
||||
|
||||
methods: {
|
||||
alertText(text) {
|
||||
alert(`You clicked: ${text}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,15 +1,12 @@
|
||||
import Vue from 'vue';
|
||||
import BasicUsage from './basic-usage';
|
||||
|
||||
import NestedMenus from './nested-menus';
|
||||
import CloseOnClick from './close-on-click';
|
||||
import CloseOnScroll from './close-on-scroll';
|
||||
|
||||
new Vue({
|
||||
components: {
|
||||
BasicUsage,
|
||||
|
||||
NestedMenus,
|
||||
CloseOnClick,
|
||||
CloseOnScroll,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user