el-tree懒加载刷新数据时在resolve空数组时应该resolve({data: []}),即应该返回一个含有data的对象,data的值为空数组
","提示", {confirmButtonText:"确定",cancelButtonText:"取消",type:"warning", }).then(() =>{deleteApi(ids).then(async() => {// 刷新树awaitgetTreeData();//删除时,树的数据改变了,但是树不刷新,需要手动调用树的remove方法if(treeRef.value) { treeRef.value.remove(currentTreeItem); }ElMe...
public Tree<BuildingDO> tree(Model model) { Tree<BuildingDO> tree = new Tree<BuildingDO>(); tree = buildingService.getTreeArea(); return tree; } @PostMapping("/getAreaBuild") // @ResponseBody @ResponseBody //public Tree<BuildingDO> getAreaBuild(@RequestParam("aId") String aId,Model mode...
public Tree<BuildingDO> tree(Model model) { Tree<BuildingDO> tree = new Tree<BuildingDO>(); tree = buildingService.getTreeArea(); return tree; } @PostMapping("/getAreaBuild") // @ResponseBody @ResponseBody //public Tree<BuildingDO> getAreaBuild(@RequestParam("aId") String aId,Model mode...
第一步:刷新后节点的展开状态不变 el-tree中有两个方法: 其中的expandedList可以在 data 中声明为空数组,如果需要接收祖先组件 prop 传值,也可以设置在计算属性中。 // methods 中/* 节点展开触发 */handleNodeExpand(data, node) {// 保存当前展开的节点letflag =falsethis.expandedList.some(ele=>{if(ele...