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: step] add Step component #91

Closed
1 task done
ShannyShanny opened this issue Dec 31, 2020 · 5 comments
Closed
1 task done

[comp: step] add Step component #91

ShannyShanny opened this issue Dec 31, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ShannyShanny
Copy link
Contributor

ShannyShanny commented Dec 31, 2020

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

What problem does this feature solve?

解决了业务中一些需要进度条组件的,比如物流进展,工单进展等。

What does the proposed API look like?

  • 可配置展示方向,支持水平和垂直两个方向
  • 有两个尺寸可配置,默认大小(default)和迷你的(small
  • 有两种展示方式,带序号的,或点状的
  • 每个节点的内容由四部分组成,标题(必须有),子标题(可选),描述(可选),悬浮提示的内容(可选)
  • 可控制每个节点状态,有等待,进行中,完成,和错误这4种状态
  • 可设置当前活跃的节点,以及该节点的进度(可选)
  • 可通过配置接受点击节点的发出的事件change
  • 可设置节点是否是禁用的(禁用的即不可点击)

使用例子

<ix-steps>
  <ix-step title="第一步" />
  <ix-step title="第二步" />
  <ix-step title="第三步" />
</ix-steps>

API

ix-steps

Props

名称 说明 类型 默认值 全局配置 备注
active 指定步骤条当前的活跃节点,从0开始计算 number 0 - -
direction 指定步骤条的方向 horizontal | vertical horizontal - -
placement 指定步骤条节点附带的标签放置的位置 horizontal | vertical horizontal - -
percent 当前活跃节点的进度 number 0 - 取值是0-100
progressDot 指定步骤条是否为点状步骤条 boolean | v-slot:progressDot false - 使用slot的话,会传入当前节点对象item
size 指定步骤条节点的大小 medium| small medium -
status 指定步骤条节点的状态 wait | process | finish | error process - -

Emits

名称 说明 参数
change 设置 change 后,Steps 变为可点击状态。切换步骤条时触发 当前活跃节点对象currentItem

ix-step

Props

名称 说明 类型 默认值 全局配置 备注
title 标题 string | v-slot:title - - 使用slot的话,会传入当前节点对象item
subTitle 副标题 string | v-slot:subTitle - - 使用slot的话,会传入当前节点对象item
description 步骤条节点的具体描述 string | v-slot:description - - 使用slot的话,会传入当前节点对象item
disabled 节点禁用点击 true | false false - -
icon 每个节点的图标 string | v-slot:icon - - -
status 每个节点的状态,当不设置时,会用Steps里的status wait | process | finish | error wait - -
@ShannyShanny ShannyShanny added the enhancement New feature or request label Dec 31, 2020
@danranVm danranVm mentioned this issue Dec 31, 2020
95 tasks
@danranVm danranVm added this to the v1.0.0 milestone Dec 31, 2020
@danranVm
Copy link
Member

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

@ShannyShanny
Copy link
Contributor Author

@clfeng @danranVm 麻烦review下api

@danranVm
Copy link
Member

danranVm commented Feb 7, 2021

  • ix-steps
    • 建议 progressDot 支持一下 slot , 让用户可以自定义
    • current => active,和 tabs, collapse 等组件统一吧
    • hoverTip 移除,如果确实有需求,可以后面再加,可以结合 tooltip 组件(现在还没实现)
    • size, 的类型应该为 'medium', 'small' , 默认为 medium
    • onChange => change, emit 是不用以 on 开头的。
  • ix-step
    • icon 支持一下 slot

@ShannyShanny
Copy link
Contributor Author

@danranVm 已根据你的建议,更新了api

@danranVm
Copy link
Member

@danranVm 已根据你的建议,更新了api

OK, 我这边没其他问题了。

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
Development

No branches or pull requests

3 participants