Compare commits

...

4 Commits

Author SHA1 Message Date
neverland
0e8ea1e6f0
docs: remove search from v2 site (#10645)
* docs: remove search from v2 site

* docs: fix typo
2022-05-29 09:57:05 +08:00
neverland
00b9efa22c
docs(@vant/cli): changelog 2.11.7 (#10644) 2022-05-28 14:53:23 +08:00
chenjiahan
63995ead1c chore: release @vant/cli@2.11.7 2022-05-28 14:50:13 +08:00
neverland
7beef3b8cc
chore: fix cdn link (#10643) 2022-05-28 14:49:46 +08:00
11 changed files with 28 additions and 44 deletions

View File

@ -738,7 +738,7 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
- Field: incorrect disabled color in iOS 14 [#7206](https://github.com/youzan/vant/issues/7206)
- List: scoped style not applied to first child [#7202](https://github.com/youzan/vant/issues/7202)
- Swipe: can't disable loop in some cases [#7208](https://github.com/youzan/vant/issues/7208)
- Swipe: incorrect indicator color trantision [#7207](https://github.com/youzan/vant/issues/7207)
- Swipe: incorrect indicator color transition [#7207](https://github.com/youzan/vant/issues/7207)
### [v2.10.7](https://github.com/youzan/vant/compare/v2.10.6...v2.10.7)

View File

@ -20,12 +20,12 @@ The easiest way to use Vant is to include a CDN link in the html file, after whi
<!-- import style -->
<link
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 -->
<script src="https://cdn.jsdelivr.net/npm/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/vue@2.6/dist/vue.min.js"></script>
<script src="https://unpkg.com/vant@2.12/lib/vant.min.js"></script>
<script>
// Render the Button component

View File

@ -26,12 +26,12 @@ npm i vant@latest-v2 -S
<!-- 引入样式文件 -->
<link
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 文件 -->
<script src="https://cdn.jsdelivr.net/npm/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/vue@2.6/dist/vue.min.js"></script>
<script src="https://unpkg.com/vant@2.12/lib/vant.min.js"></script>
<script>
// 在 #app 标签下渲染一个按钮组件

View File

@ -66,7 +66,7 @@
"vue": ">= 2.6.0"
},
"devDependencies": {
"@vant/cli": "^2.11.5",
"@vant/cli": "^2.11.7",
"prettier": "2.1.0",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"

View File

@ -1,5 +1,12 @@
# 更新日志
## v2.11.7
`2022-05-28`
- 替换 `cdn.jsdelivr.net` 域名为 `fastly.jsdelivr.net`,修复无法访问的问题
- 未使用 `searchConfig` 时,不加载 docsearch 相关文件
## v2.11.6
`2022-04-28`

View File

@ -1,6 +1,6 @@
{
"name": "@vant/cli",
"version": "2.11.6",
"version": "2.11.7",
"description": "",
"main": "lib/index.js",
"typings": "lib/index.d.ts",

View File

@ -19,10 +19,12 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<% if (htmlWebpackPlugin.options.usingSearch) { %>
<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"
/>
<% } %>
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
<script>
var _hmt = _hmt || [];
@ -38,6 +40,8 @@
</head>
<body ontouchstart>
<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>
</html>

View File

@ -85,6 +85,7 @@ export function getSiteDevBaseConfig(): WebpackConfig {
title,
logo: siteConfig.logo,
description: siteConfig.description,
usingSearch: !!siteConfig.searchConfig,
chunks: ['chunks', 'site-desktop'],
template: join(__dirname, '../../site/desktop/index.html'),
filename: 'index.html',

View File

@ -27,5 +27,5 @@ import '@vant/touch-emulator';
## CDN 引入
```html
<script src="https://cdn.jsdelivr.net/npm/@vant/touch-emulator"></script>
<script src="https://fastly.jsdelivr.net/npm/@vant/touch-emulator"></script>
```

View File

@ -40,26 +40,6 @@ module.exports = {
url: 'https://github.com/youzan/vant',
},
],
searchConfig: {
apiKey: '90067aecdaa2c85220e2783cd305caac',
indexName: 'vant',
placeholder: '搜索文档...',
algoliaOptions: {
facetFilters: ['version:v2'],
},
transformData(hits) {
if (location.hostname === 'vant-contrib.gitee.io') {
hits.forEach((hit) => {
if (hit.url) {
hit.url = hit.url.replace(
'youzan.github.io',
'vant-contrib.gitee.io'
);
}
});
}
},
},
nav: [
{
title: '开发指南',
@ -458,14 +438,6 @@ module.exports = {
url: 'https://github.com/youzan/vant',
},
],
searchConfig: {
apiKey: '90067aecdaa2c85220e2783cd305caac',
indexName: 'vant',
placeholder: 'Search...',
algoliaOptions: {
facetFilters: ['version:v2'],
},
},
nav: [
{
title: 'Essentials',

View File

@ -1684,10 +1684,10 @@
semver "^6.3.0"
tsutils "^3.17.1"
"@vant/cli@^2.11.5":
version "2.11.5"
resolved "https://registry.npmmirror.com/@vant/cli/-/cli-2.11.5.tgz#87d5b2354c45335eef8e4cb5ba3ea1a0624bd44d"
integrity sha512-de+RQCepCbBngrubJceyn3Jg3uEThcwwCLvHR8KLZ/8ADtVNsa7ELDNEhJQ2QlucWX6Tfy8C5E/3lQ/fkdS/Hw==
"@vant/cli@^2.11.7":
version "2.11.7"
resolved "https://registry.npmjs.org/@vant/cli/-/cli-2.11.7.tgz#24742903b0ccbaaddaef5fd9fdad04f749103910"
integrity sha512-x9tgHaYfz1Pbi80C3vvgmobpLgHA3V5934/7Xqpz7gmrjSK0z+Qojx/eOioi9xS9pS655j1nbw5pPzz5+5Y/Xw==
dependencies:
"@babel/core" "^7.10.1"
"@babel/plugin-syntax-jsx" "^7.10.1"