-
Notifications
You must be signed in to change notification settings - Fork 226
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
tag组件存在严重的bug #118
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
比如
<tag type="info" v-for="(keyword, i) in kws" :key="i" :on-close="closeTag(i)" :closable="closable">{{keyword}}</tag>
2 我在closeTag 中更新了 kws 比如删除数组索引为0的标签,vue有着异步更新机制,这会导致删除新的索引为0的的标签
应为
setTimeout(() => { this.$destroy(); this.$el.remove(); }, 100);
这里会在超时后 删除 this.$destroy(); this.$el.remove();
解决方法是 这样
:key="keyword+'-'+i"
上面问题,最佳解决
// this.$emit('close', e);// the way official suggested
但是需要重新编译 vue-blu
The text was updated successfully, but these errors were encountered: