Merge branch '1.x' into 'dev'

This commit is contained in:
陈嘉涵 2019-05-05 11:23:22 +08:00
commit fc344d672c
11 changed files with 67 additions and 24 deletions

View File

@ -1,6 +1,3 @@
git checkout master
git merge dev
#!/usr/bin/env sh #!/usr/bin/env sh
set -e set -e
echo "Enter release version: " echo "Enter release version: "
@ -19,11 +16,8 @@ then
git commit -am "[release] $VERSION" git commit -am "[release] $VERSION"
# publish # publish
git push origin master git push origin 1.x
git push origin refs/tags/v$VERSION git push origin refs/tags/v$VERSION
git checkout dev
git rebase master
git push origin dev
npm publish npm publish
fi fi

View File

@ -1,5 +1,23 @@
## Changelog ## 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) ## [v1.6.16](https://github.com/youzan/vant/tree/v1.6.16)
`2019-04-26` `2019-04-26`

View File

@ -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) ## [v1.6.16](https://github.com/youzan/vant/tree/v1.6.16)
`2019-04-26` `2019-04-26`

View File

@ -1,6 +1,6 @@
{ {
"name": "vant", "name": "vant",
"version": "1.6.16", "version": "1.6.17",
"description": "Mobile UI Components built on Vue", "description": "Mobile UI Components built on Vue",
"main": "lib/index.js", "main": "lib/index.js",
"module": "es/index.js", "module": "es/index.js",
@ -37,7 +37,7 @@
} }
}, },
"lint-staged": { "lint-staged": {
"*.{js,vue}": [ "*.{ts,tsx,js,vue}": [
"eslint", "eslint",
"git add" "git add"
], ],
@ -59,7 +59,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.4.3", "@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/babel-helper-vue-jsx-merge-props": "^1.0.0-beta.3",
"vue-lazyload": "1.2.3" "vue-lazyload": "1.2.3"
}, },

View File

@ -80,7 +80,7 @@ declare global {
} }
} }
const version = '1.6.16'; const version = '1.6.17';
const components = [ const components = [
ActionSheet, ActionSheet,
AddressEdit, AddressEdit,

View File

@ -1,5 +1,5 @@
import { use } from '../utils'; import { use } from '../utils';
import { emit, inherit } from '../utils/functional'; import { inherit } from '../utils/functional';
// Types // Types
import { CreateElement, RenderContext } from 'vue/types'; import { CreateElement, RenderContext } from 'vue/types';
@ -39,9 +39,6 @@ function Overlay(
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
}} }}
onClick={(event: Event) => {
emit(ctx, 'click', event);
}}
{...inherit(ctx, true)} {...inherit(ctx, true)}
/> />
</transition> </transition>

View File

@ -146,12 +146,18 @@ test('watch overlay prop', () => {
expect(div.querySelector('.van-overlay')).toBeTruthy(); expect(div.querySelector('.van-overlay')).toBeTruthy();
}); });
test('close on click modal', () => { test('close on click overlay', () => {
const div = document.createElement('div'); const div = document.createElement('div');
const onClickOverlay = jest.fn();
wrapper = mount({ wrapper = mount({
template: ` template: `
<div> <div>
<popup v-model="value" :get-container="getContainer" /> <popup
v-model="value"
:get-container="getContainer"
@click-overlay="onClickOverlay"
/>
</div> </div>
`, `,
components: { components: {
@ -162,13 +168,18 @@ test('close on click modal', () => {
value: true, value: true,
getContainer: () => div getContainer: () => div
}; };
},
methods: {
onClickOverlay
} }
}); });
const modal = div.querySelector('.van-overlay'); const modal = div.querySelector('.van-overlay');
triggerDrag(modal, 0, -30); triggerDrag(modal, 0, -30);
modal.click(); modal.click();
expect(wrapper.vm.value).toBeFalsy(); expect(wrapper.vm.value).toBeFalsy();
expect(onClickOverlay).toHaveBeenCalledTimes(1);
}); });
test('open & close event', () => { test('open & close event', () => {

View File

@ -5,7 +5,9 @@ const [sfc, bem] = use('step');
export default sfc({ export default sfc({
beforeCreate() { 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() { beforeDestroy() {

View File

@ -26,7 +26,7 @@
&:last-child { &:last-child {
position: absolute; position: absolute;
right: 10px; right: 1px;
width: auto; width: auto;
.van-step__title { .van-step__title {
@ -55,6 +55,10 @@
font-size: 12px; font-size: 12px;
margin-left: 3px; margin-left: 3px;
transform: translateX(-50%); transform: translateX(-50%);
@media(max-width: 321px) {
font-size: 11px;
}
} }
.van-step__line { .van-step__line {

View File

@ -10,7 +10,6 @@
.van-steps__items { .van-steps__items {
display: flex; display: flex;
margin: 0 0 10px; margin: 0 0 10px;
overflow: hidden;
position: relative; position: relative;
padding-bottom: 22px; padding-bottom: 22px;
} }

View File

@ -1123,10 +1123,10 @@
eslint-plugin-import "^2.16.0" eslint-plugin-import "^2.16.0"
eslint-plugin-vue "^5.2.1" eslint-plugin-vue "^5.2.1"
"@vant/icons@1.1.6": "@vant/icons@1.1.7":
version "1.1.6" version "1.1.7"
resolved "https://registry.yarnpkg.com/@vant/icons/-/icons-1.1.6.tgz#6714656ca69d303936020a6b483e1ebaf5f0b1e8" resolved "https://registry.yarnpkg.com/@vant/icons/-/icons-1.1.7.tgz#29561adfffa6a750d279dccdbe9a69b743934f3f"
integrity sha512-gpdk+rPsbwjI23QmEnNumYVxwNgvgKKh1dBmkkcXPTlRDtsfrCE02FQn3CVijOdwTovUo4zGUCDKKMLyxl+hPA== integrity sha512-hCHVniOmBIs789UYxICgC3k3wGWI3QGx3/LOtSjMu7DtCyGdFX/6saNzrpDENNAponHAsszvUmBz37v9GQjX9A==
"@vant/markdown-loader@^1.0.3": "@vant/markdown-loader@^1.0.3":
version "1.0.3" version "1.0.3"