diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index 78d8be853..751fc836a 100644 --- a/docs/markdown/changelog.en-US.md +++ b/docs/markdown/changelog.en-US.md @@ -34,7 +34,7 @@ - Tabbar: add safe-area-inset-bottom prop [\#3149](https://github.com/youzan/vant/pull/3149) - SubmitBar: add safe-area-inset-bottom prop [\#3172](https://github.com/youzan/vant/pull/3172) - GoodsAction: add safe-area-inset-bottom prop [\#3174](https://github.com/youzan/vant/pull/3174) -- Actionsheet: add safe-area-inset-bottom prop [\#3171](https://github.com/youzan/vant/pull/3171) +- ActionSheet: add safe-area-inset-bottom prop [\#3171](https://github.com/youzan/vant/pull/3171) - NumberKeyboard: add safe-area-inset-bottom prop [\#3173](https://github.com/youzan/vant/pull/3173) **Bug Fixes** @@ -55,7 +55,7 @@ - Cell: add less vars [\#3122](https://github.com/youzan/vant/pull/3122) - Rate: add less vars [\#3135](https://github.com/youzan/vant/pull/3135) - Panel: add less vars [\#3136](https://github.com/youzan/vant/pull/3136) -- Badge: add less vars [\#3131](https://github.com/youzan/vant/pull/3131) +- Sidebar: add less vars [\#3131](https://github.com/youzan/vant/pull/3131) - Dialog: add less vars [\#3123](https://github.com/youzan/vant/pull/3123) - Slider: add less vars [\#3125](https://github.com/youzan/vant/pull/3125) - Tabbar: add less vars [\#3124](https://github.com/youzan/vant/pull/3124) @@ -89,7 +89,7 @@ **Improvements** -- Actionsheet: add less vars [\#3049](https://github.com/youzan/vant/pull/3049) +- ActionSheet: add less vars [\#3049](https://github.com/youzan/vant/pull/3049) **Bug Fixes** @@ -112,7 +112,7 @@ - NoticeBar: add wrapable prop [\#2992](https://github.com/youzan/vant/pull/2992) - Field: add error-message-align prop [\#3016](https://github.com/youzan/vant/pull/3016) - Sku: support set selectedNum when inited [\#3045](https://github.com/youzan/vant/pull/3045) -- Actionsheet: support use slot and cancel-text at same time [\#3021](https://github.com/youzan/vant/pull/3021) +- ActionSheet: support use slot and cancel-text at same time [\#3021](https://github.com/youzan/vant/pull/3021) **Bug Fixes** @@ -152,7 +152,7 @@ - CellGroup: add title prop [\#2928](https://github.com/youzan/vant/pull/2928) - Steps: add active-icon prop [\#2934](https://github.com/youzan/vant/pull/2934) - Picker: add default-index prop [\#2935](https://github.com/youzan/vant/pull/2935) -- Actionsheet: add index param for select event [\#2917](https://github.com/youzan/vant/pull/2917) +- ActionSheet: add index param for select event [\#2917](https://github.com/youzan/vant/pull/2917) **Bug Fixes** @@ -188,8 +188,8 @@ **Bug Fixes** -- fix Actionsheet lazy-render not work [\#2840](https://github.com/youzan/vant/pull/2840) -- fix Actionsheet get-container not work [\#2853](https://github.com/youzan/vant/pull/2853) +- fix ActionSheet lazy-render not work [\#2840](https://github.com/youzan/vant/pull/2840) +- fix ActionSheet get-container not work [\#2853](https://github.com/youzan/vant/pull/2853) - fix Tab should scroll to active tab when inited [\#2857](https://github.com/youzan/vant/pull/2857) - fix Checkbox uncheckable when inside cell [\#2855](https://github.com/youzan/vant/pull/2855) - fix CouponList incorrectly render when disabled list empty [\#2845](https://github.com/youzan/vant/pull/2845) @@ -554,7 +554,7 @@ Also we have optimized the UI of the following components:: - Tab: add animated props [\#2126](https://github.com/youzan/vant/pull/2126) - Tab: update title style [\#2120](https://github.com/youzan/vant/pull/2120) -- Badge: update info style [\#2122](https://github.com/youzan/vant/pull/2122) +- Sidebar: update info style [\#2122](https://github.com/youzan/vant/pull/2122) - Radio: add checked-color prop [\#2129](https://github.com/youzan/vant/pull/2129) - Swipe: add indicator-color prop [\#2110](https://github.com/youzan/vant/pull/2110) - TreeSelect: support disable option [\#2107](https://github.com/youzan/vant/pull/2107) @@ -612,7 +612,7 @@ Also we have optimized the UI of the following components:: **Improvements** -- Badge: add change event [\#2017](https://github.com/youzan/vant/pull/2017) +- Sidebar: add change event [\#2017](https://github.com/youzan/vant/pull/2017) - Radio: update color [\#2018](https://github.com/youzan/vant/pull/2018) - Checkbox: update color [\#2018](https://github.com/youzan/vant/pull/2018) - Sku: support image preview [\#2019](https://github.com/youzan/vant/pull/2019) @@ -710,7 +710,7 @@ Also we have optimized the UI of the following components:: **Improvements** - Tab: upgrade style [\#1908](https://github.com/youzan/vant/pull/1908) -- Badge: upgrade style [\#1907](https://github.com/youzan/vant/pull/1907) +- Sidebar: upgrade style [\#1907](https://github.com/youzan/vant/pull/1907) - Dialog: upgrade style [\#1906](https://github.com/youzan/vant/pull/1906) - NoticeBar: upgrade style [\#1893](https://github.com/youzan/vant/pull/1893) - Collapse: add disabled prop [\#1892](https://github.com/youzan/vant/pull/1892) @@ -873,14 +873,14 @@ Also we have optimized the UI of the following components:: **Improvements** -- Actionsheet: add select event [\#1594](https://github.com/youzan/vant/pull/1594) +- ActionSheet: add select event [\#1594](https://github.com/youzan/vant/pull/1594) - ImagePreview: suppot onClose callback [\#1589](https://github.com/youzan/vant/pull/1589) - List: add check method [\#1590](https://github.com/youzan/vant/pull/1590) - Search: update style [\#1603](https://github.com/youzan/vant/pull/1603) **Bug Fixes** -- fix Actionsheet item unclickable when loading [\#1587](https://github.com/youzan/vant/pull/1587) +- fix ActionSheet item unclickable when loading [\#1587](https://github.com/youzan/vant/pull/1587) - fix DatetimePicker value uncorrect when use formatter [\#1591](https://github.com/youzan/vant/pull/1591) @@ -970,7 +970,7 @@ Also we have optimized the UI of the following components:: **Improvements** -- Actionsheet: support lazy render [\#1365](https://github.com/youzan/vant/pull/1365) +- ActionSheet: support lazy render [\#1365](https://github.com/youzan/vant/pull/1365) - AddressEdit: adjust event order [\#1402](https://github.com/youzan/vant/pull/1402) - SwitchCell: add size prop [\#1371](https://github.com/youzan/vant/pull/1371) - Checkbox: add label-position prop [\#1394](https://github.com/youzan/vant/pull/1394) @@ -1015,7 +1015,7 @@ Also we have optimized the UI of the following components:: **Improvements** -- Actionsheet: support disable option [\#1293](https://github.com/youzan/vant/pull/1293) +- ActionSheet: support disable option [\#1293](https://github.com/youzan/vant/pull/1293) - Field: support clearable [\#1309](https://github.com/youzan/vant/pull/1309) - Layout: support flex layout [\#1305](https://github.com/youzan/vant/pull/1305) - Locale: add type definition [\#1294](https://github.com/youzan/vant/pull/1294) @@ -1046,7 +1046,7 @@ Also we have optimized the UI of the following components:: **Bug Fixes** -- fix Actionsheet title font size [\#1267](https://github.com/youzan/vant/pull/1267) +- fix ActionSheet title font size [\#1267](https://github.com/youzan/vant/pull/1267) - fix CheckboxGroup v-model type check [\#1254](https://github.com/youzan/vant/pull/1254) - fix Popup max height [\#1256](https://github.com/youzan/vant/pull/1256) - fix Tab resize line when title changed [\#1260](https://github.com/youzan/vant/pull/1260) @@ -1273,8 +1273,8 @@ Also we have optimized the UI of the following components:: **Improvements** -* Actionsheet: add cancel event [\#796](https://github.com/youzan/vant/pull/796) -* Actionsheet: support maxHeight [\#777](https://github.com/youzan/vant/pull/777) +* ActionSheet: add cancel event [\#796](https://github.com/youzan/vant/pull/796) +* ActionSheet: support maxHeight [\#777](https://github.com/youzan/vant/pull/777) * DatetimePicker: support all picker props [\#788](https://github.com/youzan/vant/pull/788) * SubmitBar: unite font-size [\#774](https://github.com/youzan/vant/pull/774) * i18n: support zh-HK language [\#812](https://github.com/youzan/vant/pull/812) @@ -1359,10 +1359,10 @@ Also we have optimized the UI of the following components:: **Bug Fixes** -* fix Actionsheet bottom border missing [\#686](https://github.com/youzan/vant/pull/686) +* fix ActionSheet bottom border missing [\#686](https://github.com/youzan/vant/pull/686) * fix AddressEdit area not selected when area_code changed [\#680](https://github.com/youzan/vant/pull/680) * fix Stepper value overlimit [\#691](https://github.com/youzan/vant/issues/691) -* fix Badge info font weight when selected [\#687](https://github.com/youzan/vant/pull/687) +* fix Sidebar info font weight when selected [\#687](https://github.com/youzan/vant/pull/687) ## [v0.12.14](https://github.com/youzan/vant/tree/v0.12.14) @@ -1652,7 +1652,7 @@ Also we have optimized the UI of the following components:: * Search: support native input attrs [\#418](https://github.com/youzan/vant/pull/418) * CellGroup: add 'border' prop [\#420](https://github.com/youzan/vant/pull/420) * AddressEdit: add focus、change-area、select-search events [\#426](https://github.com/youzan/vant/pull/426) -* Badge、CouponList、ContactCard: add active color [\#419](https://github.com/youzan/vant/pull/419) +* Sidebar、CouponList、ContactCard: add active color [\#419](https://github.com/youzan/vant/pull/419) **Bug Fixes** @@ -1781,7 +1781,7 @@ Also we have optimized the UI of the following components:: **Improvements** -* Actionsheet: update close icon style [\#340](https://github.com/youzan/vant/pull/340) +* ActionSheet: update close icon style [\#340](https://github.com/youzan/vant/pull/340) * Popup: add overlayClass and overlayStyle props [\#349](https://github.com/youzan/vant/pull/349) [\#343](https://github.com/youzan/vant/pull/343) * Icon: adjust unicode for better display [\#330](https://github.com/youzan/vant/pull/330) * ImagePreview: support manually close [\#346](https://github.com/youzan/vant/pull/346) diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index a6137baa8..b3ae6640a 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -34,7 +34,7 @@ - Tabbar: 新增 safe-area-inset-bottom 属性 [\#3149](https://github.com/youzan/vant/pull/3149) - SubmitBar: 新增 safe-area-inset-bottom 属性 [\#3172](https://github.com/youzan/vant/pull/3172) - GoodsAction: 新增 safe-area-inset-bottom 属性 [\#3174](https://github.com/youzan/vant/pull/3174) -- Actionsheet: 新增 safe-area-inset-bottom 属性 [\#3171](https://github.com/youzan/vant/pull/3171) +- ActionSheet: 新增 safe-area-inset-bottom 属性 [\#3171](https://github.com/youzan/vant/pull/3171) - NumberKeyboard: 新增 safe-area-inset-bottom 属性 [\#3173](https://github.com/youzan/vant/pull/3173) **Bug Fixes** @@ -55,7 +55,7 @@ - Cell: 新增多个 Less 变量 [\#3122](https://github.com/youzan/vant/pull/3122) - Rate: 新增多个 Less 变量 [\#3135](https://github.com/youzan/vant/pull/3135) - Panel: 新增多个 Less 变量 [\#3136](https://github.com/youzan/vant/pull/3136) -- Badge: 新增多个 Less 变量 [\#3131](https://github.com/youzan/vant/pull/3131) +- Sidebar: 新增多个 Less 变量 [\#3131](https://github.com/youzan/vant/pull/3131) - Dialog: 新增多个 Less 变量 [\#3123](https://github.com/youzan/vant/pull/3123) - Slider: 新增多个 Less 变量 [\#3125](https://github.com/youzan/vant/pull/3125) - Tabbar: 新增多个 Less 变量 [\#3124](https://github.com/youzan/vant/pull/3124) @@ -89,7 +89,7 @@ **Improvements** -- Actionsheet: 新增 less 变量 [\#3049](https://github.com/youzan/vant/pull/3049) +- ActionSheet: 新增 less 变量 [\#3049](https://github.com/youzan/vant/pull/3049) **Bug Fixes** @@ -112,7 +112,7 @@ - NoticeBar: 新增 wrapable 属性 [\#2992](https://github.com/youzan/vant/pull/2992) - Field: 新增 error-message-align 属性 [\#3016](https://github.com/youzan/vant/pull/3016) - Sku: 支持在初始化时设置选中商品数量 [\#3045](https://github.com/youzan/vant/pull/3045) -- Actionsheet: 支持同时设置默认插槽和 cancel-text [\#3021](https://github.com/youzan/vant/pull/3021) +- ActionSheet: 支持同时设置默认插槽和 cancel-text [\#3021](https://github.com/youzan/vant/pull/3021) **Bug Fixes** @@ -152,7 +152,7 @@ - CellGroup: 新增 title 属性 [\#2928](https://github.com/youzan/vant/pull/2928) - Steps: 新增 active-icon 属性 [\#2934](https://github.com/youzan/vant/pull/2934) - Picker: 新增 default-index 属性 [\#2935](https://github.com/youzan/vant/pull/2935) -- Actionsheet: 新增 index 作为 select 事件的回调参数 [\#2917](https://github.com/youzan/vant/pull/2917) +- ActionSheet: 新增 index 作为 select 事件的回调参数 [\#2917](https://github.com/youzan/vant/pull/2917) **Bug Fixes** @@ -188,8 +188,8 @@ **Bug Fixes** -- 修复 Actionsheet lazy-render 属性不生效的问题 [\#2840](https://github.com/youzan/vant/pull/2840) -- 修复 Actionsheet get-container 属性不生效的问题 [\#2853](https://github.com/youzan/vant/pull/2853) +- 修复 ActionSheet lazy-render 属性不生效的问题 [\#2840](https://github.com/youzan/vant/pull/2840) +- 修复 ActionSheet get-container 属性不生效的问题 [\#2853](https://github.com/youzan/vant/pull/2853) - 修复 Tab 初始化时导航栏未自动滚动到当前标签位置的问题 [\#2857](https://github.com/youzan/vant/pull/2857) - 修复 Checkbox 与 Cell 组件嵌套用法在 Vue 2.6+ 上的兼容问题 [\#2855](https://github.com/youzan/vant/pull/2855) - 修复 CouponList 不可用券列表为空时展示错误的问题 [\#2845](https://github.com/youzan/vant/pull/2845) @@ -555,7 +555,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ - Tab: 新增 animated 属性 [\#2126](https://github.com/youzan/vant/pull/2126) - Tab: 更新标题栏样式 [\#2120](https://github.com/youzan/vant/pull/2120) -- Badge: 更新提示样式 [\#2122](https://github.com/youzan/vant/pull/2122) +- Sidebar: 更新提示样式 [\#2122](https://github.com/youzan/vant/pull/2122) - Radio: 新增 checked-color 属性 [\#2129](https://github.com/youzan/vant/pull/2129) - Swipe: 新增 indica为r-color 属性 [\#2110](https://github.com/youzan/vant/pull/2110) - TreeSelect: 支持禁用选项 [\#2107](https://github.com/youzan/vant/pull/2107) @@ -616,7 +616,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ - i18n: 支持土耳其语 [\#1998](https://github.com/youzan/vant/pull/1998) - i18n: 支持繁体中文(台) [\#1999](https://github.com/youzan/vant/pull/1999) - Icon: 新增 question2 图标 [\#2005](https://github.com/youzan/vant/pull/2005) -- Badge: 新增 change 事件 [\#2017](https://github.com/youzan/vant/pull/2017) +- Sidebar: 新增 change 事件 [\#2017](https://github.com/youzan/vant/pull/2017) - Switch: 新增 active-color 属性 [\#2013](https://github.com/youzan/vant/pull/2013) - Switch: 新增 inactive-color 属性 [\#2013](https://github.com/youzan/vant/pull/2013) - Radio: 选中态颜色调整为蓝色 [\#2018](https://github.com/youzan/vant/pull/2018) @@ -710,7 +710,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Improvements** - Tab: 样式升级 [\#1908](https://github.com/youzan/vant/pull/1908) -- Badge: 样式升级 [\#1907](https://github.com/youzan/vant/pull/1907) +- Sidebar: 样式升级 [\#1907](https://github.com/youzan/vant/pull/1907) - Dialog: 样式升级 [\#1906](https://github.com/youzan/vant/pull/1906) - NoticeBar: 样式升级 [\#1893](https://github.com/youzan/vant/pull/1893) - Collapse: 新增 disabled 属性 [\#1892](https://github.com/youzan/vant/pull/1892) @@ -875,14 +875,14 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Improvements** -- Actionsheet: 新增 select 事件 [\#1594](https://github.com/youzan/vant/pull/1594) +- ActionSheet: 新增 select 事件 [\#1594](https://github.com/youzan/vant/pull/1594) - ImagePreview: 支持传入 onClose 回调函数 [\#1589](https://github.com/youzan/vant/pull/1589) - List: 新增 check 方法 [\#1590](https://github.com/youzan/vant/pull/1590) - Search: 优化样式结构 [\#1603](https://github.com/youzan/vant/pull/1603) **Bug Fixes** -- 修复 Actionsheet 选项加载中时仍然有点击态的问题 [\#1587](https://github.com/youzan/vant/pull/1587) +- 修复 ActionSheet 选项加载中时仍然有点击态的问题 [\#1587](https://github.com/youzan/vant/pull/1587) - 修复 DatetimePicker 使用 formatter 时默认值错误的问题 [\#1591](https://github.com/youzan/vant/pull/1591) @@ -970,7 +970,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Improvements** -- Actionsheet: 支持 lazy-render [\#1365](https://github.com/youzan/vant/pull/1365) +- ActionSheet: 支持 lazy-render [\#1365](https://github.com/youzan/vant/pull/1365) - AddressEdit: 优化事件触发顺序 [\#1402](https://github.com/youzan/vant/pull/1402) - SwitchCell: 新增 size 属性 [\#1371](https://github.com/youzan/vant/pull/1371) - Checkbox: 新增 label-position 属性 [\#1394](https://github.com/youzan/vant/pull/1394) @@ -1015,7 +1015,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Improvements** -- Actionsheet: 支持禁用选项 [\#1293](https://github.com/youzan/vant/pull/1293) +- ActionSheet: 支持禁用选项 [\#1293](https://github.com/youzan/vant/pull/1293) - Field: 支持展示清除控件 [\#1309](https://github.com/youzan/vant/pull/1309) - Layout: 支持 Flex 布局 [\#1305](https://github.com/youzan/vant/pull/1305) - Locale: 新增 TS 类型定义 [\#1294](https://github.com/youzan/vant/pull/1294) @@ -1046,7 +1046,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Bug Fixes** -- 修复 Actionsheet 在 rem 布局下标题文字大小错误的问题 [\#1267](https://github.com/youzan/vant/pull/1267) +- 修复 ActionSheet 在 rem 布局下标题文字大小错误的问题 [\#1267](https://github.com/youzan/vant/pull/1267) - 修复 CheckboxGroup v-model 类型检查错误 [\#1254](https://github.com/youzan/vant/pull/1254) - 修复 Tab 标题长度变化时底部条未重新渲染的问题 [\#1260](https://github.com/youzan/vant/pull/1260) - 修复 Popup 内容过高时超出屏幕可视范围的问题 [\#1256](https://github.com/youzan/vant/pull/1256) @@ -1269,8 +1269,8 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Improvements** -- Actionsheet: 新增 cancel 事件 [\#796](https://github.com/youzan/vant/pull/796) -- Actionsheet: 增加最大高度限制 [\#777](https://github.com/youzan/vant/pull/777) +- ActionSheet: 新增 cancel 事件 [\#796](https://github.com/youzan/vant/pull/796) +- ActionSheet: 增加最大高度限制 [\#777](https://github.com/youzan/vant/pull/777) - DatetimePicker: 支持所有 picker 组件配置 [\#788](https://github.com/youzan/vant/pull/788) - SubmitBar: 统一文字大小 [\#774](https://github.com/youzan/vant/pull/774) - i18n: 支持 zh-HK 语言 [\#812](https://github.com/youzan/vant/pull/812) @@ -1353,10 +1353,10 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Bug Fixes** -* 修复 Actionsheet 下边框未展示的问题 [\#686](https://github.com/youzan/vant/pull/686) +* 修复 ActionSheet 下边框未展示的问题 [\#686](https://github.com/youzan/vant/pull/686) * 修复 AddressEdit 在数据变更时未正确选中省市区的问题 [\#680](https://github.com/youzan/vant/pull/680) * 修复 Stepper value 溢出的问题 [\#691](https://github.com/youzan/vant/issues/691) -* 修复 Badge 选中时字体粗细 [\#687](https://github.com/youzan/vant/pull/687) +* 修复 Sidebar 选中时字体粗细 [\#687](https://github.com/youzan/vant/pull/687) ## [v0.12.14](https://github.com/youzan/vant/tree/v0.12.14) `2018-03-09` @@ -1644,7 +1644,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ * Search: 支持 input 标签原生属性 [\#418](https://github.com/youzan/vant/pull/418) * CellGroup: 新增 'border' 属性 [\#420](https://github.com/youzan/vant/pull/420) * AddressEdit: 新增 focus、change-area、select-search 事件 [\#426](https://github.com/youzan/vant/pull/426) -* Badge、CouponList、ContactCard: 增加点击反馈 [\#419](https://github.com/youzan/vant/pull/419) +* Sidebar、CouponList、ContactCard: 增加点击反馈 [\#419](https://github.com/youzan/vant/pull/419) **Bug Fixes** @@ -1774,7 +1774,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ **Improvements** -* Actionsheet: 更新关闭按钮样式 [\#340](https://github.com/youzan/vant/pull/340) +* ActionSheet: 更新关闭按钮样式 [\#340](https://github.com/youzan/vant/pull/340) * Popup: 新增 overlayClass、overlayStyle 属性 [\#349](https://github.com/youzan/vant/pull/349) [\#343](https://github.com/youzan/vant/pull/343) * Icon: 调整 unicode,避免展示特殊字符 [\#330](https://github.com/youzan/vant/pull/330) * ImagePreview: 支持手动关闭 [\#346](https://github.com/youzan/vant/pull/346) @@ -2126,7 +2126,7 @@ PS: 不小心跳过了 1.4.6 版本 ^_^ * 新增 GoodsAction 组件 [\#102](https://github.com/youzan/vant/pull/102) * 新增 OrderGoods 组件 [\#99](https://github.com/youzan/vant/pull/99) * 新增 PayOrder 组件 [\#98](https://github.com/youzan/vant/pull/98) -* 优化 Step、Loading、Tag、Badge 文档 [\#101](https://github.com/youzan/vant/pull/101) +* 优化 Step、Loading、Tag、Sidebar 文档 [\#101](https://github.com/youzan/vant/pull/101) * Checkbox: 支持 change 事件 [\#104](https://github.com/youzan/vant/pull/104) **Bug Fixes** diff --git a/docs/markdown/v2-progress-tracking.md b/docs/markdown/v2-progress-tracking.md new file mode 100644 index 000000000..41cfd6364 --- /dev/null +++ b/docs/markdown/v2-progress-tracking.md @@ -0,0 +1,52 @@ +## Vant 2.0 改动一览 + +## 不兼容更新 + +在 2.0 版本中,我们对组件和 API 进行重命名,以更加符合业界的命名规范,同时移除了少量不常用的属性,具体改动如下: + +### Actionsheet + +- [x] 重命名为`ActionSheet` + +### Button + +- [x] 移除`bottom-action`属性,请使用`square`和`size`代替 + +### Field + +- [x] 移除`on-icon-click`属性,请使用`click-right-icon`事件代替 +- [x] `icon`属性重命名为`right-icon` +- [x] `icon`插槽重命名为`right-icon` +- [x] `click-icon`事件重命名为`click-right-icon` + +### GoodsAction + +- [x] `GoodsActionBigBtn`重命名为`GoodsActionButton` +- [x] `GoodsActionMiniBtn`重命名为`GoodsActionIcon` +- [x] `GoodsActionBigBtn`移除`primary`属性,请使用`type`属性代替 + +### Step + +- [x] 移除`icon`属性 +- [x] 移除`title`属性 +- [x] 移除`icon-class`属性 +- [x] 移除`description`属性 +- [x] 移除`message-extra`插槽 + +### Badge + +- [x] `BadgeGroup`重命名为`Sidebar` +- [x] `Badge`重命名为`SlideBarItem` + +### Loading + +- [x] 移除`circle`类型 +- [x] 移除`gradient-circle`类型 + +### Waterfall + +- [x] 彻底移除在 1.0 版本废弃的 Waterfall 组件,请使用`List`组件代替,或使用独立的[@vant/waterfall](https://github.com/chenjiahan/vant-waterfall)包。 + +## 新特性 + +TODO diff --git a/docs/src/demo-entry.js b/docs/src/demo-entry.js index 3549f9b06..6f0a73fc6 100644 --- a/docs/src/demo-entry.js +++ b/docs/src/demo-entry.js @@ -3,11 +3,10 @@ import { wrapper } from './demo-common'; export default { - 'actionsheet': () => wrapper(import('../../packages/actionsheet/demo'), 'actionsheet'), + 'action-sheet': () => wrapper(import('../../packages/action-sheet/demo'), 'action-sheet'), 'address-edit': () => wrapper(import('../../packages/address-edit/demo'), 'address-edit'), 'address-list': () => wrapper(import('../../packages/address-list/demo'), 'address-list'), 'area': () => wrapper(import('../../packages/area/demo'), 'area'), - 'badge': () => wrapper(import('../../packages/badge/demo'), 'badge'), 'button': () => wrapper(import('../../packages/button/demo'), 'button'), 'card': () => wrapper(import('../../packages/card/demo'), 'card'), 'cell': () => wrapper(import('../../packages/cell/demo'), 'cell'), @@ -40,6 +39,7 @@ export default { 'radio': () => wrapper(import('../../packages/radio/demo'), 'radio'), 'rate': () => wrapper(import('../../packages/rate/demo'), 'rate'), 'search': () => wrapper(import('../../packages/search/demo'), 'search'), + 'sidebar': () => wrapper(import('../../packages/sidebar/demo'), 'sidebar'), 'sku': () => wrapper(import('../../packages/sku/demo'), 'sku'), 'slider': () => wrapper(import('../../packages/slider/demo'), 'slider'), 'stepper': () => wrapper(import('../../packages/stepper/demo'), 'stepper'), @@ -55,6 +55,5 @@ export default { 'tag': () => wrapper(import('../../packages/tag/demo'), 'tag'), 'toast': () => wrapper(import('../../packages/toast/demo'), 'toast'), 'tree-select': () => wrapper(import('../../packages/tree-select/demo'), 'tree-select'), - 'uploader': () => wrapper(import('../../packages/uploader/demo'), 'uploader'), - 'waterfall': () => wrapper(import('../../packages/waterfall/demo'), 'waterfall') + 'uploader': () => wrapper(import('../../packages/uploader/demo'), 'uploader') }; diff --git a/docs/src/doc.config.js b/docs/src/doc.config.js index dea1e0dfa..6a009488e 100644 --- a/docs/src/doc.config.js +++ b/docs/src/doc.config.js @@ -168,8 +168,8 @@ module.exports = { icon: 'passed', list: [ { - path: '/actionsheet', - title: 'Actionsheet 上拉菜单' + path: '/action-sheet', + title: 'ActionSheet 上拉菜单' }, { path: '/dialog', @@ -251,10 +251,6 @@ module.exports = { groupName: '导航组件', icon: 'https://img.yzcdn.cn/vant/nav-0401.svg', list: [ - { - path: '/badge', - title: 'Badge 徽章' - }, { path: '/nav-bar', title: 'NavBar 导航栏' @@ -263,6 +259,10 @@ module.exports = { path: '/pagination', title: 'Pagination 分页' }, + { + path: '/sidebar', + title: 'Sidebar 侧边导航' + }, { path: '/tab', title: 'Tab 标签页' @@ -475,8 +475,8 @@ module.exports = { icon: 'passed', list: [ { - path: '/actionsheet', - title: 'Actionsheet' + path: '/action-sheet', + title: 'ActionSheet' }, { path: '/dialog', @@ -558,10 +558,6 @@ module.exports = { groupName: 'Navigation Components', icon: 'https://img.yzcdn.cn/vant/nav-0401.svg', list: [ - { - path: '/badge', - title: 'Badge' - }, { path: '/nav-bar', title: 'NavBar' @@ -570,6 +566,10 @@ module.exports = { path: '/pagination', title: 'Pagination' }, + { + path: '/sidebar', + title: 'Sidebar' + }, { path: '/tab', title: 'Tab' diff --git a/docs/src/docs-entry.js b/docs/src/docs-entry.js index 80bb7857a..5e9291552 100644 --- a/docs/src/docs-entry.js +++ b/docs/src/docs-entry.js @@ -12,16 +12,15 @@ export default { 'style-guide.zh-CN': () => import('../markdown/style-guide.zh-CN.md'), 'theme.en-US': () => import('../markdown/theme.en-US.md'), 'theme.zh-CN': () => import('../markdown/theme.zh-CN.md'), - 'actionsheet.en-US': () => import('../../packages/actionsheet/en-US.md'), - 'actionsheet.zh-CN': () => import('../../packages/actionsheet/zh-CN.md'), + 'v2-progress-tracking': () => import('../markdown/v2-progress-tracking.md'), + 'action-sheet.en-US': () => import('../../packages/action-sheet/en-US.md'), + 'action-sheet.zh-CN': () => import('../../packages/action-sheet/zh-CN.md'), 'address-edit.en-US': () => import('../../packages/address-edit/en-US.md'), 'address-edit.zh-CN': () => import('../../packages/address-edit/zh-CN.md'), 'address-list.en-US': () => import('../../packages/address-list/en-US.md'), 'address-list.zh-CN': () => import('../../packages/address-list/zh-CN.md'), 'area.en-US': () => import('../../packages/area/en-US.md'), 'area.zh-CN': () => import('../../packages/area/zh-CN.md'), - 'badge.en-US': () => import('../../packages/badge/en-US.md'), - 'badge.zh-CN': () => import('../../packages/badge/zh-CN.md'), 'button.en-US': () => import('../../packages/button/en-US.md'), 'button.zh-CN': () => import('../../packages/button/zh-CN.md'), 'card.en-US': () => import('../../packages/card/en-US.md'), @@ -88,6 +87,8 @@ export default { 'rate.zh-CN': () => import('../../packages/rate/zh-CN.md'), 'search.en-US': () => import('../../packages/search/en-US.md'), 'search.zh-CN': () => import('../../packages/search/zh-CN.md'), + 'sidebar.en-US': () => import('../../packages/sidebar/en-US.md'), + 'sidebar.zh-CN': () => import('../../packages/sidebar/zh-CN.md'), 'sku.en-US': () => import('../../packages/sku/en-US.md'), 'sku.zh-CN': () => import('../../packages/sku/zh-CN.md'), 'slider.en-US': () => import('../../packages/slider/en-US.md'), @@ -119,7 +120,5 @@ export default { 'tree-select.en-US': () => import('../../packages/tree-select/en-US.md'), 'tree-select.zh-CN': () => import('../../packages/tree-select/zh-CN.md'), 'uploader.en-US': () => import('../../packages/uploader/en-US.md'), - 'uploader.zh-CN': () => import('../../packages/uploader/zh-CN.md'), - 'waterfall.en-US': () => import('../../packages/waterfall/en-US.md'), - 'waterfall.zh-CN': () => import('../../packages/waterfall/zh-CN.md') + 'uploader.zh-CN': () => import('../../packages/uploader/zh-CN.md') }; diff --git a/jest.config.js b/jest.config.js index 631346088..573d0c82d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,8 +15,7 @@ module.exports = { '!**/style/**', '!**/demo/**', '!**/locale/lang/**', - '!**/sku/**', - '!**/waterfall/**' + '!**/sku/**' ], collectCoverage: true, coverageReporters: ['html', 'lcov', 'text-summary'], diff --git a/packages/actionsheet/demo/index.vue b/packages/action-sheet/demo/index.vue similarity index 74% rename from packages/actionsheet/demo/index.vue rename to packages/action-sheet/demo/index.vue index 2136a089f..8e0b8a860 100644 --- a/packages/actionsheet/demo/index.vue +++ b/packages/action-sheet/demo/index.vue @@ -2,7 +2,7 @@ {{ $t('button1') }} - {{ $t('button2') }} - {{ $t('button3') }} -

{{ $t('content') }}

-
+
@@ -36,20 +36,20 @@ export default { i18n: { 'zh-CN': { - button1: '弹出 Actionsheet', - button2: '弹出带取消按钮的 Actionsheet', - button3: '弹出带标题的 Actionsheet', - title2: '带取消按钮的 Actionsheet', - title3: '带标题的 Actionsheet', + button1: '弹出 ActionSheet', + button2: '弹出带取消按钮的 ActionSheet', + button3: '弹出带标题的 ActionSheet', + title2: '带取消按钮的 ActionSheet', + title3: '带标题的 ActionSheet', description: '描述信息', disabledOption: '禁用选项' }, 'en-US': { - button1: 'Show Actionsheet', - button2: 'Show Actionsheet with cancel button', - button3: 'Show Actionsheet with title', - title2: 'Actionsheet with cancel button', - title3: 'Actionsheet with title', + button1: 'Show ActionSheet', + button2: 'Show ActionSheet with cancel button', + button3: 'Show ActionSheet with title', + title2: 'ActionSheet with cancel button', + title3: 'ActionSheet with title', description: 'Description', disabledOption: 'Disabled Option' } @@ -89,7 +89,7 @@ export default { diff --git a/packages/waterfall/directive.js b/packages/waterfall/directive.js deleted file mode 100644 index 0e3716e46..000000000 --- a/packages/waterfall/directive.js +++ /dev/null @@ -1,133 +0,0 @@ -/* eslint-disable no-underscore-dangle */ -import { on, off } from '../utils/event'; -import { - getScrollTop, - getElementTop, - getVisibleHeight, - getScrollEventTarget -} from '../utils/scroll'; - -const CONTEXT = '@@Waterfall'; -const OFFSET = 300; - -// 处理滚动函数 -function handleScrollEvent() { - const element = this.el; - const { scrollEventTarget } = this; - // 已被禁止的滚动处理 - if (this.disabled) return; - - const targetScrollTop = getScrollTop(scrollEventTarget); - const targetVisibleHeight = getVisibleHeight(scrollEventTarget); - // 滚动元素可视区域下边沿到滚动元素元素最顶上 距离 - const targetBottom = targetScrollTop + targetVisibleHeight; - - // 如果无元素高度,考虑为元素隐藏,直接返回 - if (!targetVisibleHeight) return; - - // 判断是否到了底 - let needLoadMoreToLower = false; - if (element === scrollEventTarget) { - needLoadMoreToLower = scrollEventTarget.scrollHeight - targetBottom < this.offset; - } else { - const elementBottom = - getElementTop(element) - getElementTop(scrollEventTarget) + getVisibleHeight(element); - needLoadMoreToLower = elementBottom - targetVisibleHeight < this.offset; - } - if (needLoadMoreToLower) { - this.cb.lower && this.cb.lower({ target: scrollEventTarget, top: targetScrollTop }); - } - - // 判断是否到了顶 - let needLoadMoreToUpper = false; - if (element === scrollEventTarget) { - needLoadMoreToUpper = targetScrollTop < this.offset; - } else { - const elementTop = getElementTop(element) - getElementTop(scrollEventTarget); - needLoadMoreToUpper = elementTop + this.offset > 0; - } - if (needLoadMoreToUpper) { - this.cb.upper && this.cb.upper({ target: scrollEventTarget, top: targetScrollTop }); - } -} - -// 绑定事件到元素上 -// 读取基本的控制变量 -function doBindEvent() { - if (this.el[CONTEXT].binded) { - return; - } - this.el[CONTEXT].binded = true; - - this.scrollEventListener = handleScrollEvent.bind(this); - this.scrollEventTarget = getScrollEventTarget(this.el); - - const disabledExpr = this.el.getAttribute('waterfall-disabled'); - let disabled = false; - if (disabledExpr) { - this.vm.$watch(disabledExpr, value => { - this.disabled = value; - this.scrollEventListener(); - }); - disabled = Boolean(this.vm[disabledExpr]); - } - this.disabled = disabled; - - const offset = this.el.getAttribute('waterfall-offset'); - this.offset = Number(offset) || OFFSET; - - on(this.scrollEventTarget, 'scroll', this.scrollEventListener, true); - - this.scrollEventListener(); -} - -// 绑定事件 -function startBind(el) { - const context = el[CONTEXT]; - - context.vm.$nextTick(() => { - doBindEvent.call(el[CONTEXT]); - }); -} - -// 确认何时绑事件监听函数 -function doCheckStartBind(el) { - const context = el[CONTEXT]; - - if (context.vm._isMounted) { - startBind(el); - } else { - context.vm.$on('hook:mounted', () => { - startBind(el); - }); - } -} - -export default function (type) { - return { - bind(el, binding, vnode) { - if (!el[CONTEXT]) { - el[CONTEXT] = { - el, - vm: vnode.context, - cb: {} - }; - } - el[CONTEXT].cb[type] = binding.value; - - doCheckStartBind(el); - }, - - update(el) { - const context = el[CONTEXT]; - context.scrollEventListener && context.scrollEventListener(); - }, - - unbind(el) { - const context = el[CONTEXT]; - if (context.scrollEventTarget) { - off(context.scrollEventTarget, 'scroll', context.scrollEventListener); - } - } - }; -} diff --git a/packages/waterfall/en-US.md b/packages/waterfall/en-US.md deleted file mode 100644 index 7cff793bc..000000000 --- a/packages/waterfall/en-US.md +++ /dev/null @@ -1,77 +0,0 @@ -## Waterfall -Note: Waterfall is deprecated and no longer maintained, please use the [List](#/zh-CN/list) component instead. - -### Install - -#### Global registration - -```js -import Vue from 'vue'; -import { Waterfall } from 'vant'; - -Vue.use(Waterfall); -``` - -#### Local registration -If you just watch to use `Waterfall` in a component, you can register the directive in the component. - -```js -import { Waterfall } from 'vant'; - -export default { - directives: { - WaterfallLower: Waterfall('lower'), - WaterfallUpper: Waterfall('upper') - } -}; -``` - -### Usage - -#### Basic Usage - -```html - -``` - -```js -export default { - data() { - return { - list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - disabled: false - }; - }, - - directives: { - WaterfallLower: Waterfall('lower') - }, - - methods: { - loadMore() { - this.disabled = true; - setTimeout(() => { - for (let i = 0; i < 5; i++) { - this.list.push(this.list.length); - } - this.disabled = false; - }, 200); - } - } -}; -``` - -### API - -| Attribute | Description | Type | Default | -|------|------|------|------| -| v-waterfall-lower | Function to trigger when scroll to bottom | `Function` | - | -| v-waterfall-upper | Function to trigger when scroll to top | `Function` | - | -| waterfall-disabled | Key of the property to control disable status in instance | `String` | - | -| waterfall-offset | Offset to trigger callback function | `Number` | `300` | diff --git a/packages/waterfall/index.js b/packages/waterfall/index.js deleted file mode 100644 index a2b120669..000000000 --- a/packages/waterfall/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import Waterfall from './directive'; - -Waterfall.install = function (Vue) { - if (process.env.NODE_ENV !== 'production') { - console.warn('[Vant] Waterfall is deprecated, please use List component instread'); - } - Vue.directive('WaterfallLower', Waterfall('lower')); - Vue.directive('WaterfallUpper', Waterfall('upper')); -}; - -export default Waterfall; diff --git a/packages/waterfall/zh-CN.md b/packages/waterfall/zh-CN.md deleted file mode 100644 index fe783340a..000000000 --- a/packages/waterfall/zh-CN.md +++ /dev/null @@ -1,81 +0,0 @@ -## Waterfall 瀑布流 -注意:Waterfall 组件已被废弃且不再维护,请使用 [List](#/zh-CN/list) 组件代替 - -### 使用指南 - -#### 全局注册 - -```js -import Vue from 'vue'; -import { Waterfall } from 'vant'; - -Vue.use(Waterfall); -``` - -#### 局部注册 - -如果你只是想在某个组件中使用`Waterfall`,可以在对应组件中注册`Waterfall`指令,这样只能在你注册的组件中使用`Waterfall`: - -```js -import { Waterfall } from 'vant'; - -export default { - directives: { - WaterfallLower: Waterfall('lower'), - WaterfallUpper: Waterfall('upper') - } -}; -``` - -### 代码演示 - -#### 基础用法 -使用 `v-waterfall-lower` 监听滚动到达底部,并执行相应函数。若是函数执行中需要异步加载数据,可以将 `waterfall-disabled` 指定的值置为 true,禁止 `v-waterfall-lower` 监听滚动事件 - -注意:`waterfall-disabled` 传入的是 vue 对象中表示是否禁止瀑布流触发 key 值,类型是字符串 - -```html - -``` - -```js -export default { - data() { - return { - list: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - disabled: false - }; - }, - - directives: { - WaterfallLower: Waterfall('lower') - }, - - methods: { - loadMore() { - this.disabled = true; - setTimeout(() => { - for (let i = 0; i < 5; i++) { - this.list.push(this.list.length); - } - this.disabled = false; - }, 200); - } - } -}; -``` - -### API - -| 参数 | 说明 | 类型 | 默认值 | 版本 | -|------|------|------|------|------| -| v-waterfall-lower | 滚动到底部, 触发执行的函数 | `Function` | - | - | -| v-waterfall-upper | 滚动到顶部, 触发执行的函数 | `Function` | - | - | -| waterfall-disabled | 在 vue 对象中表示是否禁止瀑布流触发的 key 值 | `String` | - | - | -| waterfall-offset | 触发瀑布流加载的阈值 | `Number` | `300` | - | diff --git a/types/index.d.ts b/types/index.d.ts index d2b00ceb2..ce4e5f13d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -5,17 +5,16 @@ import { Dialog } from './dialog'; import { Notify } from './notify'; import { Locale } from './locale'; import { Lazyload } from './lazyload'; -import { Waterfall } from './waterfall'; import { ImagePreview } from './image-preview'; export const version: string; export function install (vue: typeof Vue): void -export class Actionsheet extends VanComponent {} +export class ActionSheet extends VanComponent {} export class AddressEdit extends VanComponent {} export class AddressList extends VanComponent {} export class Area extends VanComponent {} -export class Badge extends VanComponent {} -export class BadgeGroup extends VanComponent {} +export class Sidebar extends VanComponent {} +export class SidebarGroup extends VanComponent {} export class Button extends VanComponent {} export class Card extends VanComponent {} export class Cell extends VanComponent {} @@ -35,8 +34,8 @@ export class CouponList extends VanComponent {} export class DatetimePicker extends VanComponent {} export class Field extends VanComponent {} export class GoodsAction extends VanComponent {} -export class GoodsActionBigBtn extends VanComponent {} -export class GoodsActionMiniBtn extends VanComponent {} +export class GoodsActionButton extends VanComponent {} +export class GoodsActionIcon extends VanComponent {} export class Icon extends VanComponent {} export class List extends VanComponent {} export class Loading extends VanComponent {} @@ -78,6 +77,5 @@ export { Notify, Locale, Lazyload, - Waterfall, ImagePreview }; diff --git a/types/waterfall.d.ts b/types/waterfall.d.ts deleted file mode 100644 index 8beab86ba..000000000 --- a/types/waterfall.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { DirectiveFunction, PluginFunction } from 'vue'; - -export interface Waterfall { - (type: string): DirectiveFunction; - install: PluginFunction; -} - -export const Waterfall: Waterfall;