Skip to content
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

异步加载的情况下我怎么强制组件渲染我的options #258

Open
jiu-you opened this issue May 29, 2019 · 3 comments
Open

异步加载的情况下我怎么强制组件渲染我的options #258

jiu-you opened this issue May 29, 2019 · 3 comments

Comments

@jiu-you
Copy link

jiu-you commented May 29, 2019

No description provided.

@tianxiaofeng747
Copy link

我也遇到了这个问题, 异步模式不支持默认值

@jiu-you
Copy link
Author

jiu-you commented Jun 21, 2019

我也遇到了这个问题, 异步模式不支持默认值

我看他源码里异步的options不会讲传入的值渲染,所以我在他渲染options之前强行修改了options的值,达到预期效果的
this.$refs.treeselect.getRemoteSearchEntry().options = ret.data
this.$refs.treeselect.initialize()

@tianxiaofeng747
Copy link

我也遇到了这个问题, 异步模式不支持默认值

我看他源码里异步的options不会讲传入的值渲染,所以我在他渲染options之前强行修改了options的值,达到预期效果的
this.$refs.treeselect.getRemoteSearchEntry().options = ret.data
this.$refs.treeselect.initialize()

我试过你这代码不行, 我今天折腾了下, 发现 换一下就可以了
this.$refs.treeselect.defaultOptions = res.data;
this.$refs.treeselect.initialize();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants