update
This commit is contained in:
parent
21701ff32b
commit
d005ad4757
|
@ -142,11 +142,11 @@ export default {
|
||||||
},
|
},
|
||||||
addMenuItem(row, type) {
|
addMenuItem(row, type) {
|
||||||
if (type === 'children') {
|
if (type === 'children') {
|
||||||
this.$refs.TreeTable.addChild(row, { name: 'child' })
|
this.$refs.TreeTable.addChild(row, { name: 'child', timeLine: this.randomNum() })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'brother') {
|
if (type === 'brother') {
|
||||||
this.$refs.TreeTable.addBrother(row, { name: 'brother' })
|
this.$refs.TreeTable.addBrother(row, { name: 'brother', timeLine: this.randomNum() })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteItem(row) {
|
deleteItem(row) {
|
||||||
|
@ -154,6 +154,12 @@ export default {
|
||||||
},
|
},
|
||||||
selectChange(val) {
|
selectChange(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
|
},
|
||||||
|
randomNum() {
|
||||||
|
// return 1~100
|
||||||
|
const max = 100
|
||||||
|
const min = 1
|
||||||
|
return Math.floor(Math.random() * (max - min + 1) + min)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,20 @@ export default {
|
||||||
},
|
},
|
||||||
click(scope) {
|
click(scope) {
|
||||||
console.log(scope)
|
console.log(scope)
|
||||||
|
|
||||||
|
const row = scope.row
|
||||||
|
const message = Object.keys(row)
|
||||||
|
.map(i => {
|
||||||
|
return `<p>${i}: ${row[i]}</p>`
|
||||||
|
})
|
||||||
|
.join('')
|
||||||
|
|
||||||
|
this.$notify({
|
||||||
|
title: 'Success',
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
message: message,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue