export default { name: 'RoleTree', components: { }, inject: ['reload'], props: { // eslint-disable-next-line vue/require-default-prop dialogAdd: Object, object: Object }, data() { return { roleId: 0, data: [], checkedKeys: [], addIds: [], delIds: [] } }, created() { console.log(this.dialogAdd.id) if (this.dialogAdd.id != null && this.dialogAdd.id !== 0) { this.roleId = this.dialogAdd.id this.$store.dispatch('role/roleTree', this.dialogAdd.id).then(() => { // 获取接口详细数据 console.log('1111111' + JSON.stringify(this.$store.state.role.getTree)) this.data = this.$store.state.role.getTree // 数据赋值给data: [] this.checkedKeys = [] for (let i = 0; i