较比更加简洁化
真香~
父组件
<template>
<div class="point-dist">
<div class="point-dist-top">
<div class="point-msg-top">
<point-map
ref="mapBox" // 绑定ref 通过ref取子组件方法 参数
@getMapData="getMapData"
:mapElement="mapElement"></point-map>
<nation-station-msg
:nation-data="state.stationData"
:state-data="state.stateList"
:item-checked="itemCheck"
@update:item-checked="itemCheck = $event"> // 类似vue2 item-checked.sync 修饰符 vue3取消sync修饰符改为v-bind
</nation-station-msg>
</div>
</div>
</template>
<script setup lang="ts">
const state = reactive<any>({
stationData: [],
stateList: []
})
const mapBo