New Components
- Add new component
Time
. #3645 View - Add new component
Anchor
. #3369 View - Add new component
Split
. #3844 View - Add new component
Divider
. #3275 View - Add new component
Cell
. View
UI
- Optimize the Collapse component style to look cleaner and fresher.
- Optimize the Switch component style and make the dimensions more coordinated.
- Optimize the Page component for a more concise style.
- Optimize the Poptip / Tooltip components styles and the arrows are clearer.
- Optimized the Tag component style and added a variety of preset colors.
- Optimize the Alert component style, color and icons are more intuitive.
- Optimize the Message / Notice components style to look cleaner and fresher.
- Optimize the Modal and $Modal components style to look more coordinated.
- Optimize the Menu style.
- Optimize the Select style.
- The default color of the Circle and Progress components is changed to the primary color, keeping the color uniform.
New Features
Global Settings
When using iView, you can make some properties of the global configuration component, for example:
Vue.use(iView, {
transfer: true,
size: 'large'
});
Currently only supports the transfer
and size
properties. The component will use the properties set by prop first, and if not, then use the global configuration.
Icon:
- Upgrade to the
ionicons
3.0 icon. - Add new property
custom
, now you can customize the icons. #3568
Button:
- Add new property
custom-icon
, now you can customize the icons of button. - Add new properties
to
,replace
,target
, support click to jump directly. - Add new property
ghost
, the button background can be made transparent and is often used on colored backgrounds.
Input:
- Add new properties
prefix
andsuffix
, and the same named slot, support for setting the prefix and suffix icon. - Add new properties
search
andenterButton
, support for input types of search boxes. - Add new event
@on-search
, when using the search type, trigger when you click search button or press the Enter key.
Modal:
- Add new property
fullscreen
. - Add hidden mask layer property
mask
. - Add new property
draggable
.
Table:
- Column add new property
indexMethod
, you can customize the index when usetype="index"
. - Column add new property
tooltip
, if open it, when the cell text exceeds one line, it will be displayed in ... and the full content will be displayed in the Tooltip.
Menu:
- Add new properties
to
,replace
, andtarget
, support click to jump directly.
Breadcrumb:
- Add new property
target
.
Badge:
- Add new property
show-zero
. #3654 - Add new property
text
, now you can customize the content of Badge. - Add new property
status
, the Badge can be set to a status point. - Add new property
offset
, you can set the position. - Add the property
type
, the preset color can be set.
Page:
- Add new property
prev-text
andnext-text
, you can customize the copy of the upper and lower pages.
Upload:
- Add new property
paste
, after opening, you can upload files copied to the clipboard.
Tooltip:
- Add new property
theme
, you can set either dark (default) or light. - Add new property
max-width
, when the maximum value is exceeded, the text will automatically wrap and be aligned.
Poptip:
- Add new property
word-wrap
, when turned on, text that exceeds the specified width will automatically wrap and be aligned. - Add new property
padding
, you can customize the spacing value.
Rate:
- Add new property
character
,icon
andcustom-icon
, support for custom characters or icons.
Collapse:
- Add new property
hide-arrow
, you can hide the arrows. - Add new property
simple
, can be displayed as a clean mode without borders.
Switch:
- Add new property
loading
, it can be said that the switch is still being executed.
Tag:
- There are 13 new presets added to the
color
property.
Dropdown:
- Trigger mode
trigger
addcontextMenu
, which can be triggered by right clicking.
Circle:
- Add new property
dashboard
.
Progress:
- Added the segmentation progress property
success-percent
.
Avatar:
- Add custom icon property
custom-icon
.
Optimizations
Breadcrumb:
- The
href
value of the is displayed.
Page:
- Optimize the logic for fast forward and fast backwards. #3965
Table:
- Checkbox is centered when
type="selection"
.
Others
- Add Mongolian. @Ariunbold13
Bug Fix
- Fixed a bug where the active animation was not oriented correctly when Progress was vertical.
- Fixed a bug where Carousel does not use v-model when clicking on the indicator and the indicator is not updated.
- Fixed a bug that Carouse loop is invalid.
Breaking Changes
- Button discards type
ghost
, the original default style has changed. - The Icon is upgraded to the
ionicons
3.0, icon and the icon's name has changed. - Breadcrumb discards the
href
property. - Badge's count property only supports the Number type.
- The color property of Tag renames the original
blur
,green
,yellow
,red
toprimary
,success
,warning
,error
.
新增组件
- 相对时间组件
Time
。 #3645 查看组件 - 锚点组件
Anchor
。#3369 查看组件 - 面板分割组件
Split
。#3844 查看组件 - 分割线组件
Divider
。#3275 查看组件 - 单元格组件
Cell
。查看组件
UI
- 优化 Collapse 组件样式,看起来更简洁、清新。
- 优化 Switch 组件样式,尺寸更协调了。
- 优化 Page 组件样式,风格更简洁。
- 优化 Poptip / Tooltip 组件样式,箭头更清晰了。
- 优化了 Tag 组件样式,增加多种预设的颜色。
- 优化 Alert 组件样式,配色和图标更直观好看了。
- 优化 Message / Notice 组件样式,看起来更简洁、清新。
- 优化 Modal、$Modal 样式,看起来更协调了。
- 优化 Menu 样式。
- 优化 Select 样式。
- Circle 和 Progress 组件的默认色改为了主色,保持配色统一。
新特性
全局配置
使用 iView 时,可以进行全局配置组件的一些属性,例如:
Vue.use(iView, {
transfer: true,
size: 'large'
});
目前只支持配置 transfer
和 size
两个属性。组件会优先使用 prop 设置的属性,如果未设置,再使用全局配置。
Icon 图标:
- 升级至
ionicons
3.0 图标。 - 新增属性
custom
,支持自定义图标。#3568
Button 按钮:
- 新增属性
custom-icon
,支持自定义图标。 - 新增属性
to
、replace
、target
,支持点击直接跳转。 - 新增幽灵属性
ghost
,可以使按钮背景透明,常用于有色背景上。
Input 输入框:
- 新增属性
prefix
和suffix
以及同名 slot,支持设置前缀和后缀图标。 - 新增属性
search
和enterButton
,支持搜索类型的输入框。 - 新增事件
@on-search
,使用搜索类型输入框时,点击搜索或按下回车键时触发。
Modal 对话框:
- 新增全屏属性
fullscreen
。 - 新增隐藏遮罩层属性
mask
。 - 新增拖拽属性
draggable
。
Table 表格:
- Column 新增属性
indexMethod
, 可以自定义type="index"
时的序号。 - Column 新增属性
tooltip
,开启后,当单元格文本超过一行,会以…显示,并在 Tooltip 中显示完整内容。
Menu 菜单:
- 新增属性
to
、replace
、target
,支持点击直接跳转。
Breadcrumb 面包屑:
- 新增属性
target
。
Badge 徽章:
- 新增属性
show-zero
。#3654 - 新增属性
text
,可以自定义内容。 - 新增属性
status
,可以设置徽标为状态点。 - 新增属性
offset
,可以设置偏移量。 - 新增属性
type
,可以设置预设的颜色。
Page 分页:
- 新增属性
prev-text
和next-text
,可以自定义上下页的文案。
Upload 上传:
- 新增属性
paste
,开启后可以上传复制在剪贴板的文件。
Tooltip 文字提示:
- 新增属性
theme
,可以设置 dark(默认)或 light 两种主题。 - 新增属性
max-width
,超出最大值后,文本将自动换行,并两端对齐。
Poptip 气泡提示:
- 新增属性
word-wrap
,开启后,超出指定宽度文本将自动换行,并两端对齐。 - 新增属性
padding
,可以自定义间距值。
Rate 评分:
- 新增属性
character
、icon
和custom-icon
,支持自定义字符或图标。
Collapse 折叠面板:
- 新增属性
hide-arrow
,可以隐藏箭头。 - 新增属性
simple
,可以显示为无边框的简洁模式。
Switch 开关:
- 新增属性
loading
,可表示开关仍在执行中。
Tag 标签:
color
属性新增了 13 种预设。
Dropdown 下拉菜单:
- 触发方式 trigger 新增
contextMenu
,可以通过点击右键触发。
Circle 进度环:
- 新增仪表盘属性
dashboard
。
Progress 进度条:
- 新增分段进度属性
success-percent
。
Avatar 头像:
- 新增自定义图标属性
custom-icon
。
优化
Breadcrumb 面包屑:
- 在链接上会显示 a 标签的
href
值。
Page 分页:
- 优化快进和快退的逻辑。#3965
Table 表格:
- 优化
type="selection"
时,Checkbox 为居中。
其它
- 新增蒙古语。@Ariunbold13
修复
- 修复 Progress 纵向时,active 动画方向不正确的 bug。
- 修复 Carousel 未使用 v-model 时,点击指示器,指示器不更新的 bug。
- 修复 Carousel 设置 loop 无效的 bug。
不兼容更新
- Button 废弃 type
ghost
,原先的 default 样式有改变。 - Icon 的图标升级至
ionicons
3.0 图标,图标名称有改变。 - Breadcrumb 废弃
href
属性。 - Badge 的 count 属性只支持 Number 类型。
- Tag 的 color 属性将原先的
blur
、green
、yellow
、red
更名为了primary
、success
、warning
、error
。