export default {
data() {
return {
isMounted: false
};
},
computed: {
calc() {
if (this.isMounted) {
return this.$refs.tree.getCheckedNodes();
}
}
},
mounted() {
this.isMounted = true;
}
};
export default {
data() {
return {
isMounted: false
};
},
computed: {
calc() {
if (this.isMounted) {
return this.$refs.tree.getCheckedNodes();
}
}
},
mounted() {
this.isMounted = true;
}
};
本文标题:vue计算属性中使用$refs出现undefined问题
本文链接:https://www.haomeiwen.com/subject/jqyutktx.html
网友评论