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

refactor Slider component #483

Open
20 tasks done
weiyongchao opened this issue Dec 14, 2020 · 1 comment
Open
20 tasks done

refactor Slider component #483

weiyongchao opened this issue Dec 14, 2020 · 1 comment
Labels
refactor Refactor old code

Comments

@weiyongchao
Copy link
Contributor

weiyongchao commented Dec 14, 2020

Tasking

Attributes

  • 通过 modelValue / v-model设置Slider的值,类型是number,默认是0
  • 通过 min 设置最小值,类型是number,默认是0
  • 通过 max 设置最大值,类型是number,默认是100
  • 通过 disabled 设置Slider是否被禁用,类型是boolean,默认是false,可操作
  • 通过 step 设置步长,类型是number,默认是1
  • 通过 show-input 设置否显示输入框,仅在非范围选择时有效,类型是 boolean,默认是 false
  • 通过 show-input-controls 设置Slider在显示输入框的情况下,是否显示输入框的控制按钮,类型是 boolean,默认是 true
  • 通过 input-size 设置输入框的尺寸,类型是 string,默认是small(可选值:large / medium / small / mini)
  • 通过 show-stops 设置是否显示间断点,类型是 boolean ,默认是 false
  • 通过 show-tooltip 设置 是否显示 tooltip,类型是 boolean ,默认是 true
  • 通过 format-tooltip 格式化 tooltip message,类型是 function(value)
  • 通过 range 设置是否为范围选择,类型是 boolean, 默认是 false
  • 通过 vertical 设置是否竖向模式,类型是 boolean, 默认是 false
  • 通过 height 设置是Slider 高度,竖向模式时必填,类型是 string, 无默认值
  • 通过 label 设置屏幕阅读器标签,竖向模式时必填,类型是 string, 无默认值
  • 通过 debounce 控制防抖,有输入框才有效,类型是 number, 默认300ms
  • 通过 tooltip-class 设置tooltip 的自定义类名,类型是 string, 无默认值
  • 通过 marks 标记 key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标记可以单独设置样式,类型是 object, 无默认值

Events

  • change 值改变时触发(使用鼠标拖曳时,只在松开鼠标后触发)返回改变后的值
  • input 数据改变时触发(使用鼠标拖曳时,活动过程实时触发)返回改变后的值
@cuixiaorui cuixiaorui added the refactor Refactor old code label Dec 14, 2020
This was referenced Dec 16, 2020
@cuixiaorui cuixiaorui linked a pull request Dec 17, 2020 that will close this issue
@weiyongchao
Copy link
Contributor Author

学习测试相关知识,代码提交延迟到下一周

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

Successfully merging a pull request may close this issue.

2 participants