mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore: fix cdn link (#10643)
This commit is contained in:
parent
c9b8eb32eb
commit
7beef3b8cc
@ -20,12 +20,12 @@ The easiest way to use Vant is to include a CDN link in the html file, after whi
|
|||||||
<!-- import style -->
|
<!-- import style -->
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css"
|
href="https://unpkg.com/vant@2.12/lib/index.css"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- import script -->
|
<!-- import script -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
|
<script src="https://unpkg.com/vue@2.6/dist/vue.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.12/lib/vant.min.js"></script>
|
<script src="https://unpkg.com/vant@2.12/lib/vant.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Render the Button component
|
// Render the Button component
|
||||||
|
@ -26,12 +26,12 @@ npm i vant@latest-v2 -S
|
|||||||
<!-- 引入样式文件 -->
|
<!-- 引入样式文件 -->
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css"
|
href="https://unpkg.com/vant@2.12/lib/index.css"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
|
<script src="https://unpkg.com/vue@2.6/dist/vue.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.12/lib/vant.min.js"></script>
|
<script src="https://unpkg.com/vant@2.12/lib/vant.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 在 #app 标签下渲染一个按钮组件
|
// 在 #app 标签下渲染一个按钮组件
|
||||||
|
@ -19,10 +19,12 @@
|
|||||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||||
<meta http-equiv="Pragma" content="no-cache" />
|
<meta http-equiv="Pragma" content="no-cache" />
|
||||||
<meta http-equiv="Expires" content="0" />
|
<meta http-equiv="Expires" content="0" />
|
||||||
|
<% if (htmlWebpackPlugin.options.usingSearch) { %>
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"
|
href="https://fastly.jsdelivr.net/docsearch.js/2/docsearch.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
|
<% } %>
|
||||||
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
|
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
|
||||||
<script>
|
<script>
|
||||||
var _hmt = _hmt || [];
|
var _hmt = _hmt || [];
|
||||||
@ -38,6 +40,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body ontouchstart>
|
<body ontouchstart>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
|
<% if (htmlWebpackPlugin.options.usingSearch) { %>
|
||||||
|
<script src="https://fastly.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
|
||||||
|
<% } %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -85,6 +85,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
|
|||||||
title,
|
title,
|
||||||
logo: siteConfig.logo,
|
logo: siteConfig.logo,
|
||||||
description: siteConfig.description,
|
description: siteConfig.description,
|
||||||
|
usingSearch: !!siteConfig.searchConfig,
|
||||||
chunks: ['chunks', 'site-desktop'],
|
chunks: ['chunks', 'site-desktop'],
|
||||||
template: join(__dirname, '../../site/desktop/index.html'),
|
template: join(__dirname, '../../site/desktop/index.html'),
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
|
@ -27,5 +27,5 @@ import '@vant/touch-emulator';
|
|||||||
## CDN 引入
|
## CDN 引入
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@vant/touch-emulator"></script>
|
<script src="https://fastly.jsdelivr.net/npm/@vant/touch-emulator"></script>
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user