vue-调用子组件方法-ref
<ProductMen-view
ref="productMen"
:isForecast="'true'"
:isSliderShow="isSliderShow"
:sliderInfo="sliderInfo"
:layerList="layerList"
@layerAttributeOperation="layerAttributeOperation"
@layerOperation="layerOperation"
></ProductMen-view>
const productMen = ref();先定义一个变量,就可以调用子组件方法
productMen.value.closeActive(val.layerId);
productMen.value.loadFinish(val.layerID);
浙公网安备 33010602011771号