update Tree

update Tree(in Vue 2,can not use this.xxx in template’s prop,just xxx)
This commit is contained in:
梁灏 2017-03-03 11:35:33 +08:00
parent e2c6ff2b67
commit 9d79a51f0d
2 changed files with 13 additions and 9 deletions

View file

@ -1,5 +1,8 @@
<template>
<Tree v-model="baseData" show-checkbox></Tree>
<div>
<Tree :data="baseData" show-checkbox></Tree>
<div @click="c">change</div>
</div>
</template>
<script>
export default {
@ -28,6 +31,11 @@
}]
}]
}
},
methods: {
c () {
this.baseData[0].expand = false;
}
}
}
</script>