Releases
v2.0.0
zwlafk
released this
01 Nov 11:28
【Breaking Change】
组件相关调整
Icon 相关
Icon 组件不再支持 type=xxx 方式使用内置 icon
自定义 svg 不再支持插件方式配置 srcSvgPaths
Button icon 属性不再支持通过 string 传递内置 icon 名
Dropdown 删除 iconType 属性,统一为 icon 属性
Navigation icon 不再支持通过 string 方式传入,需要传入 ReactNode
Notification icon 不再支持通过 string 方式传入,请统一使用 ReactNode
AutoComplete 正式废弃 onChangeWithObject 属性
Cascader triggerRender 的入参移除 onInputChange
Form 不再从 semi-ui/index.js
导出 Label组件,如需使用请用 Form.Label
Tree onRightClick 更名为 onContextMenu
Upload dragable 更名为 draggable
Table
不再在 componentDidUpdate 时响应的 API
defaultExpandAllRows,请用 expandAllRows 替换
defaultExpandRowKeys,请用 expandRowKeys 替换
defaultExpandAllGroupRows,请用 expandAllGroupRows 替换
样式相关调整
CSS 变量添加 semi 前缀,例如 --color-primary => --semi-color-primary
在 2.x,统一将插画的宽高设置为 200 * 200px
,1.x 的尺寸为 300 * 150px
设计变量调整
Popconfirm
$color-popconfirm_body-text 由 --semi-color-tertiary => --semi-color-text-2
$color-popconfirm_header_alert-icon 由 #fa7500 => --semi-color-warning
Progress
$spacing-progress_line_text-marginLeft 由 15px => $spacing-base(16px)
$spacing-progress_line_text-marginRight 由 15px => $spacing-base(16px)
Radio
$spacing-radio_addon_buttonRadio_large-paddingY 由 6px => $spacing-base-tight / 2 (6px)
$radius-radio_cardRadioGroup 由 3px => --semi-border-radius-small(3px)
插件相关调整
2.x 不再支持通过 Semi 插件配置 iconLazyLoad、svgPaths、srcSvgPaths
2.x 默认已支持局部暗色/亮色模式,不再需要在插件配置 themeScope。使用方式由 #semi-always-xxx => .semi-always-xxx
其他调整
【Breaking Change】
Component Changes
Icon related
Icon component no longer supports type = xxx using built-in icons
Custom svg no longer supports plug-in configuration srcSvgPaths
The Button icon property no longer supports passing built-in icon names through strings
Dropdown deletes the iconType attribute and unifies it into the icon attribute
Navigation icons no longer support incoming by string, ReactNode needs to be passed in
Notification icons are no longer passed in by string, please use ReactNode uniformly
AutoComplete officially discards the onChangeWithObject property
Remove onInputChange from Cascader triggerRender
Form no longer exports Label components from semi-ui/index.js
Tree onRightClick renamed onContextMenu
Upload dragable renamed draggable
Table
API that no longer responds when componentDidUpdate
DefaultExpandAllRows, please replace with expandAllRows
Default ExpandRowKeys, please replace with expandRowKeys
Default ExpandAllGroupRows, please replace with expandAllGroupRows
Style Changes
CSS variable with semi prefix, for example --color-primary = > --semi-color-primary
In 2.x, the unified set the width and height of the illustration to 200 * 200px
Design Token Changes
Popconfirm
$color-popconfirm_body-text 由 --semi-color-tertiary => --semi-color-text-2
$color-popconfirm_header_alert-icon 由 #fa7500 => --semi-color-warning
Progress
$spacing-progress_line_text-marginLeft 由 15px => $spacing-base(16px)
$spacing-progress_line_text-marginRight 由 15px => $spacing-base(16px)
Radio
$spacing-radio_addon_buttonRadio_large-paddingY 由 6px => $spacing-base-tight / 2 (6px)
$radius-radio_cardRadioGroup 由 3px => --semi-border-radius-small(3px)
Plugin Changes
In 2.x, the iconLazyLoad, svgPaths, srcSvgPaths configurations are no longer supported
In 2.x, section dark mode and bright mode no longer need to configure themeScope attributes in the plug-in, and the default is built-in. The usage method is updated from adding id #semi-ways-xxx to adding class .semi-ways-xxx.
Other Changes
Due to the adjustment of the Icon, the way of using icons and illustrations for Icon and Empty components is different from before. Please see for details
You can’t perform that action at this time.