tree-transfer icon indicating copy to clipboard operation
tree-transfer copied to clipboard

选择左侧,确定后,右侧无数据

Open feiyit opened this issue 3 years ago • 1 comments

选择左侧,确定后,右侧无数据,但是左侧选择的数据消失。 通过log查看,tuDate为空,请问这种情况大概是什么原因造成的? <tree-transfer :open-all="transfer.openAll" :title="transfer.title" :from_data="fromData" :to_data="toData" :default-props="{ label: 'label' }" :mode="mode" :pid="parentId" height="300px" @add-btn="add" @remove-btn="remove" >

弹框后初始化给fromData赋值 async initTree() { const role = await roleAll() let roleArr = [] role.data.forEach(function (m, i) { roleArr.push({ id: m.id, pid: m.parentId, label: m.name, parentId: m.parentId, }) }) this.fromData = changeTree(roleArr) console.log(this.fromData) }

弹框事件 handleOpen(arr) { console.log(arr) this.initTree() this.dialogVisible = true },

feiyit avatar Jan 05 '21 09:01 feiyit

id,pid转成Number类型试试

ExtJSFantasy avatar Feb 24 '21 16:02 ExtJSFantasy