React mobile UI Components base on Vant
MIT License
Bot releases are hidden (Show)
Published by 3lang3 over 2 years ago
Published by 3lang3 over 2 years ago
Swipe
组件Icon
组件Card
组件改名为 ProductCard
readonly
属性,使用 readOnly
替代maxLength
属性,使用 maxLength
代替autofocus
属性,使用 autoFocus
代替Steps
图标尺寸调整Stepper
圆角风格按钮颜色调整为主题色Search
移除 inputAlign
属性,使用 align
代替Typography
调整 ellipsis
属性,现在支持更多形式配置Typography
移除 --rv-typography-line-height
css 变量,同时新增部分变量Tabs
组件:
type
属性,新增 capsule
jumbo
类型color
属性定义,适配 type
属性onChange
类型onClickTab
类型Tabs.TabPane
:
title
类型renderTitle
属性,现可通过 title
实现badge
属性dot
showZeroBadge
属性,现可通过 badge
实现Field
组件:
Input
实现autosize
属性,使用 autoSize
替代inputAlign
属性,使用 align
代替controlAlign
属性,控制右侧内容区域对齐showWordLimit
类型,现支持自定义输出prefix
属性,自定义输入框前置内容button
属性,使用 suffix
代替Form
组件:
inputAlign
属性,使用 controlAlign
代替Form.Subscribe
Form.useWatch
Form.Item
组件:
Form.Item
移除 inputAlign
属性,使用 controlAlign
代替Form.Item
移除 customField
属性Form.Item
调整 onClick
属性,现第二个参数为子组件 ref
的实例Cascader
组件:
Picker
组件:
Area
组件:
Calendar
组件:
DatetimePicker
组件:
Icon
组件:
string|ReactNode
调准为 ReactNode
iconPrefix
iconClass
属性移除在 2.0
中,我们引入了 svg 图标(为何使用 svg 图标?)。使用了字符串命名的图标 API 无法做到按需加载,这大大增加了打包产物的尺寸。在 2.0 中,我们调整了图标的使用 API 从而支持 tree shaking,减少默认包体积。
2.0 中采用按需引入的方式:
import { Button } from 'react-vant';
// tree-shaking supported
- import { Icon } from 'react-vant';
+ import { Arrow } from '@react-vant/icons';
const Demo = () => (
<div>
- <Icon type="arrow" />
+ <Arrow />
<Button icon={<Arrow />} />
</div>
);
Published by 3lang3 almost 3 years ago
更新内容参见 CHANGELOG。
Published by 3lang3 almost 3 years ago
Published by 3lang3 about 3 years ago
1.0版本组件锁定
提供了完全能落地生产的组件列表。
Published by 3lang3 about 3 years ago
之前build工具和其他辅助包namespace走的都是公司的,感觉不太妥当。
Published by 3lang3 about 3 years ago
之前按照vant团队的思路实现的protal和render,回过头来用react视角review其实很代码逻辑和不直观,所以重构了这一部分逻辑。
此次更新受影响的组件:
破坏升级的组件: