|
|
@ -143,7 +143,7 @@ export default { |
|
|
|
[CRUD.HOOK.beforeSubmit]() { |
|
|
|
this.crud.form.pid = this.defaultExpandedKeys[0] |
|
|
|
if (!this.crud.form.sort) { |
|
|
|
this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return Math.max(prev.sort, cur.sort) }) |
|
|
|
this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
toDelete(data) { |
|
|
@ -165,7 +165,7 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.tree-scroll{ |
|
|
|
.tree-scroll { |
|
|
|
height: calc(100vh - 275px); |
|
|
|
overflow-y: scroll; |
|
|
|
overflow-x: hidden; |
|
|
|