From ce94980a60a26daf90d8d5e743bb01bd089ece6e Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Tue, 25 Aug 2020 17:13:03 +0800 Subject: [PATCH 1/5] chore: release 2.10.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6480f8ce..eb39420bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vant", - "version": "2.10.2", + "version": "2.10.3", "description": "Mobile UI Components built on Vue", "main": "lib/index.js", "module": "es/index.js", From 24ae2899b85e4967909776fadebe64fa0fc2df70 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Tue, 25 Aug 2020 17:15:39 +0800 Subject: [PATCH 2/5] docs(changelog): 2.10.3 --- docs/markdown/changelog.en-US.md | 19 +++++++++++++++++++ docs/markdown/changelog.zh-CN.md | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/docs/markdown/changelog.en-US.md b/docs/markdown/changelog.en-US.md index 82afd16ea..7f3a81e52 100644 --- a/docs/markdown/changelog.en-US.md +++ b/docs/markdown/changelog.en-US.md @@ -10,6 +10,25 @@ 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.3](https://github.com/youzan/vant/compare/v2.10.2...v2.10.3) + +`2020-08-25` + +**Feature** + +- Uploader: preview-cover slot add index param [#7036](https://github.com/youzan/vant/issues/7036) + +**style** + +- Search: increase left padding to 12px [#7014](https://github.com/youzan/vant/issues/7014) +- Tabs: adjust default line-width to 40px [#7002](https://github.com/youzan/vant/issues/7002) +- Toast: adjust top position [#7044](https://github.com/youzan/vant/issues/7044) + +**Bug Fixes** + +- Calendar: render error when using rem unit [#7037](https://github.com/youzan/vant/issues/7037) +- Toast: failed to reopen when using get-container [#7032](https://github.com/youzan/vant/issues/7032) + ### [v2.10.2](https://github.com/youzan/vant/compare/v2.10.1...v2.10.2) `2020-08-12` diff --git a/docs/markdown/changelog.zh-CN.md b/docs/markdown/changelog.zh-CN.md index 01d71b3b3..62b049af6 100644 --- a/docs/markdown/changelog.zh-CN.md +++ b/docs/markdown/changelog.zh-CN.md @@ -10,6 +10,25 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。 - 次版本号:每隔一至二个月发布,包含新特性和较大的功能更新,向下兼容。 - 主版本号:发布时间不定,包含不兼容更新,预计下一个主版本会与 Vue 3.0 同期发布。 +### [v2.10.3](https://github.com/youzan/vant/compare/v2.10.2...v2.10.3) + +`2020-08-25` + +**Feature** + +- Uploader: 新增 preview-cover 插槽的 index 参数 [#7036](https://github.com/youzan/vant/issues/7036) + +**style** + +- Search: 左侧内边距调整为 12px [#7014](https://github.com/youzan/vant/issues/7014) +- Tabs: 底部条宽度固定为 40px [#7002](https://github.com/youzan/vant/issues/7002) +- Toast: 调整顶部展示/底部展示时的位置 [#7044](https://github.com/youzan/vant/issues/7044) + +**Bug Fixes** + +- Calendar: 修复使用 rem 单位时滚动条跳动的问题 [#7037](https://github.com/youzan/vant/issues/7037) +- Toast: 修复使用 get-container 属性可能导致 Toast 无法展示的问题 [#7032](https://github.com/youzan/vant/issues/7032) + ### [v2.10.2](https://github.com/youzan/vant/compare/v2.10.1...v2.10.2) `2020-08-12` From 570b324de39dcb1534961f839806364aef5332bc Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 25 Aug 2020 17:41:58 +0800 Subject: [PATCH 3/5] fix(Calendar): row-height should work on selected month (#7046) --- src/calendar/components/Month.js | 25 +++++++++++++------ .../test/__snapshots__/index.spec.js.snap | 4 +-- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/calendar/components/Month.js b/src/calendar/components/Month.js index a04dfda3e..8161ca41b 100644 --- a/src/calendar/components/Month.js +++ b/src/calendar/components/Month.js @@ -1,4 +1,4 @@ -import { createNamespace } from '../../utils'; +import { createNamespace, addUnit } from '../../utils'; import { setScrollTop } from '../../utils/dom/scroll'; import { t, @@ -42,6 +42,12 @@ export default createComponent({ return formatMonthTitle(this.date); }, + rowHeightWithUnit() { + if (this.rowHeight !== ROW_HEIGHT) { + return addUnit(this.rowHeight); + } + }, + offset() { const { firstDayOfWeek } = this; @@ -209,16 +215,14 @@ export default createComponent({ }, getDayStyle(type, index) { - const style = {}; + const style = { + height: this.rowHeightWithUnit, + }; if (index === 0) { style.marginLeft = `${(100 * this.offset) / 7}%`; } - if (this.rowHeight !== ROW_HEIGHT) { - style.height = `${this.rowHeight}px`; - } - if (this.color) { if ( type === 'start' || @@ -287,7 +291,14 @@ export default createComponent({ tabindex={-1} onClick={onClick} > -
+
{TopInfo} {item.text} {BottomInfo} diff --git a/src/calendar/test/__snapshots__/index.spec.js.snap b/src/calendar/test/__snapshots__/index.spec.js.snap index 378b78307..f5af9ddcf 100644 --- a/src/calendar/test/__snapshots__/index.spec.js.snap +++ b/src/calendar/test/__snapshots__/index.spec.js.snap @@ -231,7 +231,7 @@ exports[`row-height prop 1`] = `
1
-
1
+
1
2
3
4
@@ -241,7 +241,7 @@ exports[`row-height prop 1`] = `
8
9
-
10
+
10
11
12
From 2368c457536f18daa9ee7d82bff914a471172ee5 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 25 Aug 2020 19:01:21 +0800 Subject: [PATCH 4/5] docs: fix gitee search result hostname (#7047) --- vant.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vant.config.js b/vant.config.js index 3b4c22f2b..71a5dd9ef 100644 --- a/vant.config.js +++ b/vant.config.js @@ -38,6 +38,18 @@ module.exports = { apiKey: '90067aecdaa2c85220e2783cd305caac', indexName: 'vant', placeholder: '搜索文档...', + transformData(hits) { + if (location.hostname === 'vant-contrib.gitee.io') { + hits.forEach((hit) => { + if (hit.url) { + hit.url = hit.url.replace( + 'youzan.github.io', + 'vant-contrib.gitee.io' + ); + } + }); + } + }, }, nav: [ { From d97f7f644fd8b60d8b8ec6f4780a8898a9028af2 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 25 Aug 2020 19:05:13 +0800 Subject: [PATCH 5/5] docs(cli): add searchConfig guide (#7048) --- packages/vant-cli/docs/config.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/vant-cli/docs/config.md b/packages/vant-cli/docs/config.md index bc83205e6..794a71607 100644 --- a/packages/vant-cli/docs/config.md +++ b/packages/vant-cli/docs/config.md @@ -11,6 +11,7 @@ - [site.nav](#sitenav) - [site.versions](#siteversions) - [site.baiduAnalytics](#sitebaiduanalytics) + - [site.searchConfig](#sitesearchconfig) - [Webpack](#webpack) - [Babel](#babel) - [默认配置](#-1) @@ -212,6 +213,15 @@ module.exports = { }; ``` +### site.searchConfig + +- Type: `object` +- Default: `undefined` + +文档网站的搜索配置,基于 algolia 提供的 docsearch 服务实现。 + +配置内容参见 [docsearch](https://docsearch.algolia.com/docs/behavior)。 + ## Webpack 通过根目录下的`webpack.config.js`文件可以修改 Webpack 配置,配置内容会通过 [webpack-merge](https://github.com/survivejs/webpack-merge) 合并到最终的配置中。