Merge branch 'dev' into next

This commit is contained in:
chenjiahan 2021-11-04 20:21:28 +08:00
commit 26fa234026
15 changed files with 78 additions and 35 deletions

View File

@ -86,11 +86,12 @@ Vant 3 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
| Project | Description |
| --- | --- |
| [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components base on Vant |
| [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components based on Vant |
| [mxdi9i7/vant-react](https://github.com/mxdi9i7/vant-react) | Mobile UI Components built on React and TS, inspired by Vant |
| [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Alipay MiniProgram UI |
| [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro |
| [vant-theme](https://github.com/Aisen60/vant-theme) | online theme preview built on Vant UI |
| [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
| [@antmjs/vantui](https://github.com/antmjs/vantui) | Mobile UI Components based on Vant, supporting Taro and React |
## Links

View File

@ -101,6 +101,7 @@ Vant 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致
| [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Vant 支付宝小程序版 |
| [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro 版 |
| [vant-theme](https://github.com/Aisen60/vant-theme) | Vant 在线主题预览工具 |
| [@antmjs/vantui](https://github.com/antmjs/vantui) | 基于 Vant Weapp 开发的多端组件库,同时支持 Taro 和 React |
## 链接

View File

@ -0,0 +1,14 @@
const releaseIt = require('release-it');
const { execSync } = require('child_process');
class VantCliReleasePlugin extends releaseIt.Plugin {
async beforeRelease() {
// log an empty line
console.log('');
execSync('vant-cli build', { stdio: 'inherit' });
execSync('vant-cli changelog', { stdio: 'inherit' });
}
}
module.exports = VantCliReleasePlugin;

View File

@ -4,7 +4,7 @@ import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const PLUGIN_PATH = join(__dirname, '../compiler/vant-cli-release-plugin.js');
const PLUGIN_PATH = join(__dirname, '../../cjs/vant-cli-release-plugin.cjs');
export async function release(command: { tag?: string }) {
await releaseIt({

View File

@ -1,15 +0,0 @@
import releaseIt from 'release-it';
import { build } from '../commands/build.js';
import { changelog } from '../commands/changelog.js';
class VantCliReleasePlugin extends releaseIt.Plugin {
async beforeRelease() {
// log an empty line
console.log('');
await build();
await changelog();
}
}
module.exports = VantCliReleasePlugin;

View File

@ -16,6 +16,24 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
## Details
### [v3.2.7](https://github.com/youzan/vant/compare/v3.2.6...v3.2.7)
`2021-11-04`
**Feature**
- export all props type [#9717](https://github.com/youzan/vant/issues/9717)
- add --van-text-color-2 CSS var [#9759](https://github.com/youzan/vant/issues/9759)
- add --van-text-color-3 CSS var [#9776](https://github.com/youzan/vant/issues/9776)
- Cascader: add options-top slot [#9732](https://github.com/youzan/vant/issues/9732)
- Coupon: add --van-coupon-content-text-color CSS var [#9760](https://github.com/youzan/vant/issues/9760)
- Picker: add --van-picker-mask-color CSS var [#9783](https://github.com/youzan/vant/issues/9783)
**Bug Fixes**
- Field: adjust textarea size when focus/blur [#9719](https://github.com/youzan/vant/issues/9719)
- fix --van-border-color should affect hairline [#9751](https://github.com/youzan/vant/issues/9751)
### [v3.2.6](https://github.com/youzan/vant/compare/v3.2.5...v3.2.6)
`2021-10-24`

View File

@ -16,6 +16,24 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
## 更新内容
### [v3.2.7](https://github.com/youzan/vant/compare/v3.2.6...v3.2.7)
`2021-11-04`
**Feature**
- 导出所有组件的 Props 类型 [#9717](https://github.com/youzan/vant/issues/9717)
- 新增 --van-text-color-2 CSS 变量 [#9759](https://github.com/youzan/vant/issues/9759)
- 新增 --van-text-color-3 CSS 变量 [#9776](https://github.com/youzan/vant/issues/9776)
- Cascader: 新增 options-top 插槽 [#9732](https://github.com/youzan/vant/issues/9732)
- Coupon: 新增 --van-coupon-content-text-color CSS 变量 [#9760](https://github.com/youzan/vant/issues/9760)
- Picker: 新增 --van-picker-mask-color CSS 变量 [#9783](https://github.com/youzan/vant/issues/9783)
**Bug Fixes**
- Field: 修复 textarea 在聚焦和失焦时未重新计算高度的问题 [#9719](https://github.com/youzan/vant/issues/9719)
- 修复 --van-border-color 变量不生效的问题 [#9751](https://github.com/youzan/vant/issues/9751)
### [v3.2.6](https://github.com/youzan/vant/compare/v3.2.5...v3.2.6)
`2021-10-24`

View File

@ -48,11 +48,12 @@ Vant 3 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
| Project | Description |
| --- | --- |
| [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components base on Vant |
| [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components based on Vant |
| [mxdi9i7/vant-react](https://github.com/mxdi9i7/vant-react) | Mobile UI Components built on React and TS, inspired by Vant |
| [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Alipay MiniProgram UI |
| [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro |
| [vant-theme](https://github.com/Aisen60/vant-theme) | online theme preview built on Vant UI |
| [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
| [@antmjs/vantui](https://github.com/antmjs/vantui) | Mobile UI Components based on Vant, supporting Taro and React |
### Links

View File

@ -69,6 +69,7 @@ Vant 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致
| [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Vant 支付宝小程序版 |
| [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro 版 |
| [vant-theme](https://github.com/Aisen60/vant-theme) | Vant 在线主题预览工具 |
| [@antmjs/vantui](https://github.com/antmjs/vantui) | 基于 Vant Weapp 开发的多端组件库,同时支持 Taro 和 React |
### 链接

View File

@ -1,6 +1,6 @@
{
"name": "vant",
"version": "3.2.6",
"version": "3.2.7",
"description": "Mobile UI Components built on Vue",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -23,11 +23,13 @@ import { Icon } from '../icon';
const [name, bem] = createNamespace('cell');
export type CellSize = 'normal' | 'large';
export type CellArrowDirection = 'up' | 'down' | 'left' | 'right';
export const cellSharedProps = {
icon: String,
size: String as PropType<'large'>,
size: String as PropType<CellSize>,
title: numericProp,
value: numericProp,
label: numericProp,
@ -57,14 +59,6 @@ export default defineComponent({
props: cellProps,
setup(props, { slots }) {
if (process.env.NODE_ENV !== 'production') {
if (slots.default) {
console.warn(
'[Vant] Cell: "default" slot is deprecated, please use "value" slot instead.'
);
}
}
const route = useRoute();
const renderLabel = () => {
@ -94,8 +88,7 @@ export default defineComponent({
};
const renderValue = () => {
// default slot is deprecated
// should be removed in next major version
// slots.default is an alias of slots.value
const slot = slots.value || slots.default;
const hasValue = slot || isDef(props.value);

View File

@ -197,7 +197,12 @@ app.use(CellGroup);
The component exports the following type definitions:
```ts
import type { CellProps, CellGroupProps, CellArrowDirection } from 'vant';
import type {
CellSize,
CellProps,
CellGroupProps,
CellArrowDirection,
} from 'vant';
```
## Theming

View File

@ -202,7 +202,12 @@ app.use(CellGroup);
组件导出以下类型定义:
```ts
import type { CellProps, CellGroupProps, CellArrowDirection } from 'vant';
import type {
CellSize,
CellProps,
CellGroupProps,
CellArrowDirection,
} from 'vant';
```
## 主题定制

View File

@ -3,4 +3,4 @@ import _Cell from './Cell';
export const Cell = withInstall(_Cell);
export default Cell;
export type { CellProps, CellArrowDirection } from './Cell';
export type { CellSize, CellProps, CellArrowDirection } from './Cell';

View File

@ -3,3 +3,4 @@ import _Overlay from './Overlay';
export const Overlay = withInstall(_Overlay);
export default Overlay;
export type { OverlayProps } from './Overlay';