This commit is contained in:
syuilo 2018-02-18 13:48:40 +09:00
parent b2c24af69e
commit 2f3f97a12c
3 changed files with 9 additions and 8 deletions

View File

@ -4,6 +4,9 @@
<template v-if="item.type == 'item'">
<p @click="click(item)"><span class="icon" v-if="item.icon" v-html="item.icon"></span>{{ item.text }}</p>
</template>
<template v-if="item.type == 'link'">
<a :href="item.href" :target="item.target" @click="click(item)"><span class="icon" v-if="item.icon" v-html="item.icon"></span>{{ item.text }}</a>
</template>
<template v-else-if="item.type == 'nest'">
<p><span class="icon" v-if="item.icon" v-html="item.icon"></span>{{ item.text }}...<span class="caret">%fa:caret-right%</span></p>
<me-nu :menu="item.menu" @x="click"/>
@ -31,8 +34,6 @@ export default Vue.extend({
$item-height = 38px
$padding = 10px
ul
display block
margin 0
padding $padding 0
list-style none

View File

@ -1,5 +1,5 @@
<template>
<div class="context-menu" :style="{ x: `${x}px`, y: `${y}px` }" @contextmenu.prevent="() => {}">
<div class="context-menu" :style="{ left: `${x}px`, top: `${y}px` }" @contextmenu.prevent="() => {}">
<me-nu :menu="menu" @x="click"/>
</div>
</template>

View File

@ -16,7 +16,7 @@ import Vue from 'vue';
import * as anime from 'animejs';
export default Vue.extend({
props: {
props: ['title', 'text', 'buttons', 'modal']/*{
title: {
type: String
},
@ -30,7 +30,7 @@ export default Vue.extend({
type: Boolean,
default: false
}
},
}*/,
mounted() {
this.$nextTick(() => {
(this.$refs.bg as any).style.pointerEvents = 'auto';