<template> <div id="YSIndex_right"></div> </template> <script setup name="YSIndex_right"> import { ref, reactive, toRefs, onMounted } from "vue"; const props = defineProps({ //分区编号 waterRegionCode: { type: [String], default: "", }, }); const AllData = reactive({}); watch( () => props.waterRegionCode, (val) => { console.log("YSIndex_right:分区编号变了", val); }, { immediate: true } ); onMounted(() => {}); </script> <style lang="scss" scoped> #YSIndex_right { width: 100%; height: 100%; } </style>