mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
chore: update repo links
This commit is contained in:
parent
11dbde14f6
commit
7879fd6395
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
请移步 GitHub issues 进行反馈:
|
请移步 GitHub issues 进行反馈:
|
||||||
|
|
||||||
https://github.com/youzan/vant/issues
|
https://github.com/vant-ui/vant/issues
|
||||||
|
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -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`).
|
||||||
|
2
.github/workflows/sync-gitee.yml
vendored
2
.github/workflows/sync-gitee.yml
vendored
@ -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
|
||||||
|
14
README.md
14
README.md
@ -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>
|
||||||
|
|
||||||
|
@ -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)。
|
||||||
|
|
||||||
## 开源协议
|
## 开源协议
|
||||||
|
|
||||||
|
@ -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": {
|
||||||
@ -40,7 +40,6 @@
|
|||||||
"consola": "^2.11.3",
|
"consola": "^2.11.3",
|
||||||
"fast-glob": "^3.2.4",
|
"fast-glob": "^3.2.4",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"inquirer": "^8.0.0",
|
|
||||||
"picocolors": "^1.0.0"
|
"picocolors": "^1.0.0"
|
||||||
},
|
},
|
||||||
"release-it": {
|
"release-it": {
|
||||||
|
@ -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": {
|
||||||
|
@ -65,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)
|
||||||
|
@ -61,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)
|
||||||
|
@ -431,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
|
||||||
@ -473,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
|
||||||
|
|
||||||
@ -485,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
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
|
||||||
|
@ -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 包能被正确识别:
|
||||||
|
|
||||||
|
@ -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": {
|
||||||
|
@ -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: {
|
||||||
|
@ -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": {
|
||||||
|
@ -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": {
|
||||||
|
@ -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": {
|
||||||
|
@ -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
|
||||||
|
@ -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-markdown-loader"
|
"directory": "packages/vant-markdown-loader"
|
||||||
},
|
},
|
||||||
"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": {
|
||||||
|
@ -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]
|
||||||
|
|
||||||
|
@ -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"
|
||||||
}
|
}
|
||||||
|
@ -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": {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
# 安装模块
|
# 安装模块
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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
|
||||||
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
#### 在线资源
|
#### 在线资源
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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)。
|
||||||
|
|
||||||
### 开源协议
|
### 开源协议
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ Vant use [Less](http://lesscss.org/) as css preprocessor,you can override the
|
|||||||
|
|
||||||
### Less variables
|
### Less variables
|
||||||
|
|
||||||
There are some [basic variables](<(https://github.com/youzan/vant/blob/dev/packages/vant/src/style/var.less)>) below, for component less variables, please refer to the documentation of each component, or view the `var.less` file in the component source directory.
|
There are some [basic variables](<(https://github.com/vant-ui/vant/blob/dev/packages/vant/src/style/var.less)>) below, for component less variables, please refer to the documentation of each component, or view the `var.less` file in the component source directory.
|
||||||
|
|
||||||
```less
|
```less
|
||||||
// Color Palette
|
// Color Palette
|
||||||
|
@ -16,7 +16,7 @@ Vant 提供了一套默认主题,CSS 命名采用 BEM 的风格,方便使用
|
|||||||
|
|
||||||
Vant 使用了 [Less](http://lesscss.org/) 对样式进行预处理,并内置了一些样式变量,通过替换样式变量即可定制你自己需要的主题。
|
Vant 使用了 [Less](http://lesscss.org/) 对样式进行预处理,并内置了一些样式变量,通过替换样式变量即可定制你自己需要的主题。
|
||||||
|
|
||||||
下面是所有的[基础样式变量](https://github.com/youzan/vant/blob/dev/packages/vant/src/style/var.less),组件的样式变量请参考各个组件的文档,或查看组件源码目录下的 `var.less` 文件。
|
下面是所有的[基础样式变量](https://github.com/vant-ui/vant/blob/dev/packages/vant/src/style/var.less),组件的样式变量请参考各个组件的文档,或查看组件源码目录下的 `var.less` 文件。
|
||||||
|
|
||||||
```less
|
```less
|
||||||
// Color Palette
|
// Color Palette
|
||||||
|
@ -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"
|
"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": [
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -1 +1 @@
|
|||||||
// 已迁移至 https://github.com/youzan/vant/tree/dev/packages/vant-area-data
|
// 已迁移至 https://github.com/vant-ui/vant/tree/dev/packages/vant-area-data
|
||||||
|
@ -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>
|
||||||
|
@ -201,7 +201,7 @@
|
|||||||
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: ' ';
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
@ -87,7 +87,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>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
&__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-transition-duration);
|
transition: transform var(--van-collapse-item-transition-duration);
|
||||||
}
|
}
|
||||||
|
@ -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++) {
|
||||||
|
@ -51,7 +51,7 @@ export function getTrueValue(value: string | undefined): number {
|
|||||||
export const getMonthEndDay = (year: number, month: number): number =>
|
export const getMonthEndDay = (year: number, month: number): number =>
|
||||||
32 - new Date(year, month - 1, 32).getDate();
|
32 - new Date(year, month - 1, 32).getDate();
|
||||||
|
|
||||||
// https://github.com/youzan/vant/issues/10013
|
// https://github.com/vant-ui/vant/issues/10013
|
||||||
export const proxyPickerMethods = (
|
export const proxyPickerMethods = (
|
||||||
picker: PickerInstance,
|
picker: PickerInstance,
|
||||||
callback: () => void
|
callback: () => void
|
||||||
|
@ -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 })}
|
||||||
>
|
>
|
||||||
|
@ -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) {
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
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 {
|
||||||
|
@ -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');
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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();
|
||||||
|
@ -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 can’t 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 can’t 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.
|
||||||
|
@ -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。
|
||||||
|
|
||||||
### 业务代码如何实现国际化?
|
### 业务代码如何实现国际化?
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: {
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
.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;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
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-color);
|
background: var(--van-switch-node-background-color);
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
// 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-color);
|
background: var(--van-toast-background-color);
|
||||||
border-radius: var(--van-toast-border-radius);
|
border-radius: var(--van-toast-border-radius);
|
||||||
|
@ -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: {
|
||||||
|
@ -29,12 +29,6 @@ export default {
|
|||||||
htmlMeta: {
|
htmlMeta: {
|
||||||
'docsearch:version': 'v3',
|
'docsearch:version': 'v3',
|
||||||
},
|
},
|
||||||
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 3',
|
title: 'Vant 3',
|
||||||
@ -49,7 +43,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: [
|
||||||
@ -473,7 +467,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: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user