We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
您好,目前有一个已实现的案例,是将el-table源码复制到本地在页面中引用,通过$refs指向table实例调用其store.updateColumns()方法就能有效果,类似以下两种情况当前组件或层级嵌套组件都能触发: this.$refs.commonTable.$refs.multipleTable.store.updateColumns(['field1']); this.$refs.multipleTable.store.updateColumns(['field1']);
但是我自己尝试在页面中直接引用npm依赖中的el-table再调用updateColumns始终无法实现效果,单纯是静态demo,已排除异步和dom渲染更新等干扰因素,如下所示:
mounted() { this.$nextTick(() => { this.$refs.commonTable.store.updateColumns(['field1']); }) },
$refs指向在控制台都能正常获取打印出来,.store.updateColumns方法也是存在的,但就是没效果,换成源码table本地引用就好使,实在不明白为什么,难道就是因为引用方式的差异所导致吗?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
您好,目前有一个已实现的案例,是将el-table源码复制到本地在页面中引用,通过$refs指向table实例调用其store.updateColumns()方法就能有效果,类似以下两种情况当前组件或层级嵌套组件都能触发:
this.$refs.commonTable.$refs.multipleTable.store.updateColumns(['field1']);
this.$refs.multipleTable.store.updateColumns(['field1']);
但是我自己尝试在页面中直接引用npm依赖中的el-table再调用updateColumns始终无法实现效果,单纯是静态demo,已排除异步和dom渲染更新等干扰因素,如下所示:
mounted() {
this.$nextTick(() => {
this.$refs.commonTable.store.updateColumns(['field1']);
})
},
$refs指向在控制台都能正常获取打印出来,.store.updateColumns方法也是存在的,但就是没效果,换成源码table本地引用就好使,实在不明白为什么,难道就是因为引用方式的差异所导致吗?
The text was updated successfully, but these errors were encountered: