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

Feat Tag CheckableTag #2400

Merged
merged 5 commits into from
Jun 12, 2020
Merged

Feat Tag CheckableTag #2400

merged 5 commits into from
Jun 12, 2020

Conversation

ununian
Copy link
Contributor

@ununian ununian commented Jun 10, 2020

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature

请注意有个破坏性更改,Tag使用时需要用 v-model:visible 不能使用 v-model 控制现隐。 CheckableTag 需要使用 v-model:checked 不能使用 v-model 控制是否被选中

class={this.getTagClassName(prefixCls)}
style={this.getTagStyle()}
>
<span v-show={visible} class={this.getTagClassName(prefixCls)} style={this.getTagStyle()}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

事件不需要了吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没注意这个不是根节点,那我加上 {...omit(this.$attr,['close'])} 就行了吗?要不要过滤掉不是 on 开头的 attr 呢? @Amour1688

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

['onClose']

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里还真不需要 单独挂载事件
没有设置 inheritAttrs: false, 的情况下,事件也会被默认挂载到 根节点上
这里的 close 事件绑定到根节点也没关系
😓

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像是这样的,我一开始以为根节点是指的 Wave 组件上,不会往下传了。现在测了下应该是挂载到了实际的根节点上。

@Amour1688
Copy link
Member

有冲突,还有尽量保持 commit 记录整洁

@tangjinzhou
Copy link
Member

可以看下这篇文章
https://segmentfault.com/a/1190000000736629

components/tag/Tag.jsx Show resolved Hide resolved
@tangjinzhou tangjinzhou merged commit ee3a717 into vueComponent:feat-vue3 Jun 12, 2020
@ununian ununian deleted the feat-tag branch June 12, 2020 05:38
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants