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

[comp: tag]feature tag component #29

Closed
1 task done
Gilbert5210 opened this issue Dec 17, 2020 · 5 comments · Fixed by #282
Closed
1 task done

[comp: tag]feature tag component #29

Gilbert5210 opened this issue Dec 17, 2020 · 5 comments · Fixed by #282
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Gilbert5210
Copy link
Contributor

Gilbert5210 commented Dec 17, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

  • 支持默认的6种标签tag样式
  • tag内容支持多种方式展示(设置最大高宽,超出使用省略;换行显示完整;列宽限定,换行完整)
  • 默认8中颜色区分等级,且支持自定义样式
  • 支持标签的删除操作
  • 支持默认的三种size供选择,当然也可以自定义size

What does the proposed API look like?

ix-tag

API

Props

参数 说明 可选项 类型 默认值
closable 标签是否可以关闭 Boolean false
color 标签颜色 gray| success| info| lowRisk|danger | waring|serious|risk String -
icon 标签左侧图标 string -
checkable 标签是否可以被选中 Boolean false
checked 标签选中状态 Boolean false
isRound 是否圆角形状 Boolean false
level 数字等级(正整数),这个可以优先级放后 Number -

Emits

事件名称 说明 回调函数
close 关闭时的回调 (e) => void
change 点击标签时触发的回调 (checked) => void

Slots

名称 说明
default tag的text内容
icon tag前面的icon内容
@Gilbert5210 Gilbert5210 added the enhancement New feature or request label Dec 17, 2020
@danranVm danranVm mentioned this issue Dec 17, 2020
95 tasks
@danranVm
Copy link
Member

@644395781 @danranVm 负责此组件的 review, API 设计完成后请 @ 他们

@danranVm danranVm added this to the v1.0.0 milestone Dec 25, 2020
@Gilbert5210
Copy link
Contributor Author

@danranVm @Pupils-web

review 下tag这块的设计

@danranVm
Copy link
Member

danranVm commented Feb 9, 2021

  • 建议,移除 closable, 新增 mode, 类型为:'closeable' | 'default' | 'checkable', 默认值为 defualt
  • 建议移除 closeIcon,这个建议就默认吧,真有自定义需求的时候再加。
  • effect,maxWidth,size 等移除吧,后续要加的话,先跟视觉沟通下
  • isOval => isRound
  • levelNum => level

@Gilbert5210
Copy link
Contributor Author

@danranVm @Pupils-web
更新了api设计了,看下没有问题就按照现在这样来进行代码设计了

@danranVm
Copy link
Member

@danranVm @Pupils-web
更新了api设计了,看下没有问题就按照现在这样来进行代码设计了

checkable => checked

不需要有一个 标签是否可以选中 的配置?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants