Merge branch 'dev' into next

This commit is contained in:
chenjiahan 2022-07-23 22:20:49 +08:00
commit 83a4e286bd
82 changed files with 353 additions and 916 deletions

View File

@ -2,4 +2,4 @@
请移步 GitHub issues 进行反馈: 请移步 GitHub issues 进行反馈:
https://github.com/youzan/vant/issues https://github.com/vant-ui/vant/issues

View File

@ -29,7 +29,7 @@ It's welcomed to pull request, And there are some tips about that:
You will need [Node.js >= 14](https://nodejs.org) and [pnpm](https://pnpm.io). You will need [Node.js >= 14](https://nodejs.org) and [pnpm](https://pnpm.io).
```bash ```bash
git clone git@github.com:youzan/vant.git git clone git@github.com:vant-ui/vant.git
# Install dependencies # Install dependencies
pnpm i pnpm i

View File

@ -9,8 +9,8 @@ body:
在提交 Bug 报告前,请注意: 在提交 Bug 报告前,请注意:
- 确认你的问题无法通过官方文档得到解决。 - 确认你的问题无法通过官方文档得到解决。
- 确认你搜索过 [历史 issue](https://github.com/youzan/vant/issues),并且没有发现同样的问题。 - 确认你搜索过 [历史 issue](https://github.com/vant-ui/vant/issues),并且没有发现同样的问题。
- 如果不是反馈 Bug请到 [Discussions 讨论区](https://github.com/youzan/vant/discussions) 发帖。 - 如果不是反馈 Bug请到 [Discussions 讨论区](https://github.com/vant-ui/vant/discussions) 发帖。
- type: input - type: input
id: reproduce id: reproduce

View File

@ -9,8 +9,8 @@ body:
在提交 Bug 报告前,请注意: 在提交 Bug 报告前,请注意:
- 确认你的问题无法通过官方文档得到解决。 - 确认你的问题无法通过官方文档得到解决。
- 确认你搜索过 [历史 issue](https://github.com/youzan/vant/issues),并且没有发现同样的问题。 - 确认你搜索过 [历史 issue](https://github.com/vant-ui/vant/issues),并且没有发现同样的问题。
- 如果不是反馈 Bug请到 [Discussions 讨论区](https://github.com/youzan/vant/discussions) 发帖。 - 如果不是反馈 Bug请到 [Discussions 讨论区](https://github.com/vant-ui/vant/discussions) 发帖。
- type: input - type: input
id: reproduce id: reproduce

View File

@ -9,8 +9,8 @@ body:
在提交功能需求前,请注意: 在提交功能需求前,请注意:
- 确认这是一个通用功能,并且无法通过现有的 API 或 Slot 实现。 - 确认这是一个通用功能,并且无法通过现有的 API 或 Slot 实现。
- 确认你搜索过 [历史 issue](https://github.com/youzan/vant/issues),并且没有发现同样的需求。 - 确认你搜索过 [历史 issue](https://github.com/vant-ui/vant/issues),并且没有发现同样的需求。
- 可以先到 [Discussions 讨论区](https://github.com/youzan/vant/discussions) 发帖,讨论一下需求是否合理。 - 可以先到 [Discussions 讨论区](https://github.com/vant-ui/vant/discussions) 发帖,讨论一下需求是否合理。
- type: textarea - type: textarea
id: description id: description

View File

@ -9,8 +9,8 @@ body:
在提交功能需求前,请注意: 在提交功能需求前,请注意:
- 确认这是一个通用功能,并且无法通过现有的 API 实现。 - 确认这是一个通用功能,并且无法通过现有的 API 实现。
- 确认你搜索过 [历史 issue](https://github.com/youzan/vant/issues),并且没有发现同样的需求。 - 确认你搜索过 [历史 issue](https://github.com/vant-ui/vant/issues),并且没有发现同样的需求。
- 可以先到 [Discussions 讨论区](https://github.com/youzan/vant/discussions) 发帖,讨论一下需求是否合理。 - 可以先到 [Discussions 讨论区](https://github.com/vant-ui/vant/discussions) 发帖,讨论一下需求是否合理。
- type: textarea - type: textarea
id: description id: description

View File

@ -1,6 +1,6 @@
### Before submitting a pull request, please make sure the following is done: ### Before submitting a pull request, please make sure the following is done:
1. Read the [contributing guide](https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.md). 1. Read the [contributing guide](https://github.com/vant-ui/vant/blob/dev/.github/CONTRIBUTING.md).
2. If you've added code that should be tested, add tests. 2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation. 3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes (`npm test`). 4. Ensure the test suite passes (`npm test`).

View File

@ -15,6 +15,6 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with: with:
# GitHub 源仓库地址 # GitHub 源仓库地址
source-repo: git@github.com:youzan/vant.git source-repo: git@github.com:vant-ui/vant.git
# Gitee 目标仓库地址 # Gitee 目标仓库地址
destination-repo: git@gitee.com:vant-contrib/vant.git destination-repo: git@gitee.com:vant-contrib/vant.git

View File

@ -1,3 +0,0 @@
{
"extends": ["@vant/stylelint-config"]
}

View File

@ -8,8 +8,8 @@
<p align="center"> <p align="center">
<img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" /> <img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="CI Status" /> <img src="https://img.shields.io/github/workflow/status/vant-ui/vant/CI/dev?style=flat-square" alt="CI Status" />
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" /> <img src="https://img.shields.io/codecov/c/github/vant-ui/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" /> <img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />
<img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits"> <img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits">
<img src="https://img.badgesize.io/https://unpkg.com/vant@3/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" /> <img src="https://img.badgesize.io/https://unpkg.com/vant@3/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" />
@ -86,11 +86,11 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
| Project | Description | | Project | Description |
| --- | --- | | --- | --- |
| [vant-weapp](https://github.com/youzan/vant-weapp) | WeChat MiniProgram UI | | [vant-weapp](https://github.com/vant-ui/vant-weapp) | WeChat MiniProgram UI |
| [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos | | [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos |
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | Scaffold for UI library | | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant icons | | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant icons |
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers | | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
## Community Ecosystem ## Community Ecosystem
@ -128,7 +128,7 @@ Core contributors of Vant and Vant Weapp:
Thanks to the following friends for their contributions to Vant: Thanks to the following friends for their contributions to Vant:
<a href="https://github.com/youzan/vant/graphs/contributors"> <a href="https://github.com/vant-ui/vant/graphs/contributors">
<img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors"> <img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors">
</a> </a>

View File

@ -8,8 +8,8 @@
<p align="center"> <p align="center">
<img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" /> <img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="CI Status" /> <img src="https://img.shields.io/github/workflow/status/vant-ui/vant/CI/dev?style=flat-square" alt="CI Status" />
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" /> <img src="https://img.shields.io/codecov/c/github/vant-ui/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" /> <img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />
<img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits"> <img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits">
<img src="https://img.badgesize.io/https://unpkg.com/vant@3/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" /> <img src="https://img.badgesize.io/https://unpkg.com/vant@3/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" />
@ -92,11 +92,11 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
| 项目 | 描述 | | 项目 | 描述 |
| --- | --- | | --- | --- |
| [vant-weapp](https://github.com/youzan/vant-weapp) | Vant 微信小程序版 | | [vant-weapp](https://github.com/vant-ui/vant-weapp) | Vant 微信小程序版 |
| [vant-demo](https://github.com/vant-ui/vant-demo) | Vant 官方示例合集 | | [vant-demo](https://github.com/vant-ui/vant-demo) | Vant 官方示例合集 |
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 | | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 |
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant 图标库 | | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant 图标库 |
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 | | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 |
## 社区生态 ## 社区生态
@ -136,7 +136,7 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
感谢以下小伙伴们为 Vant 发展做出的贡献: 感谢以下小伙伴们为 Vant 发展做出的贡献:
<a href="https://github.com/youzan/vant/graphs/contributors"> <a href="https://github.com/vant-ui/vant/graphs/contributors">
<img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors"> <img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors">
</a> </a>
@ -144,7 +144,7 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
修改代码请阅读我们的 [贡献指南](https://vant-contrib.gitee.io/vant/#/zh-CN/contribution)。 修改代码请阅读我们的 [贡献指南](https://vant-contrib.gitee.io/vant/#/zh-CN/contribution)。
使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。 使用过程中发现任何问题都可以提 [Issue](https://github.com/vant-ui/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/vant-ui/vant/pulls)。
## 开源协议 ## 开源协议

View File

@ -12,20 +12,17 @@
"nano-staged": { "nano-staged": {
"*.md": "prettier --write", "*.md": "prettier --write",
"*.{ts,tsx,js,vue,less}": "prettier --write", "*.{ts,tsx,js,vue,less}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix", "*.{ts,tsx,js,vue}": "eslint --fix"
"*.{vue,css,less}": "stylelint --fix"
}, },
"packageManager": "pnpm@7.1.6", "packageManager": "pnpm@7.1.6",
"devDependencies": { "devDependencies": {
"@vant/cli": "workspace:*", "@vant/cli": "workspace:*",
"@vant/eslint-config": "workspace:*", "@vant/eslint-config": "workspace:*",
"@vant/stylelint-config": "workspace:*",
"eslint": "^8.2.0", "eslint": "^8.2.0",
"husky": "^8.0.1", "husky": "^8.0.1",
"nano-staged": "^0.8.0", "nano-staged": "^0.8.0",
"prettier": "^2.5.0", "prettier": "^2.5.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2"
"stylelint": "^13.13.1"
}, },
"pnpm": { "pnpm": {
"peerDependencyRules": { "peerDependencyRules": {

View File

@ -25,8 +25,7 @@
} }
}, },
"nano-staged": { "nano-staged": {
"*.{ts,tsx,js,jsx,vue}": "eslint --fix", "*.{ts,tsx,js,jsx,vue}": "eslint --fix"
"*.{vue,css,less,scss}": "stylelint --fix"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "^2.6.11", "vue": "^2.6.11",
@ -43,11 +42,6 @@
"@vant" "@vant"
] ]
}, },
"stylelint": {
"extends": [
"@vant/stylelint-config"
]
},
"prettier": { "prettier": {
"singleQuote": true "singleQuote": true
}, },

View File

@ -25,8 +25,7 @@
"nano-staged": { "nano-staged": {
"*.md": "prettier --write", "*.md": "prettier --write",
"*.{ts,tsx,js,vue,less,scss}": "prettier --write", "*.{ts,tsx,js,vue,less,scss}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix", "*.{ts,tsx,js,vue}": "eslint --fix"
"*.{vue,css,less,scss}": "stylelint --fix"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "^3.0.0" "vue": "^3.0.0"
@ -42,11 +41,6 @@
"@vant" "@vant"
] ]
}, },
"stylelint": {
"extends": [
"@vant/stylelint-config"
]
},
"prettier": { "prettier": {
"singleQuote": true "singleQuote": true
}, },

View File

@ -24,10 +24,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/create-vant-cli-app" "directory": "packages/create-vant-cli-app"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@ -29,10 +29,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-area-data" "directory": "packages/vant-area-data"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@ -10,7 +10,7 @@ Vant CLI is a tool for building vue component library. You can quickly build a f
- Provides rich commands covering the complete process from development to deploy - Provides rich commands covering the complete process from development to deploy
- Based on conventional directory structure. Generate elegant document website and component examples automatically. - Based on conventional directory structure. Generate elegant document website and component examples automatically.
- ESlint Stylelint built-in. - ESlint built-in.
- Support Tree Shaking/Theme Customization/Import on Demand - Support Tree Shaking/Theme Customization/Import on Demand
### Quickstart ### Quickstart
@ -50,16 +50,12 @@ Please add the followed config to `package.json` file.
"nano-staged": { "nano-staged": {
"*.md": "prettier --write", "*.md": "prettier --write",
"*.{ts,tsx,js,vue,less,scss}": "prettier --write", "*.{ts,tsx,js,vue,less,scss}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix", "*.{ts,tsx,js,vue}": "eslint --fix"
"*.{vue,css,less,scss}": "stylelint --fix"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
"extends": ["@vant"] "extends": ["@vant"]
}, },
"stylelint": {
"extends": ["@vant/stylelint-config"]
},
"prettier": { "prettier": {
"singleQuote": true "singleQuote": true
}, },
@ -69,7 +65,7 @@ Please add the followed config to `package.json` file.
## More Details ## More Details
- [cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/commands.md) - [cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/commands.md)
- [config](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/config.md) - [config](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/config.md)
- [directory structure](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.md) - [directory structure](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/directory.md)
- [CHANGELOG](https://github.com/youzan/vant/tree/dev/packages/vant-cli/changelog.md) - [CHANGELOG](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/changelog.md)

View File

@ -6,7 +6,7 @@ Vant CLI 是一个 Vue 组件库构建工具,通过 Vant CLI 可以快速搭
- 提供丰富的命令,涵盖从开发测试到构建发布的完整流程 - 提供丰富的命令,涵盖从开发测试到构建发布的完整流程
- 基于约定的目录结构,自动生成优雅的文档站点和组件示例 - 基于约定的目录结构,自动生成优雅的文档站点和组件示例
- 内置 ESLint、Stylelint 校验规则,提交代码时自动执行校验 - 内置 ESLint 校验规则,提交代码时自动执行校验
- 构建后的组件库默认支持按需引入、主题定制、Tree Shaking - 构建后的组件库默认支持按需引入、主题定制、Tree Shaking
### 快速上手 ### 快速上手
@ -46,16 +46,12 @@ pnpm add @vant/cli -D
"nano-staged": { "nano-staged": {
"*.md": "prettier --write", "*.md": "prettier --write",
"*.{ts,tsx,js,vue,less,scss}": "prettier --write", "*.{ts,tsx,js,vue,less,scss}": "prettier --write",
"*.{ts,tsx,js,vue}": "eslint --fix", "*.{ts,tsx,js,vue}": "eslint --fix"
"*.{vue,css,less,scss}": "stylelint --fix"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
"extends": ["@vant"] "extends": ["@vant"]
}, },
"stylelint": {
"extends": ["@vant/stylelint-config"]
},
"prettier": { "prettier": {
"singleQuote": true "singleQuote": true
}, },
@ -65,7 +61,7 @@ pnpm add @vant/cli -D
## 详细文档 ## 详细文档
- [命令](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/commands.zh-CN.md) - [命令](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/commands.zh-CN.md)
- [配置指南](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/config.zh-CN.md) - [配置指南](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/config.zh-CN.md)
- [目录结构](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.zh-CN.md) - [目录结构](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/directory.zh-CN.md)
- [更新日志](https://github.com/youzan/vant/tree/dev/packages/vant-cli/changelog.md) - [更新日志](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/changelog.md)

View File

@ -2,8 +2,28 @@
## v5.0.0 (未发布) ## v5.0.0 (未发布)
- 升级 `vite` 3.0.0 ### 依赖升级
- 不再默认安装 `gh-pages` 依赖,请将 `package.json` 中的 `gh-pages -d site-dist` 替换为 `npx gh-pages -d site-dist`
对以下依赖进行了大版本升级:
- vite v3
- @vitejs/plugin-vue v3
- @vitejs/plugin-vue-jsx v2
### 依赖精简
- 不再默认安装 `gh-pages` 依赖,请按照如下方式更新 `package.json`
```diff
- "release:site": "pnpm build:site && gh-pages -d site-dist",
+ "release:site": "pnpm build:site && npx gh-pages -d site-dist",
```
- 不再默认内置 `stylelint`,需要的话可以自行安装:
```bash
yarn add stylelint@13 @vant/stylelint-config
```
## v4.0.3 ## v4.0.3
@ -411,15 +431,15 @@ yarn add sass
`2020-03-29` `2020-03-29`
- 优化网站导航栏在大屏上的适配 ([#5928](https://github.com/youzan/vant/pull/5928)) - 优化网站导航栏在大屏上的适配 ([#5928](https://github.com/vant-ui/vant/pull/5928))
### v2.3.0 ### v2.3.0
`2020-03-25` `2020-03-25`
- build 命令支持编译 scoped 样式 ([#5910](https://github.com/youzan/vant/pull/5910)) - build 命令支持编译 scoped 样式 ([#5910](https://github.com/vant-ui/vant/pull/5910))
- build 命令支持生成 WebStorm 组件定义文件 ([#5899](https://github.com/youzan/vant/issues/5899)) - build 命令支持生成 WebStorm 组件定义文件 ([#5899](https://github.com/vant-ui/vant/issues/5899))
- clean 命令现在会移除而不是清空文件夹 ([#5895](https://github.com/youzan/vant/issues/5895)) - clean 命令现在会移除而不是清空文件夹 ([#5895](https://github.com/vant-ui/vant/issues/5895))
- 升级 @vant/markdown-vetur 2.0.0 - 升级 @vant/markdown-vetur 2.0.0
### v2.2.8 ### v2.2.8
@ -453,7 +473,7 @@ yarn add sass
`2020-02-14` `2020-02-14`
- 修复在 windows 上构建出的样式入口文件路径错误的问题 ([#5655](https://github.com/youzan/vant/pull/5655) - 修复在 windows 上构建出的样式入口文件路径错误的问题 ([#5655](https://github.com/vant-ui/vant/pull/5655)
### v2.2.3 ### v2.2.3
@ -465,14 +485,14 @@ yarn add sass
`2020-02-05` `2020-02-05`
- 修复在 windows 上获取 markdown 路径错误的问题 ([#5626](https://github.com/youzan/vant/pull/5626)) - 修复在 windows 上获取 markdown 路径错误的问题 ([#5626](https://github.com/vant-ui/vant/pull/5626))
### v2.2.1 ### v2.2.1
`2020-02-04` `2020-02-04`
- 升级 babel@7.8 - 升级 babel@7.8
- 修复切换版本时跳转 undefined 的问题 ([#5620](https://github.com/youzan/vant/pull/5620)) - 修复切换版本时跳转 undefined 的问题 ([#5620](https://github.com/vant-ui/vant/pull/5620))
### v2.2.0 ### v2.2.0

View File

@ -29,7 +29,7 @@ Start local dev server for browsering components and demo.
Build Vue component library. Build Vue component library.
Files will be output to `es` and `lib` directory. More details [directory structure](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.md) Files will be output to `es` and `lib` directory. More details [directory structure](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/directory.md)
Please add the followed config to `package.json` when publish to npm. Please add the followed config to `package.json` when publish to npm.

View File

@ -31,7 +31,7 @@ npx vant-cli dev
构建组件库。 构建组件库。
运行 build 命令会在 `es``lib` 目录下生成可用于生产环境的组件代码,详见 [目录结构](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.zh-CN.md)。 运行 build 命令会在 `es``lib` 目录下生成可用于生产环境的组件代码,详见 [目录结构](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli/docs/directory.zh-CN.md)。
发布 npm 时,请将以下配置加入到 `package.json` 中,使 npm 包能被正确识别: 发布 npm 时,请将以下配置加入到 `package.json` 中,使 npm 包能被正确识别:

View File

@ -32,10 +32,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-cli" "directory": "packages/vant-cli"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
@ -55,7 +55,6 @@
"@types/jest": "^27.0.3", "@types/jest": "^27.0.3",
"@vant/eslint-config": "^3.3.2", "@vant/eslint-config": "^3.3.2",
"@vant/markdown-vetur": "^2.3.0", "@vant/markdown-vetur": "^2.3.0",
"@vant/stylelint-config": "^1.4.2",
"@vant/touch-emulator": "^1.3.2", "@vant/touch-emulator": "^1.3.2",
"@vitejs/plugin-vue": "^3.0.1", "@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue-jsx": "^2.0.0", "@vitejs/plugin-vue-jsx": "^2.0.0",
@ -85,7 +84,6 @@
"postcss-load-config": "^3.1.0", "postcss-load-config": "^3.1.0",
"prettier": "^2.5.0", "prettier": "^2.5.0",
"release-it": "^15.1.1", "release-it": "^15.1.1",
"stylelint": "^13.0.0",
"transliteration": "^2.2.0", "transliteration": "^2.2.0",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"vite": "^3.0.0", "vite": "^3.0.0",

View File

@ -16,7 +16,7 @@ program
program program
.command('lint') .command('lint')
.description('Run eslint and stylelint') .description('Run ESLint')
.action(async () => { .action(async () => {
const { lint } = await import('./commands/lint.js'); const { lint } = await import('./commands/lint.js');
return lint(); return lint();

View File

@ -44,23 +44,10 @@ function eslint() {
); );
} }
function stylelint() {
return runCommand(
'stylelint',
['src/**/*.css', 'src/**/*.vue', 'src/**/*.less', 'src/**/*.sass', '--fix'],
{
start: 'Running stylelint...',
succeed: 'Stylelint Passed.',
failed: 'Stylelint failed!',
}
);
}
export async function lint() { export async function lint() {
const eslintPassed = await eslint(); const eslintPassed = await eslint();
const stylelintPassed = await stylelint();
if (!eslintPassed || !stylelintPassed) { if (!eslintPassed) {
process.exit(1); process.exit(1);
} }
} }

View File

@ -206,7 +206,7 @@ export function getViteConfigForSiteProd(): InlineConfig {
outDir, outDir,
reportCompressedSize: false, reportCompressedSize: false,
emptyOutDir: true, emptyOutDir: true,
// https://github.com/youzan/vant/issues/9703 // https://github.com/vant-ui/vant/issues/9703
cssTarget: ['chrome53'], cssTarget: ['chrome53'],
rollupOptions: { rollupOptions: {
input: { input: {

View File

@ -29,10 +29,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-compat" "directory": "packages/vant-compat"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@ -13,10 +13,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-eslint-config" "directory": "packages/vant-eslint-config"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -16,10 +16,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-icons" "directory": "packages/vant-icons"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,3 @@
/* stylelint-disable selector-pseudo-element-colon-notation */
/* stylelint-disable font-family-no-missing-generic-family-keyword */
.van-icon { .van-icon {
position: relative; position: relative;
display: inline-block; display: inline-block;

View File

@ -1,7 +1,5 @@
@import './common.less'; @import './common.less';
/* stylelint-disable selector-pseudo-element-colon-notation */
/* stylelint-disable font-family-no-missing-generic-family-keyword */
@font-face { @font-face {
font-weight: normal; font-weight: normal;
font-family: 'vant-icon'; font-family: 'vant-icon';

View File

@ -18,10 +18,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-markdown-vetur" "directory": "packages/vant-markdown-vetur"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "zhangshuai", "author": "zhangshuai",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -21,4 +21,4 @@ see: https://popper.js.org/
## Refer ## Refer
issue: https://github.com/youzan/vant/issues/7626 issue: https://github.com/vant-ui/vant/issues/7626

View File

@ -30,10 +30,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-popperjs" "directory": "packages/vant-popperjs"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -1,10 +0,0 @@
MIT License
Copyright (c) Youzan
Copyright (c) Chen Jiahan and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,22 +0,0 @@
# Stylelint Config of Vant
## Install
```shell
# with npm
npm i @vant/stylelint-config -D
# with yarn
yarn add @vant/stylelint-config -D
# with pnpm
pnpm add @vant/stylelint-config -D
```
## Usage
```js
{
"extends": ["@vant/stylelint-config"]
}
```

View File

@ -1,18 +0,0 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
rules: {
'no-descending-specificity': null,
'selector-pseudo-element-no-unknown': [
true,
{
ignorePseudoElements: ['v-deep'],
},
],
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep'],
},
],
},
};

View File

@ -1,25 +0,0 @@
{
"name": "@vant/stylelint-config",
"version": "1.4.2",
"description": "stylelint config of vant.",
"main": "index.js",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/youzan/vant.git",
"directory": "packages/vant-stylelint-config"
},
"bugs": "https://github.com/youzan/vant/issues",
"author": "chenjiahan",
"license": "MIT",
"dependencies": {
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-standard": "^22.0.0"
},
"devDependencies": {
"stylelint": "^13.0.0"
}
}

View File

@ -10,7 +10,7 @@
`2021-05-26` `2021-05-26`
- add SSR support [\#8767](https://github.com/youzan/vant/pull/8767) - add SSR support [\#8767](https://github.com/vant-ui/vant/pull/8767)
### [v1.2.0] ### [v1.2.0]

View File

@ -8,10 +8,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-touch-emulator" "directory": "packages/vant-touch-emulator"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT" "license": "MIT"
} }

View File

@ -30,10 +30,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant-use" "directory": "packages/vant-use"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@ -107,7 +107,7 @@ export function useCountDown(options: UseCountDownOptions) {
const tick = () => { const tick = () => {
// should not start counting in server // should not start counting in server
// see: https://github.com/youzan/vant/issues/7807 // see: https://github.com/vant-ui/vant/issues/7807
if (!inBrowser) { if (!inBrowser) {
return; return;
} }

View File

@ -15,7 +15,7 @@ function isElement(node: Element) {
); );
} }
// https://github.com/youzan/vant/issues/3823 // https://github.com/vant-ui/vant/issues/3823
export function getScrollParent( export function getScrollParent(
el: Element, el: Element,
root: ScrollElement | undefined = defaultRoot root: ScrollElement | undefined = defaultRoot

View File

@ -132,7 +132,7 @@ module.exports = {
### Adapt to PC Browsers ### Adapt to PC Browsers
Vant is a mobile-first component library, if you want to use Vant in PC browsers, you can use the [@vant/touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) module. This module will automatically convert the mouse events of the PC browser into the touch events of the mobile browser. Vant is a mobile-first component library, if you want to use Vant in PC browsers, you can use the [@vant/touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) module. This module will automatically convert the mouse events of the PC browser into the touch events of the mobile browser.
```bash ```bash
# Install # Install

View File

@ -195,7 +195,7 @@ module.exports = {
Vant 是一个面向移动端的组件库,因此默认只适配了移动端设备,这意味着组件只监听了移动端的 `touch` 事件,没有监听桌面端的 `mouse` 事件。 Vant 是一个面向移动端的组件库,因此默认只适配了移动端设备,这意味着组件只监听了移动端的 `touch` 事件,没有监听桌面端的 `mouse` 事件。
如果你需要在桌面端使用 Vant可以引入我们提供的 [@vant/touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator),这个库会在桌面端自动将 `mouse` 事件转换成对应的 `touch` 事件,使得组件能够在桌面端使用。 如果你需要在桌面端使用 Vant可以引入我们提供的 [@vant/touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator),这个库会在桌面端自动将 `mouse` 事件转换成对应的 `touch` 事件,使得组件能够在桌面端使用。
```bash ```bash
# 安装模块 # 安装模块

View File

@ -19,82 +19,82 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
## Details ## Details
### [v4.0.0-beta.0](https://github.com/youzan/vant/compare/v3.5.2...v4.0.0-beta.0) ### [v4.0.0-beta.0](https://github.com/vant-ui/vant/compare/v3.5.2...v4.0.0-beta.0)
`2022-07-16` `2022-07-16`
**Breaking Changes** **Breaking Changes**
- Toast: redesign function-call API [#10804](https://github.com/youzan/vant/issues/10804) - Toast: redesign function-call API [#10804](https://github.com/vant-ui/vant/issues/10804)
- Dialog: redesign function-call API [#10781](https://github.com/youzan/vant/issues/10781) - Dialog: redesign function-call API [#10781](https://github.com/vant-ui/vant/issues/10781)
- Notify: redesign function-call API [#10782](https://github.com/youzan/vant/issues/10782) - Notify: redesign function-call API [#10782](https://github.com/vant-ui/vant/issues/10782)
- ImagePreview: redesign function-call API [#10802](https://github.com/youzan/vant/issues/10802) - ImagePreview: redesign function-call API [#10802](https://github.com/vant-ui/vant/issues/10802)
**Feature** **Feature**
- add @vant/compat package [#10806](https://github.com/youzan/vant/issues/10806) - add @vant/compat package [#10806](https://github.com/vant-ui/vant/issues/10806)
- Calendar: expose getSelectedDate method [419a8e](https://github.com/youzan/vant/commit/419a8e4f0e6454b9aac30d5800318deabec099cb) - Calendar: expose getSelectedDate method [419a8e](https://github.com/vant-ui/vant/commit/419a8e4f0e6454b9aac30d5800318deabec099cb)
- remove less source file to remove bundle size [#10752](https://github.com/youzan/vant/issues/10752) - remove less source file to remove bundle size [#10752](https://github.com/vant-ui/vant/issues/10752)
**Bug Fixes** **Bug Fixes**
- Uploader: should not preview failed images [#10790](https://github.com/youzan/vant/issues/10790) - Uploader: should not preview failed images [#10790](https://github.com/vant-ui/vant/issues/10790)
### [v4.0.0-alpha.4](https://github.com/youzan/vant/compare/v3.5.0-beta.0...v4.0.0-alpha.4) ### [v4.0.0-alpha.4](https://github.com/vant-ui/vant/compare/v3.5.0-beta.0...v4.0.0-alpha.4)
`2022-05-31` `2022-05-31`
**Feature** **Feature**
- using mjs extension for esmodule [#10625](https://github.com/youzan/vant/issues/10625) - using mjs extension for esmodule [#10625](https://github.com/vant-ui/vant/issues/10625)
### [v4.0.0-alpha.3](https://github.com/youzan/vant/compare/v3.4.9...v4.0.0-alpha.3) ### [v4.0.0-alpha.3](https://github.com/vant-ui/vant/compare/v3.4.9...v4.0.0-alpha.3)
`2022-05-02` `2022-05-02`
**Feature** **Feature**
- Form: support setting multiple validate-trigger [#10544](https://github.com/youzan/vant/issues/10544) - Form: support setting multiple validate-trigger [#10544](https://github.com/vant-ui/vant/issues/10544)
- Empty: localize all images [#10514](https://github.com/youzan/vant/issues/10514) [#10515](https://github.com/youzan/vant/issues/10515) [#10516](https://github.com/youzan/vant/issues/10516) - Empty: localize all images [#10514](https://github.com/vant-ui/vant/issues/10514) [#10515](https://github.com/vant-ui/vant/issues/10515) [#10516](https://github.com/vant-ui/vant/issues/10516)
- Loading: add aria to improve a11y [#10568](https://github.com/youzan/vant/issues/10568) - Loading: add aria to improve a11y [#10568](https://github.com/vant-ui/vant/issues/10568)
**Bug Fixes** **Bug Fixes**
- Search: style error in dark mode [#10527](https://github.com/youzan/vant/issues/10527) - Search: style error in dark mode [#10527](https://github.com/vant-ui/vant/issues/10527)
- @vant/area-data: only publish dist folder to npm [f927f6](https://github.com/youzan/vant/commit/f927f6a7518cf7d08ec8abc5dd35019685c19e3a) - @vant/area-data: only publish dist folder to npm [f927f6](https://github.com/vant-ui/vant/commit/f927f6a7518cf7d08ec8abc5dd35019685c19e3a)
### [v4.0.0-alpha.2](https://github.com/youzan/vant/compare/v3.4.8...v4.0.0-alpha.2) ### [v4.0.0-alpha.2](https://github.com/vant-ui/vant/compare/v3.4.8...v4.0.0-alpha.2)
`2022-04-16` `2022-04-16`
- CalendarDay: add default margin-bottom [#10441](https://github.com/youzan/vant/issues/10441) - CalendarDay: add default margin-bottom [#10441](https://github.com/vant-ui/vant/issues/10441)
- Empty: support set the image size separately [#10465](https://github.com/youzan/vant/issues/10465) - Empty: support set the image size separately [#10465](https://github.com/vant-ui/vant/issues/10465)
- Field: add enterkeyhint prop [#10478](https://github.com/youzan/vant/issues/10478) - Field: add enterkeyhint prop [#10478](https://github.com/vant-ui/vant/issues/10478)
- Form: add getValues method [#10511](https://github.com/youzan/vant/issues/10511) - Form: add getValues method [#10511](https://github.com/vant-ui/vant/issues/10511)
- Icon: add some icons for ShareSheet [#10468](https://github.com/youzan/vant/issues/10468) - Icon: add some icons for ShareSheet [#10468](https://github.com/vant-ui/vant/issues/10468)
- Locale: add Danish lang [#10513](https://github.com/youzan/vant/issues/10513) - Locale: add Danish lang [#10513](https://github.com/vant-ui/vant/issues/10513)
- ShareSheet: no longer rely on CDN images [#10469](https://github.com/youzan/vant/issues/10469) - ShareSheet: no longer rely on CDN images [#10469](https://github.com/vant-ui/vant/issues/10469)
- Add event arguments in web-types.json [#10474](https://github.com/youzan/vant/issues/10474) - Add event arguments in web-types.json [#10474](https://github.com/vant-ui/vant/issues/10474)
**Bug Fixes** **Bug Fixes**
- DatetimePicker: modeValue is inconsistent with the selected data [#10448](https://github.com/youzan/vant/issues/10448) - DatetimePicker: modeValue is inconsistent with the selected data [#10448](https://github.com/vant-ui/vant/issues/10448)
- Rate: support precisely selected [#10500](https://github.com/youzan/vant/issues/10500) - Rate: support precisely selected [#10500](https://github.com/vant-ui/vant/issues/10500)
### [v4.0.0-alpha.1](https://github.com/youzan/vant/compare/v3.4.6...v4.0.0-alpha.1) ### [v4.0.0-alpha.1](https://github.com/vant-ui/vant/compare/v3.4.6...v4.0.0-alpha.1)
`2022-03-19` `2022-03-19`
**Feature** **Feature**
- @vant/area-data: update counties of NanJing [#10410](https://github.com/youzan/vant/issues/10410) - @vant/area-data: update counties of NanJing [#10410](https://github.com/vant-ui/vant/issues/10410)
- Locale: add la-LA.ts [#10388](https://github.com/youzan/vant/issues/10388) - Locale: add la-LA.ts [#10388](https://github.com/vant-ui/vant/issues/10388)
**Bug Fixes** **Bug Fixes**
- Calendar: fix title color in dark mode [#10403](https://github.com/youzan/vant/issues/10403) - Calendar: fix title color in dark mode [#10403](https://github.com/vant-ui/vant/issues/10403)
- Picker: fix title color in dark mode [#10403](https://github.com/youzan/vant/issues/10403) - Picker: fix title color in dark mode [#10403](https://github.com/vant-ui/vant/issues/10403)
- ConfigProvider: dark mode not work as default value [#10413](https://github.com/youzan/vant/issues/10413) - ConfigProvider: dark mode not work as default value [#10413](https://github.com/vant-ui/vant/issues/10413)
- DatePicker: failed to update model value [#10415](https://github.com/youzan/vant/issues/10415) - DatePicker: failed to update model value [#10415](https://github.com/vant-ui/vant/issues/10415)
- Dialog: fix title and message color in dark mode [#10379](https://github.com/youzan/vant/issues/10379) - Dialog: fix title and message color in dark mode [#10379](https://github.com/vant-ui/vant/issues/10379)
- IndexBar: allow active bottom anchor [#10404](https://github.com/youzan/vant/issues/10404) - IndexBar: allow active bottom anchor [#10404](https://github.com/vant-ui/vant/issues/10404)

View File

@ -19,89 +19,89 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
## 更新内容 ## 更新内容
### [v4.0.0-beta.0](https://github.com/youzan/vant/compare/v3.5.2...v4.0.0-beta.0) ### [v4.0.0-beta.0](https://github.com/vant-ui/vant/compare/v3.5.2...v4.0.0-beta.0)
`2022-07-16` `2022-07-16`
**Breaking Changes** **Breaking Changes**
- Toast: 重新设计函数调用 API [#10804](https://github.com/youzan/vant/issues/10804) - Toast: 重新设计函数调用 API [#10804](https://github.com/vant-ui/vant/issues/10804)
- Dialog: 重新设计函数调用 API [#10781](https://github.com/youzan/vant/issues/10781) - Dialog: 重新设计函数调用 API [#10781](https://github.com/vant-ui/vant/issues/10781)
- Notify: 重新设计函数调用 API[#10782](https://github.com/youzan/vant/issues/10782) - Notify: 重新设计函数调用 API[#10782](https://github.com/vant-ui/vant/issues/10782)
- ImagePreview: 重新设计函数调用 API [#10802](https://github.com/youzan/vant/issues/10802) - ImagePreview: 重新设计函数调用 API [#10802](https://github.com/vant-ui/vant/issues/10802)
关于以上改动的详细描述和迁移方法,请参考 [从 v3 升级到 v4](/vant/v4/#/zh-CN/migrate-from-v3) 的 「API 调整」部分。 关于以上改动的详细描述和迁移方法,请参考 [从 v3 升级到 v4](/vant/v4/#/zh-CN/migrate-from-v3) 的 「API 调整」部分。
**Feature** **Feature**
- 新增 @vant/compat 包,用于辅助代码迁移 [#10806](https://github.com/youzan/vant/issues/10806) - 新增 @vant/compat 包,用于辅助代码迁移 [#10806](https://github.com/vant-ui/vant/issues/10806)
- Calendar: 新增 getSelectedDate 方法 [419a8e](https://github.com/youzan/vant/commit/419a8e4f0e6454b9aac30d5800318deabec099cb) - Calendar: 新增 getSelectedDate 方法 [419a8e](https://github.com/vant-ui/vant/commit/419a8e4f0e6454b9aac30d5800318deabec099cb)
- 由于主题定制方式调整,发布到 npm 的代码中将不再包含 .less 样式源文件,从而减少 npm 包体积 [#10752](https://github.com/youzan/vant/issues/10752) - 由于主题定制方式调整,发布到 npm 的代码中将不再包含 .less 样式源文件,从而减少 npm 包体积 [#10752](https://github.com/vant-ui/vant/issues/10752)
**Bug Fixes** **Bug Fixes**
- Uploader: 修复预览图片时会展示上传失败的图片的问题 [#10790](https://github.com/youzan/vant/issues/10790) - Uploader: 修复预览图片时会展示上传失败的图片的问题 [#10790](https://github.com/vant-ui/vant/issues/10790)
### [v4.0.0-alpha.4](https://github.com/youzan/vant/compare/v3.5.0-beta.0...v4.0.0-alpha.4) ### [v4.0.0-alpha.4](https://github.com/vant-ui/vant/compare/v3.5.0-beta.0...v4.0.0-alpha.4)
`2022-05-31` `2022-05-31`
**Feature** **Feature**
- 适配 nuxt 3现在 dist 目录下所有 esmodule 文件将使用 `.mjs` 文件后缀 [#10625](https://github.com/youzan/vant/issues/10625) - 适配 nuxt 3现在 dist 目录下所有 esmodule 文件将使用 `.mjs` 文件后缀 [#10625](https://github.com/vant-ui/vant/issues/10625)
### [v4.0.0-alpha.3](https://github.com/youzan/vant/compare/v3.4.9...v4.0.0-alpha.3) ### [v4.0.0-alpha.3](https://github.com/vant-ui/vant/compare/v3.4.9...v4.0.0-alpha.3)
`2022-05-02` `2022-05-02`
**Feature** **Feature**
- Form: 支持同时设置多个 validate-trigger 值 [#10544](https://github.com/youzan/vant/issues/10544) - Form: 支持同时设置多个 validate-trigger 值 [#10544](https://github.com/vant-ui/vant/issues/10544)
- Empty: 支持在无网络的环境下离线使用,图片从 CDN 调整为内联的 SVG 图片 [#10514](https://github.com/youzan/vant/issues/10514) [#10515](https://github.com/youzan/vant/issues/10515) [#10516](https://github.com/youzan/vant/issues/10516) - Empty: 支持在无网络的环境下离线使用,图片从 CDN 调整为内联的 SVG 图片 [#10514](https://github.com/vant-ui/vant/issues/10514) [#10515](https://github.com/vant-ui/vant/issues/10515) [#10516](https://github.com/vant-ui/vant/issues/10516)
- Loading: 优化无障碍访问 [#10568](https://github.com/youzan/vant/issues/10568) - Loading: 优化无障碍访问 [#10568](https://github.com/vant-ui/vant/issues/10568)
**Bug Fixes** **Bug Fixes**
- Search: 修复暗色模式下样式错误的问题 [#10527](https://github.com/youzan/vant/issues/10527) - Search: 修复暗色模式下样式错误的问题 [#10527](https://github.com/vant-ui/vant/issues/10527)
- @vant/area-data: 修复发布到 npm 时包含 tsconfig.json 文件导致编译错误的问题 [f927f6](https://github.com/youzan/vant/commit/f927f6a7518cf7d08ec8abc5dd35019685c19e3a) - @vant/area-data: 修复发布到 npm 时包含 tsconfig.json 文件导致编译错误的问题 [f927f6](https://github.com/vant-ui/vant/commit/f927f6a7518cf7d08ec8abc5dd35019685c19e3a)
### [v4.0.0-alpha.2](https://github.com/youzan/vant/compare/v3.4.8...v4.0.0-alpha.2) ### [v4.0.0-alpha.2](https://github.com/vant-ui/vant/compare/v3.4.8...v4.0.0-alpha.2)
`2022-04-16` `2022-04-16`
**Feature** **Feature**
- CalendarDay: 增加日期行间距 [#10441](https://github.com/youzan/vant/issues/10441) - CalendarDay: 增加日期行间距 [#10441](https://github.com/vant-ui/vant/issues/10441)
- Empty: 支持单独设置 image 的宽高 [#10465](https://github.com/youzan/vant/issues/10465) - Empty: 支持单独设置 image 的宽高 [#10465](https://github.com/vant-ui/vant/issues/10465)
- Field: 新增 enterkeyhint 属性 [#10478](https://github.com/youzan/vant/issues/10478) - Field: 新增 enterkeyhint 属性 [#10478](https://github.com/vant-ui/vant/issues/10478)
- Form: 新增 getValues 方法 [#10511](https://github.com/youzan/vant/issues/10511) - Form: 新增 getValues 方法 [#10511](https://github.com/vant-ui/vant/issues/10511)
- Icon: 新增 qq、weibo 等图标 [#10468](https://github.com/youzan/vant/issues/10468) - Icon: 新增 qq、weibo 等图标 [#10468](https://github.com/vant-ui/vant/issues/10468)
- Locale: 新增 Danish 丹麦语 [#10513](https://github.com/youzan/vant/issues/10513) - Locale: 新增 Danish 丹麦语 [#10513](https://github.com/vant-ui/vant/issues/10513)
- ShareSheet: 不再依赖 CDN 上的图片资源,使用 iconfont 代替 [#10469](https://github.com/youzan/vant/issues/10469) - ShareSheet: 不再依赖 CDN 上的图片资源,使用 iconfont 代替 [#10469](https://github.com/vant-ui/vant/issues/10469)
- web-types.json 文件增加 event arguments 信息 [#10474](https://github.com/youzan/vant/issues/10474) - web-types.json 文件增加 event arguments 信息 [#10474](https://github.com/vant-ui/vant/issues/10474)
**Bug Fixes** **Bug Fixes**
- DatetimePicker: 修复 modeValue 与选中的数据不一致的问题 [#10448](https://github.com/youzan/vant/issues/10448) - DatetimePicker: 修复 modeValue 与选中的数据不一致的问题 [#10448](https://github.com/vant-ui/vant/issues/10448)
- Rate: 修复多行时滑动选中不正确的问题 [#10500](https://github.com/youzan/vant/issues/10500) - Rate: 修复多行时滑动选中不正确的问题 [#10500](https://github.com/vant-ui/vant/issues/10500)
### [v4.0.0-alpha.1](https://github.com/youzan/vant/compare/v3.4.6...v4.0.0-alpha.1) ### [v4.0.0-alpha.1](https://github.com/vant-ui/vant/compare/v3.4.6...v4.0.0-alpha.1)
`2022-03-19` `2022-03-19`
**Feature** **Feature**
- @vant/area-data: 新增南京市江北新区 [#10410](https://github.com/youzan/vant/issues/10410) - @vant/area-data: 新增南京市江北新区 [#10410](https://github.com/vant-ui/vant/issues/10410)
- Locale: 新增老挝语 [#10388](https://github.com/youzan/vant/issues/10388) - Locale: 新增老挝语 [#10388](https://github.com/vant-ui/vant/issues/10388)
**Bug Fixes** **Bug Fixes**
- Calendar: 修复暗色模式下标题颜色 [#10403](https://github.com/youzan/vant/issues/10403) - Calendar: 修复暗色模式下标题颜色 [#10403](https://github.com/vant-ui/vant/issues/10403)
- Picker: 修复暗色模式下标题颜色 [#10403](https://github.com/youzan/vant/issues/10403) - Picker: 修复暗色模式下标题颜色 [#10403](https://github.com/vant-ui/vant/issues/10403)
- ConfigProvider: 修复默认设置暗色模式不生效的问题 [#10413](https://github.com/youzan/vant/issues/10413) - ConfigProvider: 修复默认设置暗色模式不生效的问题 [#10413](https://github.com/vant-ui/vant/issues/10413)
- DatePicker: 修复更新 v-model 不生效的问题 [#10415](https://github.com/youzan/vant/issues/10415) - DatePicker: 修复更新 v-model 不生效的问题 [#10415](https://github.com/vant-ui/vant/issues/10415)
- Dialog: 修复暗色模式下标题和文本颜色 [#10379](https://github.com/youzan/vant/issues/10379) - Dialog: 修复暗色模式下标题和文本颜色 [#10379](https://github.com/vant-ui/vant/issues/10379)
- IndexBar: 修复底部索引无法高亮的问题 [#10404](https://github.com/youzan/vant/issues/10404) - IndexBar: 修复底部索引无法高亮的问题 [#10404](https://github.com/vant-ui/vant/issues/10404)
### 4.0.0-alpha.0 ### 4.0.0-alpha.0

View File

@ -21,7 +21,7 @@
```bash ```bash
# 克隆仓库 # 克隆仓库
git clone git@github.com:youzan/vant.git git clone git@github.com:vant-ui/vant.git
# 安装依赖 # 安装依赖
pnpm i pnpm i
@ -89,7 +89,7 @@ src
在编写代码时,请注意: 在编写代码时,请注意:
- 确保代码可以通过仓库的 ESLint 和 Stylelint 校验。 - 确保代码可以通过仓库的 ESLint 校验。
- 确保代码格式是规范的,使用 prettier 进行代码格式化。 - 确保代码格式是规范的,使用 prettier 进行代码格式化。
- 确保没有使用超出兼容性范围的 API比如 `async/await` - 确保没有使用超出兼容性范围的 API比如 `async/await`
@ -124,7 +124,7 @@ src
```bash ```bash
# 添加主仓库到 remote作为 fork 后仓库的上游仓库 # 添加主仓库到 remote作为 fork 后仓库的上游仓库
git remote add upstream git@github.com:youzan/vant.git git remote add upstream git@github.com:vant-ui/vant.git
# 拉取主仓库最新代码 # 拉取主仓库最新代码
git fetch upstream git fetch upstream

View File

@ -22,7 +22,7 @@ Contains color specifications, font specifications, and component design specifi
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/tab_202009101415.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)"> <img src="https://fastly.jsdelivr.net/npm/@vant/assets/tab_202009101415.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)">
<a class="design-download" href="https://github.com/youzan/vant/blob/dev/packages/vant/docs/assets/design.sketch?raw=true">Download</a> <a class="design-download" href="https://github.com/vant-ui/vant/blob/dev/packages/vant/docs/assets/design.sketch?raw=true">Download</a>
### Icons (Sketch) ### Icons (Sketch)
@ -30,7 +30,7 @@ Contains icon library resources.
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/design-icons-0321.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)"> <img src="https://fastly.jsdelivr.net/npm/@vant/assets/design-icons-0321.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)">
<a class="design-download" href="https://github.com/youzan/vant/blob/dev/packages/vant-icons/assets/icons.sketch?raw=true">Download</a> <a class="design-download" href="https://github.com/vant-ui/vant/blob/dev/packages/vant-icons/assets/icons.sketch?raw=true">Download</a>
### Axure ### Axure

View File

@ -22,7 +22,7 @@
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/tab_202009101415.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)"> <img src="https://fastly.jsdelivr.net/npm/@vant/assets/tab_202009101415.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)">
<a class="design-download" href="https://github.com/youzan/vant/blob/dev/packages/vant/docs/assets/design.sketch?raw=true">下载</a> <a class="design-download" href="https://github.com/vant-ui/vant/blob/dev/packages/vant/docs/assets/design.sketch?raw=true">下载</a>
### 图标设计稿Sketch ### 图标设计稿Sketch
@ -30,7 +30,7 @@
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/design-icons-0321.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)"> <img src="https://fastly.jsdelivr.net/npm/@vant/assets/design-icons-0321.png" style="width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,.2)">
<a class="design-download" href="https://github.com/youzan/vant/blob/dev/packages/vant-icons/assets/icons.sketch?raw=true">下载</a> <a class="design-download" href="https://github.com/vant-ui/vant/blob/dev/packages/vant-icons/assets/icons.sketch?raw=true">下载</a>
#### 在线资源 #### 在线资源

View File

@ -38,11 +38,11 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
| Project | Description | | Project | Description |
| --- | --- | | --- | --- |
| [vant-weapp](https://github.com/youzan/vant-weapp) | WeChat MiniProgram UI | | [vant-weapp](https://github.com/vant-ui/vant-weapp) | WeChat MiniProgram UI |
| [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos | | [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos |
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | Scaffold for UI library | | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant icons | | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant icons |
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers | | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
### Community Ecosystem ### Community Ecosystem
@ -58,7 +58,7 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
### Other Links ### Other Links
- [Feedback](https://github.com/youzan/vant/issues) - [Feedback](https://github.com/vant-ui/vant/issues)
- [Changelog](#/en-US/changelog) - [Changelog](#/en-US/changelog)
- [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link) - [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
@ -76,13 +76,13 @@ Core contributors of Vant and Vant Weapp:
Thanks to the following friends for their contributions to Vant: Thanks to the following friends for their contributions to Vant:
<a href="https://github.com/youzan/vant/graphs/contributors" target="_black"> <a href="https://github.com/vant-ui/vant/graphs/contributors" target="_black">
<img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors" style="width: 100%; margin: 16px 0"> <img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors" style="width: 100%; margin: 16px 0">
</a> </a>
### Contribution Guide ### Contribution Guide
Please make sure to read the [Contributing Guide](https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.md) before making a pull request. Please make sure to read the [Contributing Guide](https://github.com/vant-ui/vant/blob/dev/.github/CONTRIBUTING.md) before making a pull request.
### LICENSE ### LICENSE

View File

@ -50,11 +50,11 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
| 项目 | 描述 | | 项目 | 描述 |
| --- | --- | | --- | --- |
| [vant-weapp](https://github.com/youzan/vant-weapp) | Vant 微信小程序版 | | [vant-weapp](https://github.com/vant-ui/vant-weapp) | Vant 微信小程序版 |
| [vant-demo](https://github.com/vant-ui/vant-demo) | Vant 官方示例合集 | | [vant-demo](https://github.com/vant-ui/vant-demo) | Vant 官方示例合集 |
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 | | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 |
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant 图标库 | | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant 图标库 |
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 | | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 |
### 社区生态 ### 社区生态
@ -72,7 +72,7 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
### 其他链接 ### 其他链接
- [意见反馈](https://github.com/youzan/vant/issues) - [意见反馈](https://github.com/vant-ui/vant/issues)
- [更新日志](#/zh-CN/changelog) - [更新日志](#/zh-CN/changelog)
- [码云镜像](https://gitee.com/vant-contrib/vant) - [码云镜像](https://gitee.com/vant-contrib/vant)
- [Gitter 讨论组](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link) - [Gitter 讨论组](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
@ -91,7 +91,7 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
感谢以下小伙伴们为 Vant 发展做出的贡献: 感谢以下小伙伴们为 Vant 发展做出的贡献:
<a href="https://github.com/youzan/vant/graphs/contributors" target="_black"> <a href="https://github.com/vant-ui/vant/graphs/contributors" target="_black">
<img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors" style="width: 100%; margin: 16px 0"> <img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors" style="width: 100%; margin: 16px 0">
</a> </a>
@ -99,7 +99,7 @@ Vant 3/4 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一
贡献代码请阅读我们的[贡献指南](#/zh-CN/contribution)。 贡献代码请阅读我们的[贡献指南](#/zh-CN/contribution)。
使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。 使用过程中发现任何问题都可以提 [Issue](https://github.com/vant-ui/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/vant-ui/vant/pulls)。
### 开源协议 ### 开源协议

View File

@ -32,10 +32,10 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/youzan/vant.git", "url": "https://github.com/vant-ui/vant.git",
"directory": "packages/vant" "directory": "packages/vant"
}, },
"bugs": "https://github.com/youzan/vant/issues", "bugs": "https://github.com/vant-ui/vant/issues",
"author": "chenjiahan", "author": "chenjiahan",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@ -52,7 +52,7 @@ export default {
### @vant/area-data ### @vant/area-data
Vant officially provides a default China area data, which can be imported through [@vant/area-data](https://github.com/youzan/vant/tree/dev/packages/vant-area-data): Vant officially provides a default China area data, which can be imported through [@vant/area-data](https://github.com/vant-ui/vant/tree/dev/packages/vant-area-data):
```bash ```bash
# with npm # with npm

View File

@ -54,7 +54,7 @@ const areaList = {
### @vant/area-data ### @vant/area-data
Vant 官方提供了一份默认的中国省市区数据,可以通过 [@vant/area-data](https://github.com/youzan/vant/tree/dev/packages/vant-area-data) 引入: Vant 官方提供了一份默认的中国省市区数据,可以通过 [@vant/area-data](https://github.com/vant-ui/vant/tree/dev/packages/vant-area-data) 引入:
```bash ```bash
# 通过 npm # 通过 npm

View File

@ -127,7 +127,7 @@ const t = useTranslate({
<van-button <van-button
:text="t('urlRoute')" :text="t('urlRoute')"
type="primary" type="primary"
url="https://github.com/youzan/vant" url="https://github.com/vant-ui/vant"
/> />
<van-button :text="t('vueRoute')" type="primary" to="index" /> <van-button :text="t('vueRoute')" type="primary" to="index" />
</demo-block> </demo-block>

View File

@ -204,7 +204,7 @@ body {
height: 100%; height: 100%;
// fix icon vertical align // fix icon vertical align
// see: https://github.com/youzan/vant/issues/7617 // see: https://github.com/vant-ui/vant/issues/7617
&::before { &::before {
content: ' '; content: ' ';
} }

View File

@ -312,7 +312,7 @@ export default defineComponent({
raf(() => { raf(() => {
// add Math.floor to avoid decimal height issues // add Math.floor to avoid decimal height issues
// https://github.com/youzan/vant/issues/5640 // https://github.com/vant-ui/vant/issues/5640
bodyHeight = Math.floor(useRect(bodyRef).height); bodyHeight = Math.floor(useRect(bodyRef).height);
}); });
scrollToCurrentDate(); scrollToCurrentDate();

View File

@ -81,7 +81,7 @@ const t = useTranslate({
<van-cell <van-cell
:title="t('urlRoute')" :title="t('urlRoute')"
is-link is-link
url="https://github.com/youzan/vant" url="https://github.com/vant-ui/vant"
/> />
<van-cell :title="t('vueRoute')" is-link to="index" /> <van-cell :title="t('vueRoute')" is-link to="index" />
</demo-block> </demo-block>

View File

@ -23,7 +23,7 @@ body {
&__title { &__title {
.van-cell__right-icon::before { .van-cell__right-icon::before {
// using translateZ to fix safari rendering issues // using translateZ to fix safari rendering issues
// see: https://github.com/youzan/vant/issues/8608 // see: https://github.com/vant-ui/vant/issues/8608
transform: rotate(90deg) translateZ(0); transform: rotate(90deg) translateZ(0);
transition: transform var(--van-collapse-item-duration); transition: transform var(--van-collapse-item-duration);
} }

View File

@ -16,7 +16,7 @@ export const useHeight = (
// If the element is using safe area, the system will not return the correct height on page load. // If the element is using safe area, the system will not return the correct height on page load.
// So we need to wait for the height to be set. // So we need to wait for the height to be set.
// https://github.com/youzan/vant/issues/10131 // https://github.com/vant-ui/vant/issues/10131
// https://stackoverflow.com/questions/64891541 // https://stackoverflow.com/questions/64891541
if (withSafeArea) { if (withSafeArea) {
for (let i = 1; i <= 3; i++) { for (let i = 1; i <= 3; i++) {

View File

@ -180,7 +180,7 @@ export default defineComponent({
return ( return (
<div <div
// add key to force re-render // add key to force re-render
// see: https://github.com/youzan/vant/issues/7963 // see: https://github.com/vant-ui/vant/issues/7963
key={allowHtml ? 1 : 0} key={allowHtml ? 1 : 0}
class={bem('content', { isolated: !hasTitle })} class={bem('content', { isolated: !hasTitle })}
> >

View File

@ -263,7 +263,7 @@ export default defineComponent({
}; };
// native maxlength have incorrect line-break counting // native maxlength have incorrect line-break counting
// see: https://github.com/youzan/vant/issues/5033 // see: https://github.com/vant-ui/vant/issues/5033
const limitValueLength = (value: string) => { const limitValueLength = (value: string) => {
const { maxlength } = props; const { maxlength } = props;
if (isDef(maxlength) && getStringLength(value) > maxlength) { if (isDef(maxlength) && getStringLength(value) > maxlength) {

View File

@ -75,7 +75,7 @@ body {
background-color: transparent; background-color: transparent;
border: 0; border: 0;
resize: none; resize: none;
// https://github.com/youzan/vant/pull/9418 // https://github.com/vant-ui/vant/pull/9418
user-select: auto; user-select: auto;
&::placeholder { &::placeholder {

View File

@ -177,7 +177,7 @@ test('should limit maxlength of input value when using maxlength prop', async ()
expect(wrapper.emitted('update:modelValue')[0][0]).toEqual('123'); expect(wrapper.emitted('update:modelValue')[0][0]).toEqual('123');
await wrapper.setProps({ modelValue: '123' }); await wrapper.setProps({ modelValue: '123' });
// see: https://github.com/youzan/vant/issues/7265 // see: https://github.com/vant-ui/vant/issues/7265
input.element.value = 1423; input.element.value = 1423;
input.trigger('input'); input.trigger('input');
expect(input.element.value).toEqual('123'); expect(input.element.value).toEqual('123');

View File

@ -81,7 +81,7 @@ export function resizeTextarea(
if (height) { if (height) {
input.style.height = `${height}px`; input.style.height = `${height}px`;
// https://github.com/youzan/vant/issues/9178 // https://github.com/vant-ui/vant/issues/9178
setRootScrollTop(scrollTop); setRootScrollTop(scrollTop);
} }
} }
@ -110,7 +110,7 @@ export function mapInputType(type: FieldType): {
} }
// get correct length of emoji // get correct length of emoji
// https://github.com/youzan/vant/issues/10032 // https://github.com/vant-ui/vant/issues/10032
export function getStringLength(str: string) { export function getStringLength(str: string) {
return [...str].length; return [...str].length;
} }

View File

@ -23,7 +23,7 @@ body {
color: var(--van-grid-item-text-color); color: var(--van-grid-item-text-color);
font-size: var(--van-grid-item-text-font-size); font-size: var(--van-grid-item-text-font-size);
line-height: 1.5; line-height: 1.5;
// https://github.com/youzan/vant/issues/3894 // https://github.com/vant-ui/vant/issues/3894
word-break: break-all; word-break: break-all;
} }

View File

@ -85,7 +85,7 @@ const t = useTranslate({
<van-grid-item <van-grid-item
icon="search" icon="search"
:text="t('urlRoute')" :text="t('urlRoute')"
url="https://github.com/youzan/vant" url="https://github.com/vant-ui/vant"
/> />
</van-grid> </van-grid>
</demo-block> </demo-block>

View File

@ -169,7 +169,7 @@ export default defineComponent({
check(); check();
} else { } else {
// LazyLoad may trigger loaded event before Image mounted // LazyLoad may trigger loaded event before Image mounted
// https://github.com/youzan/vant/issues/10046 // https://github.com/vant-ui/vant/issues/10046
nextTick(check); nextTick(check);
} }
}; };

View File

@ -159,7 +159,7 @@ test('should not emit load event when inside an inactive tab', async () => {
expect(onLoad2).toHaveBeenCalledTimes(0); expect(onLoad2).toHaveBeenCalledTimes(0);
}); });
// https://github.com/youzan/vant/issues/9017 // https://github.com/vant-ui/vant/issues/9017
test('should emit load event when parent tab is activated', async () => { test('should emit load event when parent tab is activated', async () => {
const onLoad1 = jest.fn(); const onLoad1 = jest.fn();
const onLoad2 = jest.fn(); const onLoad2 = jest.fn();

View File

@ -72,8 +72,8 @@ Current supported languages:
| Traditional Chinese (HK) | zh-HK | - | | Traditional Chinese (HK) | zh-HK | - |
| Traditional Chinese (TW) | zh-TW | - | | Traditional Chinese (TW) | zh-TW | - |
> View all language configs [Here](https://github.com/youzan/vant/tree/dev/packages/vant/src/locale/lang). > View all language configs [Here](https://github.com/vant-ui/vant/tree/dev/packages/vant/src/locale/lang).
### Add new language ### Add new language
If you cant find the language you need, please send us a Pull Request to add the new language pack, you can refer to [Add German language pack](https://github.com/youzan/vant/pull/7245) PR. If you cant find the language you need, please send us a Pull Request to add the new language pack, you can refer to [Add German language pack](https://github.com/vant-ui/vant/pull/7245) PR.

View File

@ -73,13 +73,13 @@ Locale.add(messages);
| 繁體中文(港) | zh-HK | - | | 繁體中文(港) | zh-HK | - |
| 繁體中文(台) | zh-TW | - | | 繁體中文(台) | zh-TW | - |
> 在 [这里](https://github.com/youzan/vant/tree/dev/packages/vant/src/locale/lang) 查看所有的语言包源文件。 > 在 [这里](https://github.com/vant-ui/vant/tree/dev/packages/vant/src/locale/lang) 查看所有的语言包源文件。
## 常见问题 ## 常见问题
### 找不到所需的语言包? ### 找不到所需的语言包?
如果上方列表中没有你需要的语言,欢迎给我们提 Pull Request 来增加新的语言包,改动内容可以参考[增加德语语言包](https://github.com/youzan/vant/pull/7245) 的 PR。 如果上方列表中没有你需要的语言,欢迎给我们提 Pull Request 来增加新的语言包,改动内容可以参考[增加德语语言包](https://github.com/vant-ui/vant/pull/7245) 的 PR。
### 业务代码如何实现国际化? ### 业务代码如何实现国际化?

View File

@ -59,7 +59,7 @@ export default defineComponent({
const onTouchEnd = (event: TouchEvent) => { const onTouchEnd = (event: TouchEvent) => {
if (active.value) { if (active.value) {
// eliminate tap delay on safari // eliminate tap delay on safari
// see: https://github.com/youzan/vant/issues/6836 // see: https://github.com/vant-ui/vant/issues/6836
if (!slots.default) { if (!slots.default) {
preventDefault(event); preventDefault(event);
} }

View File

@ -36,7 +36,7 @@ body {
} }
&__text { &__text {
// https://github.com/youzan/vant/issues/7455 // https://github.com/vant-ui/vant/issues/7455
word-break: break-all; word-break: break-all;
} }

View File

@ -200,7 +200,7 @@ test('should not emit change event when value not changed', async () => {
expect(wrapper.emitted('change')).toHaveLength(1); expect(wrapper.emitted('change')).toHaveLength(1);
}); });
// https://github.com/youzan/vant/issues/8889 // https://github.com/vant-ui/vant/issues/8889
test('should format v-model with step correctly', async () => { test('should format v-model with step correctly', async () => {
const wrapper = mount(Slider, { const wrapper = mount(Slider, {
props: { props: {

View File

@ -246,7 +246,7 @@ export default defineComponent({
const onMousedown = (event: MouseEvent) => { const onMousedown = (event: MouseEvent) => {
// fix mobile safari page scroll down issue // fix mobile safari page scroll down issue
// see: https://github.com/youzan/vant/issues/7690 // see: https://github.com/vant-ui/vant/issues/7690
if (props.disableInput) { if (props.disableInput) {
preventDefault(event); preventDefault(event);
} }

View File

@ -274,7 +274,7 @@ export default defineComponent({
autoplay(); autoplay();
}; };
// issue: https://github.com/youzan/vant/issues/10052 // issue: https://github.com/vant-ui/vant/issues/10052
if (isHidden(root)) { if (isHidden(root)) {
nextTick().then(cb); nextTick().then(cb);
} else { } else {

View File

@ -10,7 +10,7 @@ body {
.van-swipe { .van-swipe {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
// https://github.com/youzan/vant/issues/9931 // https://github.com/vant-ui/vant/issues/9931
transform: translateZ(0); transform: translateZ(0);
cursor: grab; cursor: grab;
user-select: none; user-select: none;

View File

@ -33,7 +33,7 @@ body {
left: 2px; left: 2px;
width: var(--van-switch-node-size); width: var(--van-switch-node-size);
height: var(--van-switch-node-size); height: var(--van-switch-node-size);
// https://github.com/youzan/vant/issues/9839 // https://github.com/vant-ui/vant/issues/9839
font-size: inherit; font-size: inherit;
background: var(--van-switch-node-background); background: var(--van-switch-node-background);
border-radius: 100%; border-radius: 100%;

View File

@ -36,7 +36,7 @@ body {
// allow newline character // allow newline character
white-space: pre-wrap; white-space: pre-wrap;
text-align: center; text-align: center;
// https://github.com/youzan/vant/issues/8959 // https://github.com/vant-ui/vant/issues/8959
word-break: break-all; word-break: break-all;
background: var(--van-toast-background); background: var(--van-toast-background);
border-radius: var(--van-toast-radius); border-radius: var(--van-toast-radius);

View File

@ -1,7 +1,7 @@
import { App } from 'vue'; import { App } from 'vue';
import { camelize } from './format'; import { camelize } from './format';
// https://github.com/youzan/vant/issues/8302 // https://github.com/vant-ui/vant/issues/8302
type EventShim = { type EventShim = {
new (...args: any[]): { new (...args: any[]): {
$props: { $props: {

View File

@ -29,17 +29,11 @@ export default {
{ label: 'v3', link: '/vant/v3/' }, { label: 'v3', link: '/vant/v3/' },
], ],
baiduAnalytics: { baiduAnalytics: {
seed: 'ad6b5732c36321f2dafed737ac2da92f', seed: 'af5d41bc4e446e76665dbe3ec18d55c3',
}, },
htmlMeta: { htmlMeta: {
'docsearch:version': 'v4', 'docsearch:version': 'v4',
}, },
headHtml: `<script>
if (location.host === 'youzan.github.io') {
location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
}
</script>
`,
locales: { locales: {
'zh-CN': { 'zh-CN': {
title: 'Vant 4', title: 'Vant 4',
@ -54,7 +48,7 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
}, },
{ {
logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/github.svg', logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/github.svg',
url: 'https://github.com/youzan/vant', url: 'https://github.com/vant-ui/vant',
}, },
], ],
nav: [ nav: [
@ -477,7 +471,7 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
links: [ links: [
{ {
logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/github.svg', logo: 'https://fastly.jsdelivr.net/npm/@vant/assets/github.svg',
url: 'https://github.com/youzan/vant', url: 'https://github.com/vant-ui/vant',
}, },
], ],
nav: [ nav: [

694
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff