-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
treeParams中的data无法绑定vuex变量 #36
Comments
考虑性能,数据没有做watch监听需要手动触发this.$refs.treeSelect.treeDataUpdateFun(response.data); |
初始数据可以绑定 treeParams.data 数据变更走方法,否则watch数据会很耗性能 |
感谢回复,手动更新数据确实解决了问题。 |
树节点多消耗性能,建议还是走触发,不做dom的销毁和重绘,如果是在大数据量下很容易卡 |
好的,感谢。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
环境:
"el-tree-select": "^3.1.4",
"element-ui": "^2.12.0",
"vue": "^2.5.2",
"vuex": "^3.1.1"
问题(简写)
代码
-template
<el-tree-select :treeParams="{data:dataList}"></el-tree-select>
-script
computed:{...mapState('dataList')}
结果
Vue Dev tools中可以明确观察到
ElTreeSelect已得到正确的treeParams[data]数组prop
但实际内部的Eltree中,data为空
The text was updated successfully, but these errors were encountered: