提交 9a666b25 编写于 作者: KK's avatar KK

上下文菜单组件

上级 438275ca
......@@ -146,5 +146,7 @@ export const AppComponents = {
v.component('app-mob-map',() => import('@/components/app-mob-map/app-mob-map.vue'));
// 树已选择列表
v.component('app-select-tree-list',() => import('@/components/app-select-tree-list/app-select-tree-list.vue'));
// 上下文菜单
v.component('app-mob-context-menu',() => import('@/components/app-mob-context-menu/app-mob-context-menu.vue'));
},
};
\ No newline at end of file
.app-mob-context-menu{
width: 50%;
border-radius: 4px;
padding: 10px;
.context-menu-item{
width: 100%;
padding: 10px;
}
}
\ No newline at end of file
<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 {
/**
* 显示值
*
* @type {*}
* @memberof appMobContextMenu
*/
@Prop({default:false}) value?: boolean;
/**
* 绑定值
*
* @type {*}
* @memberof appMobContextMenu
*/
get isShow(){
return this.value
}
set isShow(newVal:any){
this.$emit("change",newVal)
}
/**
* 指定挂载节点 默认为#app
*
* @type {*}
* @memberof appMobContextMenu
*/
@Prop({default:'#app'}) public eleContainer?:any;
}
</script>
<style lang="less">
@import "./app-mob-context-menu.less";
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册