This commit is contained in:
姚宇浩 2024-07-14 11:51:16 +08:00
parent 5db9278e84
commit c906736d47
1 changed files with 23 additions and 26 deletions

View File

@ -41,14 +41,8 @@
</div>
</div>
<div style="width: 100%; height: 600px">
<Map
style="width: 100%; height: 100%"
v-if="data.showJt"
></Map>
<Map2
style="width: 100%; height: 100%"
v-if="data.showYl"
></Map2>
<Map style="width: 100%; height: 100%" v-if="data.showJt"></Map>
<Map2 style="width: 100%; height: 100%" v-if="data.showYl"></Map2>
</div>
</div>
</el-dialog>
@ -97,37 +91,40 @@ const data = reactive({
watch(
() => props.dialogShowMap,
(newVal, oldVal) => {
console.log(1111111111);
dialogShowMap.value = newVal;
data.title = props.title;
if (data.title == "交通") {
console.log(1111111111);
setTimeout(() => {
data.showJt = true;
}, 1000);
}, 50);
} else {
setTimeout(() => {
data.showYl = true;
}, 1000);
}
}
);
watch(
() => props.title,
(newVal, oldVal) => {
data.title = newVal;
if (newVal == "交通") {
setTimeout(() => {
data.showJt = true;
}, 1000);
} else {
setTimeout(() => {
data.showYl = true;
}, 1000);
}, 50);
}
}
);
// watch(
// () => props.title,
// (newVal, oldVal) => {
// console.log(2222222);
// data.title = newVal;
// if (newVal == "") {
// setTimeout(() => {
// data.showJt = true;
// }, 1000);
// } else {
// setTimeout(() => {
// data.showYl = true;
// }, 1000);
// }
// }
// );
// 使
onMounted(() => {
data.title = props.title;
console.log(33333333);
});
const closeDialog = () => {