diff --git a/README.md b/README.md index e8a0ce566..1d5ca4d8f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README.zh-CN.md b/README.zh-CN.md index 896cc5932..b9482eaa7 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -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 | ## 链接 diff --git a/packages/vant-cli/cjs/vant-cli-release-plugin.cjs b/packages/vant-cli/cjs/vant-cli-release-plugin.cjs new file mode 100644 index 000000000..5cd4db383 --- /dev/null +++ b/packages/vant-cli/cjs/vant-cli-release-plugin.cjs @@ -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; diff --git a/packages/vant-cli/src/commands/release.ts b/packages/vant-cli/src/commands/release.ts index 52618e206..68d221b62 100644 --- a/packages/vant-cli/src/commands/release.ts +++ b/packages/vant-cli/src/commands/release.ts @@ -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({ diff --git a/packages/vant-cli/src/compiler/vant-cli-release-plugin.ts b/packages/vant-cli/src/compiler/vant-cli-release-plugin.ts deleted file mode 100644 index 03bc1d275..000000000 --- a/packages/vant-cli/src/compiler/vant-cli-release-plugin.ts +++ /dev/null @@ -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; diff --git a/packages/vant/docs/markdown/changelog.en-US.md b/packages/vant/docs/markdown/changelog.en-US.md index 0f7953e84..c3a8197df 100644 --- a/packages/vant/docs/markdown/changelog.en-US.md +++ b/packages/vant/docs/markdown/changelog.en-US.md @@ -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` diff --git a/packages/vant/docs/markdown/changelog.zh-CN.md b/packages/vant/docs/markdown/changelog.zh-CN.md index 21a5ca4e1..ed72ca81c 100644 --- a/packages/vant/docs/markdown/changelog.zh-CN.md +++ b/packages/vant/docs/markdown/changelog.zh-CN.md @@ -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` diff --git a/packages/vant/docs/markdown/home.en-US.md b/packages/vant/docs/markdown/home.en-US.md index 3a39b0bbe..d5a860695 100644 --- a/packages/vant/docs/markdown/home.en-US.md +++ b/packages/vant/docs/markdown/home.en-US.md @@ -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 diff --git a/packages/vant/docs/markdown/home.zh-CN.md b/packages/vant/docs/markdown/home.zh-CN.md index 2ac55c6f7..e92e2e47f 100644 --- a/packages/vant/docs/markdown/home.zh-CN.md +++ b/packages/vant/docs/markdown/home.zh-CN.md @@ -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 | ### 链接 diff --git a/packages/vant/package.json b/packages/vant/package.json index 8f1591a71..02be6bdcb 100644 --- a/packages/vant/package.json +++ b/packages/vant/package.json @@ -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", diff --git a/packages/vant/src/cell/Cell.tsx b/packages/vant/src/cell/Cell.tsx index 5667c2732..59a4850c1 100644 --- a/packages/vant/src/cell/Cell.tsx +++ b/packages/vant/src/cell/Cell.tsx @@ -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, 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); diff --git a/packages/vant/src/cell/README.md b/packages/vant/src/cell/README.md index 15f474997..fab509c86 100644 --- a/packages/vant/src/cell/README.md +++ b/packages/vant/src/cell/README.md @@ -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 diff --git a/packages/vant/src/cell/README.zh-CN.md b/packages/vant/src/cell/README.zh-CN.md index fd90e9a37..dbc79ae31 100644 --- a/packages/vant/src/cell/README.zh-CN.md +++ b/packages/vant/src/cell/README.zh-CN.md @@ -202,7 +202,12 @@ app.use(CellGroup); 组件导出以下类型定义: ```ts -import type { CellProps, CellGroupProps, CellArrowDirection } from 'vant'; +import type { + CellSize, + CellProps, + CellGroupProps, + CellArrowDirection, +} from 'vant'; ``` ## 主题定制 diff --git a/packages/vant/src/cell/index.ts b/packages/vant/src/cell/index.ts index 83a830f34..d81f4eaf7 100644 --- a/packages/vant/src/cell/index.ts +++ b/packages/vant/src/cell/index.ts @@ -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'; diff --git a/packages/vant/src/overlay/index.ts b/packages/vant/src/overlay/index.ts index e4d3f410c..f05212d49 100644 --- a/packages/vant/src/overlay/index.ts +++ b/packages/vant/src/overlay/index.ts @@ -3,3 +3,4 @@ import _Overlay from './Overlay'; export const Overlay = withInstall(_Overlay); export default Overlay; +export type { OverlayProps } from './Overlay';