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