2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-13 15:32:24 +03:00
This commit is contained in:
rawilk
2020-08-30 19:54:12 -05:00
parent 075cc4b196
commit 7d050c0bf0
3 changed files with 15926 additions and 106 deletions
+7 -9
View File
@@ -10,9 +10,7 @@
:key="index"
@contextmenu.prevent="$refs.menu.open($event, { name: item, index })"
>
<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>
@@ -66,7 +64,7 @@
computed: {
showReset () {
return this.items.length < items.length;
}
},
},
data () {
@@ -76,17 +74,17 @@
},
methods: {
alertName (name) {
alertName(name) {
alert(`You clicked on "${name}"!`);
},
remove (index) {
remove(index) {
this.$delete(this.items, index);
},
reset () {
reset() {
this.items = [...items];
}
}
},
},
};
</script>