From 2b49ca60f4c2ea9251dcc64b9f479d8aec0f2728 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 19 Oct 2020 11:06:53 +0800 Subject: [PATCH 1/4] fix(Popup): can't disable close-on-popstate (#7357) --- src/mixins/close-on-popstate.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mixins/close-on-popstate.js b/src/mixins/close-on-popstate.js index ed98c5c18..21822a3d9 100644 --- a/src/mixins/close-on-popstate.js +++ b/src/mixins/close-on-popstate.js @@ -25,6 +25,11 @@ export const CloseOnPopstateMixin = { }, methods: { + onPopstate() { + this.close(); + this.shouldReopen = false; + }, + handlePopstate(bind) { /* istanbul ignore if */ if (this.$isServer) { @@ -34,10 +39,7 @@ export const CloseOnPopstateMixin = { if (this.bindStatus !== bind) { this.bindStatus = bind; const action = bind ? on : off; - action(window, 'popstate', () => { - this.close(); - this.shouldReopen = false; - }); + action(window, 'popstate', this.onPopstate); } }, }, From 7a35011d2287091ca14b2faf37c63f50ab960540 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Mon, 19 Oct 2020 11:09:10 +0800 Subject: [PATCH 2/4] chore: release 2.10.11-beta.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2db799bb6..8c38ceff8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vant", - "version": "2.10.10", + "version": "2.10.11-beta.0", "description": "Mobile UI Components built on Vue", "main": "lib/index.js", "module": "es/index.js", From c11f0c02d71022e2998200e540ea01791648fb9c Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Mon, 19 Oct 2020 11:11:26 +0800 Subject: [PATCH 3/4] docs(changelog): 2.10.11-beta.0 --- docs/markdown/changelog.en-US.md | 8 ++++++++ docs/markdown/changelog.zh-CN.md | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index e8d2a1c61..923f3d356 100644 --- a/docs/markdown/changelog.en-US.md +++ b/docs/markdown/changelog.en-US.md @@ -10,6 +10,14 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/). - Minor version:released every one to two months, including backwards compatible features. - Major version:including breaking changes and new features. +### [v2.10.11-beta.0](https://github.com/youzan/vant/compare/v2.10.10...v2.10.11-beta.0) + +`2020-10-19` + +**Bug Fixes** + +- Dialog: failed to disable closeOnPopstate [#7357](https://github.com/youzan/vant/issues/7357) + ### [v2.10.10](https://github.com/youzan/vant/compare/v2.10.9...v2.10.10) `2020-10-18` diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index 023d5f747..e95e47a54 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -10,6 +10,14 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。 - 次版本号:每隔一至二个月发布,包含新特性和较大的功能更新,向下兼容。 - 主版本号:发布时间不定,包含不兼容更新,预计下一个主版本会与 Vue 3.0 同期发布。 +### [v2.10.11-beta.0](https://github.com/youzan/vant/compare/v2.10.10...v2.10.11-beta.0) + +`2020-10-19` + +**Bug Fixes** + +- Dialog: 修复将 closeOnPopstate 设置为 false 时不生效的问题 [#7357](https://github.com/youzan/vant/issues/7357) + ### [v2.10.10](https://github.com/youzan/vant/compare/v2.10.9...v2.10.10) `2020-10-18` From 83fc8673a82efc9995f1469ad9147c02cedbc45e Mon Sep 17 00:00:00 2001 From: Callum Date: Mon, 19 Oct 2020 11:07:21 +0200 Subject: [PATCH 4/4] docs(Button): Fixed grammar in button readme. (#7359) --- src/button/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/button/README.md b/src/button/README.md index e573a878d..7caef15b0 100644 --- a/src/button/README.md +++ b/src/button/README.md @@ -124,7 +124,7 @@ Vue.use(Button); | loading-type | Loading type, can be set to `spinner` | _string_ | `circular` | | loading-size | Loading icon size | _string_ | `20px` | | url | Link URL | _string_ | - | -| to | Target route of the link, same as to of vue-router | _string \| object_ | - | +| to | Target route of the link, same as using vue-router | _string \| object_ | - | | replace | If true, the navigation will not leave a history record | _boolean_ | `false` | ### Events