mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: add free CDN tips (#10068)
This commit is contained in:
parent
8fd2c0570e
commit
63e25b05d6
@ -42,12 +42,21 @@ The easiest way to use Vant is to include a CDN link in the html file, after whi
|
|||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Free CDN
|
||||||
|
|
||||||
You can use Vant through these free CDN services:
|
You can use Vant through these free CDN services:
|
||||||
|
|
||||||
- [jsdelivr](https://www.jsdelivr.com/package/npm/vant)
|
- [jsdelivr](https://www.jsdelivr.com/package/npm/vant)
|
||||||
- [cdnjs](https://cdnjs.com/libraries/vant)
|
- [cdnjs](https://cdnjs.com/libraries/vant)
|
||||||
- [unpkg](https://unpkg.com/)
|
- [unpkg](https://unpkg.com/)
|
||||||
|
|
||||||
|
Note: Free CDN is generally used for making prototypes or personal projects. It is not recommended to use free CDN in production environment.
|
||||||
|
|
||||||
|
For enterprise developers, we recommend:
|
||||||
|
|
||||||
|
- install with npm, use build tools to bundle it
|
||||||
|
- download the scripts, host it on your own server
|
||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
|
|
||||||
We recommend to use [Vue Cli](https://cli.vuejs.org/) to create a new project.
|
We recommend to use [Vue Cli](https://cli.vuejs.org/) to create a new project.
|
||||||
|
@ -49,12 +49,21 @@ npm i vant@next -S
|
|||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### 免费 CDN
|
||||||
|
|
||||||
你可以通过以下免费 CDN 服务来使用 Vant:
|
你可以通过以下免费 CDN 服务来使用 Vant:
|
||||||
|
|
||||||
- [jsdelivr](https://www.jsdelivr.com/package/npm/vant)
|
- [jsdelivr](https://www.jsdelivr.com/package/npm/vant)
|
||||||
- [cdnjs](https://cdnjs.com/libraries/vant)
|
- [cdnjs](https://cdnjs.com/libraries/vant)
|
||||||
- [unpkg](https://unpkg.com/)
|
- [unpkg](https://unpkg.com/)
|
||||||
|
|
||||||
|
注意:免费 CDN 一般用于制作原型或个人小型项目,不推荐在企业生产环境中使用免费 CDN。
|
||||||
|
|
||||||
|
对于企业开发者,建议使用以下方式:
|
||||||
|
|
||||||
|
- 通过 npm 引入,并通过构建工具进行打包
|
||||||
|
- 下载对应文件,并托管在你自己的服务器或 CDN 上
|
||||||
|
|
||||||
### 通过脚手架安装
|
### 通过脚手架安装
|
||||||
|
|
||||||
在新项目中使用 Vant 时,推荐使用 Vue 官方提供的脚手架 [Vue Cli](https://cli.vuejs.org/zh/) 创建项目并安装 Vant。
|
在新项目中使用 Vant 时,推荐使用 Vue 官方提供的脚手架 [Vue Cli](https://cli.vuejs.org/zh/) 创建项目并安装 Vant。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user