临时
This commit is contained in:
@@ -26,8 +26,9 @@ const x = ref(0);
|
||||
const y = ref(0);
|
||||
|
||||
const menuRef = ref();
|
||||
const openHouseId = ref(null);
|
||||
// 打开菜单
|
||||
const open = async (e: MouseEvent, value: any) => {
|
||||
const open = async (e: MouseEvent, value: string) => {
|
||||
e.preventDefault();
|
||||
x.value = e.clientX;
|
||||
y.value = e.clientY;
|
||||
@@ -62,6 +63,7 @@ const open = async (e: MouseEvent, value: any) => {
|
||||
show.value = true;
|
||||
document.addEventListener('click', close);
|
||||
document.addEventListener('contextmenu', close);
|
||||
openHouseId.value = value;
|
||||
}, 10);
|
||||
};
|
||||
|
||||
@@ -74,7 +76,10 @@ const close = () => {
|
||||
|
||||
// 点击选项
|
||||
const handleClick = (item) => {
|
||||
emit('select', item.value);
|
||||
emit('select', {
|
||||
type: item.value,
|
||||
value: openHouseId.value
|
||||
});
|
||||
close();
|
||||
};
|
||||
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<template>
|
||||
<div class="PageHeaderBox">
|
||||
<!-- 面包屑 -->
|
||||
<breadcrumb class="breadcrumb-container" />
|
||||
<!-- 页面标题 -->
|
||||
<div class="pageTitleBox flex items-center">
|
||||
<div class="line"></div>
|
||||
<div class="pagetitle">{{ props.title }}</div>
|
||||
<div class="leftbox">
|
||||
<!-- 面包屑 -->
|
||||
<breadcrumb class="breadcrumb-container" />
|
||||
<!-- 页面标题 -->
|
||||
<div class="pageTitleBox flex items-center">
|
||||
<div class="line"></div>
|
||||
<div class="pagetitle">{{ props.title }}</div>
|
||||
</div>
|
||||
<!-- solt -->
|
||||
<slot name="content" v-if="showSlot"></slot>
|
||||
<div class="h-20px" v-show="!showSlot"></div>
|
||||
</div>
|
||||
<div class="rightbox">
|
||||
<!-- 操作按钮 -->
|
||||
<slot name="operate" v-if="showSlot"></slot>
|
||||
</div>
|
||||
<!-- solt -->
|
||||
<slot name="content" v-if="showSlot"></slot>
|
||||
<div class="h-20px" v-show="!showSlot"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -29,6 +35,7 @@ const props = defineProps({
|
||||
|
||||
defineSlots<{
|
||||
content?: () => void;
|
||||
operate?: () => void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
@@ -39,6 +46,12 @@ defineSlots<{
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.leftbox {
|
||||
flex: 1;
|
||||
}
|
||||
.pageTitleBox {
|
||||
.line {
|
||||
width: 5px;
|
||||
|
||||
Reference in New Issue
Block a user