This repository has been archived by the owner on Oct 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 #109
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch 组件不需要 text 的状态样式,可以进行精简 switch size 精简为三种形态
d86f085
to
efdfa95
Compare
This was referenced Feb 22, 2022
visiky
added a commit
that referenced
this pull request
Feb 22, 2022
* refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 * refactor(switch): switch 组件重构, 移除复杂的属性定义,抽取label属性定义 switch 组件不需要 text 的状态样式,可以进行精简 switch size 精简为三种形态
visiky
added a commit
that referenced
this pull request
Feb 23, 2022
* refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 * refactor(switch): switch 组件重构, 移除复杂的属性定义,抽取label属性定义 switch 组件不需要 text 的状态样式,可以进行精简 switch size 精简为三种形态
visiky
added a commit
that referenced
this pull request
Mar 20, 2022
* refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 (#109) * refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 * refactor(switch): switch 组件重构, 移除复杂的属性定义,抽取label属性定义 switch 组件不需要 text 的状态样式,可以进行精简 switch size 精简为三种形态 * refactor(label-props): 完善 label 属性定义 * refactor(breadcrumb): 将面包屑组件暂存在建设中分类下 (#112) * feat(switch): add test, fix(switch): marker 为 false 依然站空间问题 (#116) Co-authored-by: ai-qing-hai <wb-xcf804241@antgroup.com> * docs(button): button 组件属性定义梳理 (#111) * refactor(statistic): 改造 statistic 组件,添加类型注释 & 修改 title、value 配置属性 (#114) * refactor(statistic): 指标卡组件属性定义重构 & 迁移至建设中分类 * fix: 修复类型定义问题 * feat: add checkbox (#107) * feat: add checkbox * chore: test-live script * chore: type export * feat: add checkbox types and hoverstyle * chore: space * chore: reorganize code * chore: space * feat: checkbox vertical center * fix: 修复单测问题 * feat: checkbox disable (#118) * feat: checkbox disable * fix: disable font color * fix: test for disabled style * fix: label null bug * fix: label null bug * fix: label null bug * fix: label null bug * feat(poptip): poptip 组件 · 初版 (#122) * feat(Poptip): 添加通用组件 Poptip (#121) * feat(Poptip): 添加通用组件 Poptip * feat(Poptip): 添加 text 和 offset 属性 * fix(limit-size): 增加最大打包容量 Co-authored-by: ai-qing-hai <wb-xcf804241@antgroup.com> * refactor(poptip): 重构 poptip 组件 (#124) * refactor(poptip): 重构 poptip 组件 * refactor(poptip): 定义 domStyles 属性,用于自定义 poptip 样式 * refactor(poptip): 增加 offset 自定义 * feat(poptip): 修改案例 修复poptip 重新改动后出现的一些问题 (#128) Co-authored-by: ai-qing-hai <wb-xcf804241@antgroup.com> * refactor(poptip): 重构精简 poptip, 使用单例模式 * refactor(poptip): 优化 poptip 组件 demo * fix(poptip): 修复单测 Co-authored-by: ai-qing-hai <65594180+ai-qing-hai@users.noreply.github.com> Co-authored-by: ai-qing-hai <wb-xcf804241@antgroup.com> * feat(toolbox): 工具箱组件 (#117) * feat(toolbox): 完成 toolbox 组件的雏形 * refactor: remove useless export * refactor(marker): marker 组件的小重构 * fix: poptip width height undefined error (#130) 发现new Poptip({}) 会导致width height undefined error,添加了默认宽高 * refactor: 组件 props 名改造 (#131) * refactor: 组件 props 名改造 * chore: 添加依赖 * fix: 修复类型报错问题 * refactor(chart-ui): 图表组件走查 (#135) * refactor(axis): axis 坐标轴部分优化 * refactor(axis): axis 坐标轴 demo 优化 * refactor(legend): 图例组件优化 demo & indicator 交互 * refactor(chart-ui): 优化各类图表组件的 demo * fix: 修复单测问题 * fix(chart-ui): 修复图表组件的若干问题 (#136) * fix(sparkline): 修复迷你图绘制起点的问题 close: #134 * refactor(legend): 连续图例重构,优化布局计算 * refactor(legend): 图例事件监听优化 * refactor(legend): 用 poptip 组件替代 indicator 指示器 * fix(chart-ui): 修复单测问题 * refactor(legend): 移除 setIndicator 方法 Co-authored-by: ai-qing-hai <65594180+ai-qing-hai@users.noreply.github.com> Co-authored-by: ai-qing-hai <wb-xcf804241@antgroup.com> Co-authored-by: Cappuccino rainy <37009709+rainy-25Ghz@users.noreply.github.com>
rainy-25Ghz
pushed a commit
that referenced
this pull request
Mar 22, 2022
* refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 * refactor(switch): switch 组件重构, 移除复杂的属性定义,抽取label属性定义 switch 组件不需要 text 的状态样式,可以进行精简 switch size 精简为三种形态
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
主要做了以下事情:
size
直接封装了 3 种类型:default
,small
以及mini
(后续可以贴合设计要求,对尺寸大小进行调整)checkedChildren
,unCheckedChildren
虽然内部依赖了Tag
组件,但不能直接透出相关配置,应该从 Switch 的角度出发,去精简配置(这里抽取了LabelProps
, 使用了需要文本以及 marker,且不存在文本状态样式的情形)onClick
&onChange
事件参数保持一致TODO: ref #108