这个问题百度了好久,都是七零八碎的,自己整理一下
需求:点击父节点时,从接口获取子节点数据
1.页面代码
<el-dialog
width="30%"
title="选择添加地址和邮编"
:visible="visible"
v-if="visible"
@close="visible = false"
>
<el-scrollbar :style="{height:showHeight?height:fit}">
<el-tree
height="100%"
:data="newCountryList"
show-checkbox
node-key="label"
lazy
:load="loadNode"
:props="defaultProps"
ref="tree"
@check="selectChange"
/>
</el-scrollbar>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelHandle">取 消</el-button>
<el-button typ