From 02dc3e392ca8f6848eeef33c15226640e6a9a5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Tue, 30 Apr 2019 09:27:57 +0800 Subject: [PATCH 1/8] [bugfix] Icon: new and question icon incomplete render --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ac3286ac5..706da4d49 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "license": "MIT", "dependencies": { "@babel/runtime": "^7.4.3", - "@vant/icons": "1.1.6", + "@vant/icons": "1.1.7", "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0-beta.3", "vue-lazyload": "1.2.3" }, diff --git a/yarn.lock b/yarn.lock index f65c5d4be..85cce5669 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,10 +1123,10 @@ eslint-plugin-import "^2.16.0" eslint-plugin-vue "^5.2.1" -"@vant/icons@1.1.6": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@vant/icons/-/icons-1.1.6.tgz#6714656ca69d303936020a6b483e1ebaf5f0b1e8" - integrity sha512-gpdk+rPsbwjI23QmEnNumYVxwNgvgKKh1dBmkkcXPTlRDtsfrCE02FQn3CVijOdwTovUo4zGUCDKKMLyxl+hPA== +"@vant/icons@1.1.7": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@vant/icons/-/icons-1.1.7.tgz#29561adfffa6a750d279dccdbe9a69b743934f3f" + integrity sha512-hCHVniOmBIs789UYxICgC3k3wGWI3QGx3/LOtSjMu7DtCyGdFX/6saNzrpDENNAponHAsszvUmBz37v9GQjX9A== "@vant/markdown-loader@^1.0.3": version "1.0.3" From a85757490861e53fd8ddf7aff753f529429ac006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 10:04:54 +0800 Subject: [PATCH 2/8] update release.sh --- build/release.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build/release.sh b/build/release.sh index 98b9246b1..c92c743dd 100644 --- a/build/release.sh +++ b/build/release.sh @@ -1,6 +1,3 @@ -git checkout master -git merge dev - #!/usr/bin/env sh set -e echo "Enter release version: " @@ -19,11 +16,8 @@ then git commit -am "[release] $VERSION" # publish - git push origin master + git push origin 1.x git push origin refs/tags/v$VERSION - git checkout dev - git rebase master - git push origin dev npm publish fi From be5270dea12ceacab306fd46f7fb3d4e40681c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 10:14:30 +0800 Subject: [PATCH 3/8] [bugfix] Popup: click-overlay triggered twice --- packages/overlay/index.tsx | 3 --- packages/popup/test/index.spec.js | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/overlay/index.tsx b/packages/overlay/index.tsx index dae07e1a2..bd6323de5 100644 --- a/packages/overlay/index.tsx +++ b/packages/overlay/index.tsx @@ -39,9 +39,6 @@ function Overlay( event.preventDefault(); event.stopPropagation(); }} - onClick={(event: Event) => { - emit(ctx, 'click', event); - }} {...inherit(ctx, true)} /> diff --git a/packages/popup/test/index.spec.js b/packages/popup/test/index.spec.js index 7c1b9558d..ac84619c5 100644 --- a/packages/popup/test/index.spec.js +++ b/packages/popup/test/index.spec.js @@ -146,12 +146,18 @@ test('watch overlay prop', () => { expect(div.querySelector('.van-overlay')).toBeTruthy(); }); -test('close on click modal', () => { +test('close on click overlay', () => { const div = document.createElement('div'); + const onClickOverlay = jest.fn(); + wrapper = mount({ template: `
- +
`, components: { @@ -162,13 +168,18 @@ test('close on click modal', () => { value: true, getContainer: () => div }; + }, + methods: { + onClickOverlay } }); const modal = div.querySelector('.van-overlay'); triggerDrag(modal, 0, -30); modal.click(); + expect(wrapper.vm.value).toBeFalsy(); + expect(onClickOverlay).toHaveBeenCalledTimes(1); }); test('oepn & close event', () => { From 2c3b48ffcdc4fc13107aa171da63fcba1b5eaf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 10:16:06 +0800 Subject: [PATCH 4/8] [bugfix] lint-staged should lint ts files --- package.json | 2 +- packages/overlay/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 706da4d49..c1825d59c 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ } }, "lint-staged": { - "*.{js,vue}": [ + "*.{ts,tsx,js,vue}": [ "eslint", "git add" ], diff --git a/packages/overlay/index.tsx b/packages/overlay/index.tsx index bd6323de5..02cedf261 100644 --- a/packages/overlay/index.tsx +++ b/packages/overlay/index.tsx @@ -1,5 +1,5 @@ import { use } from '../utils'; -import { emit, inherit } from '../utils/functional'; +import { inherit } from '../utils/functional'; // Types import { CreateElement, RenderContext } from 'vue/types'; From 2ef74bd236f9fe9d11740c4c4822b93bbb8e9e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 10:25:18 +0800 Subject: [PATCH 5/8] [bugfix] Step: fit small screen --- packages/step/index.less | 6 +++++- packages/steps/index.less | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/step/index.less b/packages/step/index.less index eec67aa46..53fee6117 100644 --- a/packages/step/index.less +++ b/packages/step/index.less @@ -26,7 +26,7 @@ &:last-child { position: absolute; - right: 10px; + right: 1px; width: auto; .van-step__title { @@ -54,6 +54,10 @@ transform: translate3d(-50%, 0, 0); display: inline-block; margin-left: 3px; + + @media(max-width: 321px) { + font-size: 11px; + } } .van-step__line { diff --git a/packages/steps/index.less b/packages/steps/index.less index 8fd232f17..447214795 100644 --- a/packages/steps/index.less +++ b/packages/steps/index.less @@ -10,7 +10,6 @@ .van-steps__items { display: flex; margin: 0 0 10px; - overflow: hidden; position: relative; padding-bottom: 22px; From 925d8d8c909e67f80e037b21afe36d11fee090d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 10:36:22 +0800 Subject: [PATCH 6/8] [bugfix] Step: incorrect active step when insert step asynchronously --- packages/step/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/step/index.js b/packages/step/index.js index 33eae2f5f..8b6d81f13 100644 --- a/packages/step/index.js +++ b/packages/step/index.js @@ -5,7 +5,9 @@ const [sfc, bem] = use('step'); export default sfc({ beforeCreate() { - this.$parent.steps.push(this); + const { steps } = this.$parent; + const index = this.$parent.slots().indexOf(this.$vnode); + steps.splice(index === -1 ? steps.length : index, 0, this); }, beforeDestroy() { From 8b9ba9f35684142aee754e78978df24b1165516e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 10:40:27 +0800 Subject: [PATCH 7/8] [release] 1.6.17 --- package.json | 2 +- packages/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c1825d59c..704625f73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vant", - "version": "1.6.16", + "version": "1.6.17", "description": "Mobile UI Components built on Vue", "main": "lib/index.js", "module": "es/index.js", diff --git a/packages/index.ts b/packages/index.ts index cfea89cea..993f06f41 100644 --- a/packages/index.ts +++ b/packages/index.ts @@ -80,7 +80,7 @@ declare global { } } -const version = '1.6.16'; +const version = '1.6.17'; const components = [ Actionsheet, AddressEdit, From 4832342321944c933df7987a1f982c8fd4f422cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 5 May 2019 11:15:35 +0800 Subject: [PATCH 8/8] [changelog] 1.6.17 --- docs/markdown/changelog.en-US.md | 18 ++++++++++++++++++ docs/markdown/changelog.zh-CN.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index 78d8be853..1edea365d 100644 --- a/docs/markdown/changelog.en-US.md +++ b/docs/markdown/changelog.en-US.md @@ -1,5 +1,23 @@ ## Changelog +## [1.6.17](https://github.com/youzan/vant/tree/v1.6.17) +`2019-05-05` + +**Improvements** + +- List: add direction prop [\#3223](https://github.com/youzan/vant/pull/3223) +- Cell: add title-style prop [\#3233](https://github.com/youzan/vant/pull/3233) +- Field: add label-width prop [\#3235](https://github.com/youzan/vant/pull/3235) + +**Bug Fixes** + +- fix Card thumb image align center [\#3229](https://github.com/youzan/vant/pull/3229) +- fix Icon new and question icon incomplete render +- fix Step text display overlapping in small screen devices +- fix Step incorrect active step when insert step asynchronously +- fix Popup click-overlay event triggered twice when show multiple popup + + ## [v1.6.16](https://github.com/youzan/vant/tree/v1.6.16) `2019-04-26` diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index a6137baa8..ea93d0103 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -1,5 +1,23 @@ ## 更新日志 +## [1.6.17](https://github.com/youzan/vant/tree/v1.6.17) +`2019-05-05` + +**Improvements** + +- List: 新增 direction 属性 [\#3223](https://github.com/youzan/vant/pull/3223) +- Cell: 新增 title-style 属性 [\#3233](https://github.com/youzan/vant/pull/3233) +- Field: 新增 label-width 属性 [\#3235](https://github.com/youzan/vant/pull/3235) + +**Bug Fixes** + +- 修复 Card 图片未居中的问题 [\#3229](https://github.com/youzan/vant/pull/3229) +- 修复 Icon new、question 图标展示不全的问题 +- 修复 Step 异步插入步骤时顺序错误的问题 +- 修复 Step 步骤超过五项时在小屏设备上文字重叠的问题 +- 修复 Popup 弹出多个弹层时 click-overlay 事件重复触发的问题 + + ## [v1.6.16](https://github.com/youzan/vant/tree/v1.6.16) `2019-04-26`