Compare commits
2 Commits
049768c8b6
...
e586755b75
Author | SHA1 | Date |
---|---|---|
lyc | e586755b75 | |
lyc | ef771f4e0b |
|
@ -98,6 +98,8 @@ const emitChangeBook = async () => {
|
||||||
let curData = cloneDeep(toRaw(curNode.data))
|
let curData = cloneDeep(toRaw(curNode.data))
|
||||||
let parentNode = findParentByChildId(treeData.value, curData.id)
|
let parentNode = findParentByChildId(treeData.value, curData.id)
|
||||||
curData.parentNode = toRaw(parentNode)
|
curData.parentNode = toRaw(parentNode)
|
||||||
|
//怎加一个label 之前取的label
|
||||||
|
curData.label = curData.itemtitle
|
||||||
const data = {
|
const data = {
|
||||||
textBook: {
|
textBook: {
|
||||||
curBookId: curBook.data.id,
|
curBookId: curBook.data.id,
|
||||||
|
@ -160,7 +162,9 @@ const handleNodeClick = (data, node) => {
|
||||||
* data : 当前节点数据
|
* data : 当前节点数据
|
||||||
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
|
||||||
*/
|
*/
|
||||||
const nodeData = cloneDeep(toRaw(data));
|
let nodeData = cloneDeep(toRaw(data));
|
||||||
|
//怎加一个label 之前取的label
|
||||||
|
nodeData.label = nodeData.itemtitle
|
||||||
const parentNode = node.parent.data;
|
const parentNode = node.parent.data;
|
||||||
// parentNode 为数组 则点击的是一级节点
|
// parentNode 为数组 则点击的是一级节点
|
||||||
if (Array.isArray(parentNode)) {
|
if (Array.isArray(parentNode)) {
|
||||||
|
|
Loading…
Reference in New Issue