diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index 5f2939286..b8f170fbb 100644 --- a/docs/markdown/changelog.en-US.md +++ b/docs/markdown/changelog.en-US.md @@ -22,7 +22,7 @@ **Improvements** - Button: add warning type [\#1558](https://github.com/youzan/vant/pull/1558) -- CellSwipe: add open method [\#1546](https://github.com/youzan/vant/pull/1546) +- SwipeCell: add open method [\#1546](https://github.com/youzan/vant/pull/1546) - DatetimePicker: support minute range [\#1583](https://github.com/youzan/vant/pull/1583) - Icon: add size prop [\#1555](https://github.com/youzan/vant/pull/1555) - Stepper: update disabled color [\#1560](https://github.com/youzan/vant/pull/1560) @@ -393,7 +393,7 @@ * fix NavBar title max width limitation [\#867](https://github.com/youzan/vant/pull/867) * fix Button vertical align incorrect when loading [\#858](https://github.com/youzan/vant/pull/858) -* fix CellSwipe should only trigger swipe when drag horizontally [\#866](https://github.com/youzan/vant/pull/866) +* fix SwipeCell should only trigger swipe when drag horizontally [\#866](https://github.com/youzan/vant/pull/866) * fix ImagePreview manually close not work [\#864](https://github.com/youzan/vant/pull/864) * fix SubmitBar inherit wrong font size [\#857](https://github.com/youzan/vant/pull/857) * fix SwitchCell text vertical align [\#852](https://github.com/youzan/vant/pull/852) @@ -477,7 +477,7 @@ **Improvements** * AddressEdit: add show-delete prop [\#716](https://github.com/youzan/vant/pull/716) -* CellSwipe: optimzie animation fluency [\#685](https://github.com/youzan/vant/pull/685) +* SwipeCell: optimzie animation fluency [\#685](https://github.com/youzan/vant/pull/685) * Field: support autosize maxHeight & minHeight [\#718](https://github.com/youzan/vant/pull/718) * Locale: optimize i18n config [\#701](https://github.com/youzan/vant/pull/701) * PullRefresh: support trigger loading animation [\#684](https://github.com/youzan/vant/pull/684) @@ -895,7 +895,7 @@ **Improvements** -* CellSwipe: add onClose prop, support async controll [\#356](https://github.com/youzan/vant/pull/356) +* SwipeCell: add onClose prop, support async controll [\#356](https://github.com/youzan/vant/pull/356) * Uploader: support inherit attrs [\#357](https://github.com/youzan/vant/pull/357) * optimize local compile speed [\#355](https://github.com/youzan/vant/pull/355) diff --git a/docs/markdown/changelog.generated.md b/docs/markdown/changelog.generated.md index 4ce32a903..3ad63008d 100644 --- a/docs/markdown/changelog.generated.md +++ b/docs/markdown/changelog.generated.md @@ -5,7 +5,7 @@ **Breaking changes** -- CellSwipe 滑动单元格 可以实现点击一个按钮,多个cellswip向右滑动吗? [\#1538](https://github.com/youzan/vant/issues/1538) +- SwipeCell 滑动单元格 可以实现点击一个按钮,多个cellswip向右滑动吗? [\#1538](https://github.com/youzan/vant/issues/1538) - 日期控件(datetimepicker)可以对时分设置范围 [\#1531](https://github.com/youzan/vant/issues/1531) - Tab 组件 sticky 增加一个 距离顶部的高度功能 [\#1504](https://github.com/youzan/vant/issues/1504) @@ -28,7 +28,7 @@ - stepper 步进器 点击加号 减号也有点击反馈 [\#1599](https://github.com/youzan/vant/issues/1599) - upload到底怎么使用啊,怎么把得到的参数替换掉默认图片的路径呢? [\#1596](https://github.com/youzan/vant/issues/1596) - ImagePreview最新版本预览图片报错 [\#1595](https://github.com/youzan/vant/issues/1595) -- CellSwipe 左滑,right 有 edit delete 两个按钮的时候,如何判断点击的是哪个呢? [\#1593](https://github.com/youzan/vant/issues/1593) +- SwipeCell 左滑,right 有 edit delete 两个按钮的时候,如何判断点击的是哪个呢? [\#1593](https://github.com/youzan/vant/issues/1593) - 商品规格弹层控件中如果设置none\_sku: true,加入购物车时还提示“选择规格” [\#1588](https://github.com/youzan/vant/issues/1588) - Low android version compatibility issues [\#1585](https://github.com/youzan/vant/issues/1585) - vant collapse使用报错 [\#1584](https://github.com/youzan/vant/issues/1584) @@ -80,7 +80,7 @@ - npm install 下来的css,里边有的icon font文件,是cdn引用的,而不是本地的。 [\#1552](https://github.com/youzan/vant/issues/1552) - DatetimePicker 中能否加上年月日上午/下午 [\#1551](https://github.com/youzan/vant/issues/1551) - 手机滚动不流畅啊?没有个scroll-content? [\#1549](https://github.com/youzan/vant/issues/1549) -- CellSwipe 滑动单元格如何确定当前数据条目? [\#1548](https://github.com/youzan/vant/issues/1548) +- SwipeCell 滑动单元格如何确定当前数据条目? [\#1548](https://github.com/youzan/vant/issues/1548) - 怎么修改弹出层样式 [\#1547](https://github.com/youzan/vant/issues/1547) - popup 组件中 lock-scroll 功能 在 ios 中失效 [\#1544](https://github.com/youzan/vant/issues/1544) - 以$toast、$dialog 形式调用 toast和dialog在prod环境莫名undefined [\#1542](https://github.com/youzan/vant/issues/1542) @@ -119,7 +119,7 @@ - \[Improvement\] Button: add warning type [\#1558](https://github.com/youzan/vant/pull/1558) ([chenjiahan](https://github.com/chenjiahan)) - \[Improvement\] Icon: add size prop [\#1555](https://github.com/youzan/vant/pull/1555) ([chenjiahan](https://github.com/chenjiahan)) - \[Doc\] update detail [\#1554](https://github.com/youzan/vant/pull/1554) ([chenjiahan](https://github.com/chenjiahan)) -- \[Improvement\] CellSwipe: add open method [\#1546](https://github.com/youzan/vant/pull/1546) ([chenjiahan](https://github.com/chenjiahan)) +- \[Improvement\] SwipeCell: add open method [\#1546](https://github.com/youzan/vant/pull/1546) ([chenjiahan](https://github.com/chenjiahan)) - \[bugfix\] Button: text-size-adjust [\#1545](https://github.com/youzan/vant/pull/1545) ([chenjiahan](https://github.com/chenjiahan)) - \[bugfix\] Stepper: optimize input strategy [\#1534](https://github.com/youzan/vant/pull/1534) ([chenjiahan](https://github.com/chenjiahan)) - \[Doc\] Dialog: update usage [\#1520](https://github.com/youzan/vant/pull/1520) ([chenjiahan](https://github.com/chenjiahan)) diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index e670aae6e..a6d13c89e 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -22,7 +22,7 @@ **Improvements** - Button: 新增 warning 类型 [\#1558](https://github.com/youzan/vant/pull/1558) -- CellSwipe: 新增 open 方法 [\#1546](https://github.com/youzan/vant/pull/1546) +- SwipeCell: 新增 open 方法 [\#1546](https://github.com/youzan/vant/pull/1546) - DatetimePicker: 支持限制分钟范围 [\#1583](https://github.com/youzan/vant/pull/1583) - Icon: 新增 size 属性 [\#1555](https://github.com/youzan/vant/pull/1555) - Stepper: 优化禁用态样式 [\#1560](https://github.com/youzan/vant/pull/1560) @@ -387,7 +387,7 @@ - 修复 NavBar 标题长度未限制的问题 [\#867](https://github.com/youzan/vant/pull/867) - 修复 Button loading 状态下无法水平对齐的问题 [\#858](https://github.com/youzan/vant/pull/858) -- 修复 CellSwipe 在垂直滑动时也会触发 Swipe 的问题 [\#866](https://github.com/youzan/vant/pull/866) +- 修复 SwipeCell 在垂直滑动时也会触发 Swipe 的问题 [\#866](https://github.com/youzan/vant/pull/866) - 修复 ImagePreview close 方法失效的问题 [\#864](https://github.com/youzan/vant/pull/864) - 修复 SubmitBar 字体大小继承错误的问题 [\#857](https://github.com/youzan/vant/pull/857) - 修复 SwitchCell 文字未垂直居中的问题 [\#852](https://github.com/youzan/vant/pull/852) @@ -469,7 +469,7 @@ **Improvements** * AddressEdit: 新增 show-delete 属性 [\#716](https://github.com/youzan/vant/pull/716) -* CellSwipe: 优化 Swipe 动画流畅度 [\#685](https://github.com/youzan/vant/pull/685) +* SwipeCell: 优化 Swipe 动画流畅度 [\#685](https://github.com/youzan/vant/pull/685) * Field: 支持配置 autosize 最大/最小高度 [\#718](https://github.com/youzan/vant/pull/718) * Locale: 精简 i18n 配置文档 [\#701](https://github.com/youzan/vant/pull/701) * PullRefresh: 支持手动触发 loading 动画 [\#684](https://github.com/youzan/vant/pull/684) @@ -886,7 +886,7 @@ **Improvements** -* CellSwipe: 新增 onClose 属性,支持异步控制 [\#356](https://github.com/youzan/vant/pull/356) +* SwipeCell: 新增 onClose 属性,支持异步控制 [\#356](https://github.com/youzan/vant/pull/356) * Uploader: 支持继承原生属性 [\#357](https://github.com/youzan/vant/pull/357) * 优化本地构建速度 [\#355](https://github.com/youzan/vant/pull/355) @@ -1273,7 +1273,7 @@ * 新增 CellSwitch 组件 [\#95](https://github.com/youzan/vant/pull/95) * Dialog: 支持通过组件的方式进行调用 [\#93](https://github.com/youzan/vant/pull/93) * Progress: 简化 DOM 结构 [\#90](https://github.com/youzan/vant/pull/90) -* CellSwipe: 性能优化,补充单元测试 [\#91](https://github.com/youzan/vant/pull/91) +* SwipeCell: 性能优化,补充单元测试 [\#91](https://github.com/youzan/vant/pull/91) ### [0.8.6](https://github.com/youzan/vant/tree/v0.8.6) @@ -1377,7 +1377,7 @@ * 支持 SSR [\#40](https://github.com/youzan/vant/pull/40) * 新增多个 Icon 类型 [\#40](https://github.com/youzan/vant/pull/40) -* 新增 CellSwipe 组件 [\#39](https://github.com/youzan/vant/pull/39) +* 新增 SwipeCell 组件 [\#39](https://github.com/youzan/vant/pull/39) * 新增 Search 组件微杂志样式 [\#38](https://github.com/youzan/vant/pull/38) ### [0.5.8](https://github.com/youzan/vant/tree/v0.5.8) diff --git a/docs/src/demo-entry.js b/docs/src/demo-entry.js index 5c47b592e..3865fc0c4 100644 --- a/docs/src/demo-entry.js +++ b/docs/src/demo-entry.js @@ -10,7 +10,6 @@ export default { 'button': () => wrapper(import('../../packages/button/demo'), 'button'), 'card': () => wrapper(import('../../packages/card/demo'), 'card'), 'cell': () => wrapper(import('../../packages/cell/demo'), 'cell'), - 'cell-swipe': () => wrapper(import('../../packages/cell-swipe/demo'), 'cell-swipe'), 'checkbox': () => wrapper(import('../../packages/checkbox/demo'), 'checkbox'), 'circle': () => wrapper(import('../../packages/circle/demo'), 'circle'), 'col': () => wrapper(import('../../packages/col/demo'), 'col'), @@ -45,6 +44,7 @@ export default { 'steps': () => wrapper(import('../../packages/steps/demo'), 'steps'), 'submit-bar': () => wrapper(import('../../packages/submit-bar/demo'), 'submit-bar'), 'swipe': () => wrapper(import('../../packages/swipe/demo'), 'swipe'), + 'swipe-cell': () => wrapper(import('../../packages/swipe-cell/demo'), 'swipe-cell'), 'switch': () => wrapper(import('../../packages/switch/demo'), 'switch'), 'switch-cell': () => wrapper(import('../../packages/switch-cell/demo'), 'switch-cell'), 'tab': () => wrapper(import('../../packages/tab/demo'), 'tab'), diff --git a/docs/src/doc.config.js b/docs/src/doc.config.js index c12437686..a4d6bcca8 100644 --- a/docs/src/doc.config.js +++ b/docs/src/doc.config.js @@ -245,14 +245,14 @@ module.exports = { { groupName: '高阶组件', list: [ - { - path: '/cell-swipe', - title: 'CellSwipe 滑动单元格' - }, { path: '/image-preview', title: 'ImagePreview 图片预览' }, + { + path: '/swipe-cell', + title: 'SwipeCell 滑动单元格' + }, { path: '/switch-cell', title: 'SwitchCell 开关单元格' @@ -542,8 +542,8 @@ module.exports = { groupName: 'Advanced Components', list: [ { - path: '/cell-swipe', - title: 'CellSwipe' + path: '/swipe-cell', + title: 'SwipeCell' }, { path: '/image-preview', diff --git a/docs/src/docs-entry.js b/docs/src/docs-entry.js index 840c5b983..d81934da9 100644 --- a/docs/src/docs-entry.js +++ b/docs/src/docs-entry.js @@ -27,8 +27,6 @@ export default { 'card.zh-CN': () => import('../../packages/card/zh-CN.md'), 'cell.en-US': () => import('../../packages/cell/en-US.md'), 'cell.zh-CN': () => import('../../packages/cell/zh-CN.md'), - 'cell-swipe.en-US': () => import('../../packages/cell-swipe/en-US.md'), - 'cell-swipe.zh-CN': () => import('../../packages/cell-swipe/zh-CN.md'), 'checkbox.en-US': () => import('../../packages/checkbox/en-US.md'), 'checkbox.zh-CN': () => import('../../packages/checkbox/zh-CN.md'), 'circle.en-US': () => import('../../packages/circle/en-US.md'), @@ -99,6 +97,8 @@ export default { 'submit-bar.zh-CN': () => import('../../packages/submit-bar/zh-CN.md'), 'swipe.en-US': () => import('../../packages/swipe/en-US.md'), 'swipe.zh-CN': () => import('../../packages/swipe/zh-CN.md'), + 'swipe-cell.en-US': () => import('../../packages/swipe-cell/en-US.md'), + 'swipe-cell.zh-CN': () => import('../../packages/swipe-cell/zh-CN.md'), 'switch.en-US': () => import('../../packages/switch/en-US.md'), 'switch.zh-CN': () => import('../../packages/switch/zh-CN.md'), 'switch-cell.en-US': () => import('../../packages/switch-cell/en-US.md'), diff --git a/packages/cell-swipe/test/__snapshots__/index.spec.js.snap b/packages/cell-swipe/test/__snapshots__/index.spec.js.snap deleted file mode 100644 index c4a218f73..000000000 --- a/packages/cell-swipe/test/__snapshots__/index.spec.js.snap +++ /dev/null @@ -1,46 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`drag and show left part 1`] = ` -
-
-
-
-
-
-`; - -exports[`drag and show left part 2`] = ` -
-
-
-
-
-
-`; - -exports[`drag and show left part 3`] = ` -
-
-
-
-
-
-`; - -exports[`drag and show left part 4`] = ` -
-
-
-
-
-
-`; - -exports[`drag and show left part 5`] = ` -
-
-
-
-
-
-`; diff --git a/packages/index.js b/packages/index.js index 5b9b3d44e..7a62fac8b 100644 --- a/packages/index.js +++ b/packages/index.js @@ -9,7 +9,6 @@ import Button from './button'; import Card from './card'; import Cell from './cell'; import CellGroup from './cell-group'; -import CellSwipe from './cell-swipe'; import Checkbox from './checkbox'; import CheckboxGroup from './checkbox-group'; import Circle from './circle'; @@ -55,6 +54,7 @@ import Stepper from './stepper'; import Steps from './steps'; import SubmitBar from './submit-bar'; import Swipe from './swipe'; +import SwipeCell from './swipe-cell'; import SwipeItem from './swipe-item'; import Switch from './switch'; import SwitchCell from './switch-cell'; @@ -80,7 +80,6 @@ const components = [ Card, Cell, CellGroup, - CellSwipe, Checkbox, CheckboxGroup, Circle, @@ -125,6 +124,7 @@ const components = [ Steps, SubmitBar, Swipe, + SwipeCell, SwipeItem, Switch, SwitchCell, @@ -162,7 +162,6 @@ export { Card, Cell, CellGroup, - CellSwipe, Checkbox, CheckboxGroup, Circle, @@ -208,6 +207,7 @@ export { Steps, SubmitBar, Swipe, + SwipeCell, SwipeItem, Switch, SwitchCell, diff --git a/packages/cell-swipe/demo/index.vue b/packages/swipe-cell/demo/index.vue similarity index 89% rename from packages/cell-swipe/demo/index.vue rename to packages/swipe-cell/demo/index.vue index 385641b6a..e9c4d9bd4 100644 --- a/packages/cell-swipe/demo/index.vue +++ b/packages/swipe-cell/demo/index.vue @@ -3,23 +3,23 @@ {{ $t('tips') }} - + {{ $t('button1') }} {{ $t('button2') }} - + - + {{ $t('button1') }} {{ $t('button2') }} - + @@ -68,10 +68,10 @@ export default {