app-mob-context-menu.vue 1.1 KB
Newer Older
KK's avatar
KK committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<template>
    <van-popup class="app-mob-context-menu"  v-model="isShow" :get-container="eleContainer" >
        <slot  name="content"></slot>
    </van-popup>
</template>
<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch, Model} from "vue-property-decorator";
import { MapService } from '@/ibiz-core/service/map-service';
@Component({
    components: {},
})
export default class appMobContextMenu extends Vue {

    /**
KK's avatar
KK committed
15
     * 上下文菜单显示状态
KK's avatar
KK committed
16 17 18 19
     *
     * @type {*}
     * @memberof appMobContextMenu
     */
KK's avatar
KK committed
20
    public isShow :boolean = false;
KK's avatar
KK committed
21 22

    /**
KK's avatar
KK committed
23
     * 指定挂载节点  默认为#app
KK's avatar
KK committed
24 25 26 27
     *
     * @type {*}
     * @memberof appMobContextMenu
     */
KK's avatar
KK committed
28
    @Prop({default:'#app'}) public eleContainer?:any;
KK's avatar
KK committed
29 30

    /**
KK's avatar
KK committed
31
     * 打开上下文菜单
KK's avatar
KK committed
32 33 34 35
     *
     * @type {*}
     * @memberof appMobContextMenu
     */
KK's avatar
KK committed
36
    public openContextMenu(){
KK's avatar
KK committed
37 38
        this.isShow = true;
    }
KK's avatar
KK committed
39 40 41 42 43 44 45

    /**
     * 关闭上下文菜单
     */
    public closeContextMenu() {
        this.isShow = false;
    }
KK's avatar
KK committed
46 47 48 49 50 51
    
}
</script>
<style lang="less">
@import "./app-mob-context-menu.less";
</style>