Merge branch 'dev' of https://github.com/youzan/vant into dev

This commit is contained in:
chenjiahan 2020-07-02 14:42:14 +08:00
commit 4c1843d3c1
6 changed files with 41 additions and 9 deletions

25
.github/workflows/release-tag.yml vendored Normal file
View File

@ -0,0 +1,25 @@
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release for Tag
id: release_tag
uses: yyx990803/release-tag@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
body: |
更新内容参见 [CHANGELOG](https://youzan.github.io/vant/#/zh-CN/changelog)。
Please refer to [CHANGELOG](https://youzan.github.io/vant/#/en-US/changelog) for details.

View File

@ -133,6 +133,7 @@ export default {
| closeOnPopstate `v2.0.5` | Whether to close when popstate | _boolean_ | `false` | | closeOnPopstate `v2.0.5` | Whether to close when popstate | _boolean_ | `false` |
| closeOnClickOverlay | Whether to close when click overlay | _boolean_ | `false` | | closeOnClickOverlay | Whether to close when click overlay | _boolean_ | `false` |
| lockScroll | Whether to lock body scroll | _boolean_ | `true` | | lockScroll | Whether to lock body scroll | _boolean_ | `true` |
| allowHtml `v2.8.7` | Whether to allow HTML rendering in message | _boolean_ | `true` |
| beforeClose | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - | | beforeClose | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - |
| transition `v2.2.6` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | - | | transition `v2.2.6` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | - |
| getContainer | Return the mount node for Dialog | _string \| () => Element_ | `body` | | getContainer | Return the mount node for Dialog | _string \| () => Element_ | `body` |
@ -159,6 +160,7 @@ export default {
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `false` | | close-on-click-overlay | Whether to close when click overlay | _boolean_ | `false` |
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` | | lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` | | lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
| allow-html `v2.8.7` | Whether to allow HTML rendering in message | _boolean_ | `true` |
| before-close | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - | | before-close | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - |
| transition `v2.2.6` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | - | | transition `v2.2.6` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | - |
| get-container | Return the mount node for Dialog | _string \| () => Element_ | - | | get-container | Return the mount node for Dialog | _string \| () => Element_ | - |

View File

@ -163,6 +163,7 @@ export default {
| closeOnPopstate `v2.0.5` | 是否在页面回退时自动关闭 | _boolean_ | `false` | | closeOnPopstate `v2.0.5` | 是否在页面回退时自动关闭 | _boolean_ | `false` |
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | _boolean_ | `false` | | closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | _boolean_ | `false` |
| lockScroll | 是否锁定背景滚动 | _boolean_ | `true` | | lockScroll | 是否锁定背景滚动 | _boolean_ | `true` |
| allowHtml `v2.8.7` | 是否允许 message 内容中渲染 HTML | _boolean_ | `true` |
| beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | _(action, done) => void_ | - | | beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | _(action, done) => void_ | - |
| transition `v2.2.6` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | - | | transition `v2.2.6` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | - |
| getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | `body` | | getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | `body` |
@ -191,6 +192,7 @@ export default {
| close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | _boolean_ | `false` | | close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | _boolean_ | `false` |
| lazy-render | 是否在显示弹层时才渲染节点 | _boolean_ | `true` | | lazy-render | 是否在显示弹层时才渲染节点 | _boolean_ | `true` |
| lock-scroll | 是否锁定背景滚动 | _boolean_ | `true` | | lock-scroll | 是否锁定背景滚动 | _boolean_ | `true` |
| allow-html `v2.8.7` | 是否允许 message 内容中渲染 HTML | _boolean_ | `true` |
| before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | _(action, done) => void_ | - | | before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | _(action, done) => void_ | - |
| transition `v2.2.6` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | - | | transition `v2.2.6` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | - |
| get-container | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - | | get-container | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - |

View File

@ -193,6 +193,7 @@ export default {
} }
} }
// eliminate tap delay on safari
preventDefault(event, stopPropagation); preventDefault(event, stopPropagation);
this.checkTap(); this.checkTap();

View File

@ -45,8 +45,10 @@ export default createComponent({
} }
}, },
onTouchEnd() { onTouchEnd(event) {
if (this.active) { if (this.active) {
// eliminate tap delay on safari
event.preventDefault();
this.active = false; this.active = false;
this.$emit('press', this.text, this.type); this.$emit('press', this.text, this.type);
} }

View File

@ -105,6 +105,10 @@ module.exports = {
path: 'style', path: 'style',
title: 'Style 内置样式', title: 'Style 内置样式',
}, },
{
path: 'toast',
title: 'Toast 轻提示',
},
], ],
}, },
{ {
@ -211,10 +215,6 @@ module.exports = {
path: 'swipe-cell', path: 'swipe-cell',
title: 'SwipeCell 滑动单元格', title: 'SwipeCell 滑动单元格',
}, },
{
path: 'toast',
title: 'Toast 轻提示',
},
], ],
}, },
{ {
@ -452,6 +452,10 @@ module.exports = {
path: 'style', path: 'style',
title: 'Built-in style', title: 'Built-in style',
}, },
{
path: 'toast',
title: 'Toast',
},
], ],
}, },
{ {
@ -562,10 +566,6 @@ module.exports = {
path: 'swipe-cell', path: 'swipe-cell',
title: 'SwipeCell', title: 'SwipeCell',
}, },
{
path: 'toast',
title: 'Toast',
},
], ],
}, },
{ {