Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

refactor(switch): 改造 switch 组件,添加类型注释 & 移除不需要的配置属性 #109

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

visiky
Copy link
Member

@visiky visiky commented Feb 22, 2022

主要做了以下事情:

  1. 类型定义完善注释
  2. Switch 组件部分配置完善:
    • size 直接封装了 3 种类型:default, small 以及 mini (后续可以贴合设计要求,对尺寸大小进行调整)
    • checkedChildren, unCheckedChildren 虽然内部依赖了 Tag 组件,但不能直接透出相关配置,应该从 Switch 的角度出发,去精简配置(这里抽取了 LabelProps, 使用了需要文本以及 marker,且不存在文本状态样式的情形)
    • onClick & onChange 事件参数保持一致

TODO: ref #108

@visiky visiky requested review from hustcc and ai-qing-hai February 22, 2022 05:54
switch 组件不需要 text 的状态样式,可以进行精简
switch size 精简为三种形态
@visiky visiky changed the base branch from master to refactor_0.3.4-beta.0 February 22, 2022 07:44
@visiky visiky mentioned this pull request Feb 22, 2022
4 tasks
@visiky visiky merged commit 982b641 into refactor_0.3.4-beta.0 Feb 22, 2022
@visiky visiky deleted the refactor-switch branch February 22, 2022 07:57
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant