Skip to content

Commit 9d55560

Browse files
author
levy
committed
Merge branch 'dev'
2 parents 98c352e + 87e93c5 commit 9d55560

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/el-data-tree.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ export default {
409409
*/
410410
collapsable: {
411411
type: Boolean,
412-
default: false
412+
default() {
413+
return _get(this, '$elDataTreeOptions.collapsable') || false
414+
}
413415
}
414416
},
415417
data() {

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import Component from './el-data-tree.vue'
55
// the same plugin more than once,
66
// so calling it multiple times on the same plugin
77
// will install the plugin only once
8-
Component.install = Vue => {
8+
Component.install = (Vue, options = {}) => {
9+
Vue.prototype.$elDataTreeOptions = options
910
Vue.component(Component.name, Component)
1011
}
1112

0 commit comments

Comments
 (0)