mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge branch 'dev' into next
This commit is contained in:
commit
cabb26bbd8
@ -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.
|
- Minor version:released every one to two months, including backwards compatible features.
|
||||||
- Major version:including breaking changes and new 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)
|
### [v2.10.2](https://github.com/youzan/vant/compare/v2.10.1...v2.10.2)
|
||||||
|
|
||||||
`2020-08-12`
|
`2020-08-12`
|
||||||
|
@ -10,6 +10,25 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
|
|||||||
- 次版本号:每隔一至二个月发布,包含新特性和较大的功能更新,向下兼容。
|
- 次版本号:每隔一至二个月发布,包含新特性和较大的功能更新,向下兼容。
|
||||||
- 主版本号:发布时间不定,包含不兼容更新,预计下一个主版本会与 Vue 3.0 同期发布。
|
- 主版本号:发布时间不定,包含不兼容更新,预计下一个主版本会与 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)
|
### [v2.10.2](https://github.com/youzan/vant/compare/v2.10.1...v2.10.2)
|
||||||
|
|
||||||
`2020-08-12`
|
`2020-08-12`
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
- [site.nav](#sitenav)
|
- [site.nav](#sitenav)
|
||||||
- [site.versions](#siteversions)
|
- [site.versions](#siteversions)
|
||||||
- [site.baiduAnalytics](#sitebaiduanalytics)
|
- [site.baiduAnalytics](#sitebaiduanalytics)
|
||||||
|
- [site.searchConfig](#sitesearchconfig)
|
||||||
- [Webpack](#webpack)
|
- [Webpack](#webpack)
|
||||||
- [Babel](#babel)
|
- [Babel](#babel)
|
||||||
- [默认配置](#-1)
|
- [默认配置](#-1)
|
||||||
@ -212,6 +213,15 @@ module.exports = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### site.searchConfig
|
||||||
|
|
||||||
|
- Type: `object`
|
||||||
|
- Default: `undefined`
|
||||||
|
|
||||||
|
文档网站的搜索配置,基于 algolia 提供的 docsearch 服务实现。
|
||||||
|
|
||||||
|
配置内容参见 [docsearch](https://docsearch.algolia.com/docs/behavior)。
|
||||||
|
|
||||||
## Webpack
|
## Webpack
|
||||||
|
|
||||||
通过根目录下的`webpack.config.js`文件可以修改 Webpack 配置,配置内容会通过 [webpack-merge](https://github.com/survivejs/webpack-merge) 合并到最终的配置中。
|
通过根目录下的`webpack.config.js`文件可以修改 Webpack 配置,配置内容会通过 [webpack-merge](https://github.com/survivejs/webpack-merge) 合并到最终的配置中。
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { createNamespace } from '../../utils';
|
import { createNamespace, addUnit } from '../../utils';
|
||||||
import { setScrollTop } from '../../utils/dom/scroll';
|
import { setScrollTop } from '../../utils/dom/scroll';
|
||||||
import {
|
import {
|
||||||
t,
|
t,
|
||||||
@ -44,6 +44,12 @@ export default createComponent({
|
|||||||
return formatMonthTitle(this.date);
|
return formatMonthTitle(this.date);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
rowHeightWithUnit() {
|
||||||
|
if (this.rowHeight !== ROW_HEIGHT) {
|
||||||
|
return addUnit(this.rowHeight);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
offset() {
|
offset() {
|
||||||
const { firstDayOfWeek } = this;
|
const { firstDayOfWeek } = this;
|
||||||
|
|
||||||
@ -209,16 +215,14 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getDayStyle(type, index) {
|
getDayStyle(type, index) {
|
||||||
const style = {};
|
const style = {
|
||||||
|
height: this.rowHeightWithUnit,
|
||||||
|
};
|
||||||
|
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
style.marginLeft = `${(100 * this.offset) / 7}%`;
|
style.marginLeft = `${(100 * this.offset) / 7}%`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.rowHeight !== ROW_HEIGHT) {
|
|
||||||
style.height = `${this.rowHeight}px`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.color) {
|
if (this.color) {
|
||||||
if (
|
if (
|
||||||
type === 'start' ||
|
type === 'start' ||
|
||||||
@ -287,7 +291,14 @@ export default createComponent({
|
|||||||
tabindex={-1}
|
tabindex={-1}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<div class={bem('selected-day')} style={{ background: this.color }}>
|
<div
|
||||||
|
class={bem('selected-day')}
|
||||||
|
style={{
|
||||||
|
width: this.rowHeightWithUnit,
|
||||||
|
height: this.rowHeightWithUnit,
|
||||||
|
background: this.color,
|
||||||
|
}}
|
||||||
|
>
|
||||||
{TopInfo}
|
{TopInfo}
|
||||||
{item.text}
|
{item.text}
|
||||||
{BottomInfo}
|
{BottomInfo}
|
||||||
|
@ -231,7 +231,7 @@ exports[`row-height prop 1`] = `
|
|||||||
<div class="van-calendar__month" style="padding-bottom: 300px;">
|
<div class="van-calendar__month" style="padding-bottom: 300px;">
|
||||||
<div role="grid" class="van-calendar__days">
|
<div role="grid" class="van-calendar__days">
|
||||||
<div class="van-calendar__month-mark">1</div>
|
<div class="van-calendar__month-mark">1</div>
|
||||||
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="margin-left: 71.42857142857143%; height: 50px;">1</div>
|
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px; margin-left: 71.42857142857143%;">1</div>
|
||||||
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">2</div>
|
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">2</div>
|
||||||
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">3</div>
|
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">3</div>
|
||||||
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">4</div>
|
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">4</div>
|
||||||
@ -241,7 +241,7 @@ exports[`row-height prop 1`] = `
|
|||||||
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">8</div>
|
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">8</div>
|
||||||
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">9</div>
|
<div role="gridcell" class="van-calendar__day van-calendar__day--disabled" style="height: 50px;">9</div>
|
||||||
<div role="gridcell" tabindex="-1" class="van-calendar__day" style="height: 50px;">
|
<div role="gridcell" tabindex="-1" class="van-calendar__day" style="height: 50px;">
|
||||||
<div class="van-calendar__selected-day">10</div>
|
<div class="van-calendar__selected-day" style="width: 50px; height: 50px;">10</div>
|
||||||
</div>
|
</div>
|
||||||
<div role="gridcell" tabindex="-1" class="van-calendar__day" style="height: 50px;">11</div>
|
<div role="gridcell" tabindex="-1" class="van-calendar__day" style="height: 50px;">11</div>
|
||||||
<div role="gridcell" tabindex="-1" class="van-calendar__day" style="height: 50px;">12</div>
|
<div role="gridcell" tabindex="-1" class="van-calendar__day" style="height: 50px;">12</div>
|
||||||
|
@ -39,6 +39,18 @@ module.exports = {
|
|||||||
apiKey: '90067aecdaa2c85220e2783cd305caac',
|
apiKey: '90067aecdaa2c85220e2783cd305caac',
|
||||||
indexName: 'vant',
|
indexName: 'vant',
|
||||||
placeholder: '搜索文档...',
|
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: [
|
nav: [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user