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 diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index 751fc836a..d89e3b4e6 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 b3ae6640a..3b8aafcf2 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` diff --git a/package.json b/package.json index ac3286ac5..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", @@ -37,7 +37,7 @@ } }, "lint-staged": { - "*.{js,vue}": [ + "*.{ts,tsx,js,vue}": [ "eslint", "git add" ], @@ -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/packages/index.ts b/packages/index.ts index 3f425d56e..09def9ab6 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, diff --git a/packages/overlay/index.tsx b/packages/overlay/index.tsx index dae07e1a2..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'; @@ -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 8d7bd662d..bff8450b8 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('open & close event', () => { diff --git a/packages/step/index.js b/packages/step/index.js index c0c0fe551..eb27ad146 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() { diff --git a/packages/step/index.less b/packages/step/index.less index 701f35fb3..55e2175d3 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 { @@ -55,6 +55,10 @@ font-size: 12px; margin-left: 3px; transform: translateX(-50%); + + @media(max-width: 321px) { + font-size: 11px; + } } .van-step__line { diff --git a/packages/steps/index.less b/packages/steps/index.less index 517de7f06..53eb55243 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; } 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"