|
@@ -4,7 +4,7 @@
|
|
|
<div class="mask" @click="handleClose"></div>
|
|
<div class="mask" @click="handleClose"></div>
|
|
|
|
|
|
|
|
<!-- 内容弹窗区域 -->
|
|
<!-- 内容弹窗区域 -->
|
|
|
- <div class="toilet">
|
|
|
|
|
|
|
+ <div class="toilet" id="draggable">
|
|
|
<!-- 名称区域 -->
|
|
<!-- 名称区域 -->
|
|
|
<div class="title" :title="currentToilet">{{ currentToilet }}</div>
|
|
<div class="title" :title="currentToilet">{{ currentToilet }}</div>
|
|
|
|
|
|
|
@@ -33,6 +33,8 @@
|
|
|
import { onMounted, ref } from "vue";
|
|
import { onMounted, ref } from "vue";
|
|
|
// 引入厕所数据
|
|
// 引入厕所数据
|
|
|
import { toiletData } from "@/components/map/toiletData";
|
|
import { toiletData } from "@/components/map/toiletData";
|
|
|
|
|
+// 引入拖拽功能文件
|
|
|
|
|
+import { draggableFun } from "@/utils/draggable";
|
|
|
|
|
|
|
|
const $emit = defineEmits(["closeDialog"]);
|
|
const $emit = defineEmits(["closeDialog"]);
|
|
|
const props = defineProps(["currentToilet"]);
|
|
const props = defineProps(["currentToilet"]);
|
|
@@ -44,6 +46,8 @@ onMounted(() => {
|
|
|
// 匹配出当前厕所的信息
|
|
// 匹配出当前厕所的信息
|
|
|
info.value = toiletData.find((ele: any) => ele.title === props.currentToilet);
|
|
info.value = toiletData.find((ele: any) => ele.title === props.currentToilet);
|
|
|
// console.log(info.value);
|
|
// console.log(info.value);
|
|
|
|
|
+ // 调用拖拽功能
|
|
|
|
|
+ draggableFun("draggable");
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 点击关闭按钮回调
|
|
// 点击关闭按钮回调
|
|
@@ -74,11 +78,12 @@ const handleClose = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.toilet {
|
|
.toilet {
|
|
|
- position: relative;
|
|
|
|
|
|
|
+ position: absolute;
|
|
|
width: 668px;
|
|
width: 668px;
|
|
|
height: 672px;
|
|
height: 672px;
|
|
|
background-image: url(@/assets/images/88.png);
|
|
background-image: url(@/assets/images/88.png);
|
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
|
|
|
+ user-select: none; /* 防止文字被选中 */
|
|
|
|
|
|
|
|
.title {
|
|
.title {
|
|
|
margin-top: 3px;
|
|
margin-top: 3px;
|