Compare commits

..

No commits in common. "0b6de0aa773cd6094233139a02149764dd7d4e2e" and "95bee736243693a76192fcb0994242dcdd30a54a" have entirely different histories.

4 changed files with 35 additions and 9 deletions

View File

@ -6,8 +6,6 @@ on:
paths:
- 'packages/vant/docs/**'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest

View File

@ -3,6 +3,9 @@
</template>
<script>
import '@docsearch/css';
import docsearch from '@docsearch/js';
export default {
name: 'VanDocSearch',
@ -24,12 +27,9 @@ export default {
methods: {
initDocsearch() {
if (this.searchConfig) {
import('@docsearch/css');
import('@docsearch/js').then((docsearch) => {
docsearch.default({
...this.searchConfig,
container: '#docsearch',
});
docsearch({
...this.searchConfig,
container: '#docsearch',
});
}
},

View File

@ -1,6 +1,6 @@
{
"name": "vant",
"version": "3.5.0-beta.0",
"version": "3.4.9",
"description": "Mobile UI Components built on Vue",
"main": "lib/vant.cjs.js",
"module": "es/index.mjs",

View File

@ -46,6 +46,26 @@ export default {
url: 'https://github.com/youzan/vant',
},
],
searchConfig: {
appId: 'BLI2GGOUL8',
apiKey: '07cb725cd26aa496996de6cb8ab9b5cc',
indexName: 'vant',
searchParameters: {
facetFilters: ['lang:zh-CN', 'version:v3'],
},
transformItems(items) {
if (location.hostname !== 'youzan.github.io') {
items.forEach((item) => {
if (item.url) {
item.url =
item.url &&
item.url.replace('youzan.github.io', location.hostname);
}
});
}
return items;
},
},
nav: [
{
title: '开发指南',
@ -470,6 +490,14 @@ export default {
url: 'https://github.com/youzan/vant',
},
],
searchConfig: {
appId: 'BLI2GGOUL8',
apiKey: '07cb725cd26aa496996de6cb8ab9b5cc',
indexName: 'vant',
searchParameters: {
facetFilters: ['lang:en-US', 'version:v3'],
},
},
nav: [
{
title: 'Essentials',