Merge branch 'dev' into next
This commit is contained in:
@@ -90,7 +90,7 @@ export default {
|
||||
},
|
||||
|
||||
anotherLang() {
|
||||
const items = this.langConfigs.filter(item => item.lang !== this.lang);
|
||||
const items = this.langConfigs.filter((item) => item.lang !== this.lang);
|
||||
if (items.length) {
|
||||
return items[0];
|
||||
}
|
||||
@@ -178,7 +178,6 @@ export default {
|
||||
padding: 0 12px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-family: 'Helvetica Neue', Arial, sans-serif;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.7);
|
||||
|
||||
@@ -29,6 +29,17 @@ export default {
|
||||
if (this.searchConfig) {
|
||||
this.docsearchInstance = window.docsearch({
|
||||
...this.searchConfig,
|
||||
transformData: (hits) => {
|
||||
hits.forEach((hit) => {
|
||||
if (hit.anchor) {
|
||||
hit.url = hit.url + '#' + hit.anchor;
|
||||
hit.anchor = null;
|
||||
}
|
||||
});
|
||||
if (this.searchConfig.transformData) {
|
||||
this.searchConfig.transformData(hits);
|
||||
}
|
||||
},
|
||||
inputSelector: '.van-doc-search',
|
||||
algoliaOptions: {
|
||||
facetFilters: [`lang:${this.lang}`],
|
||||
|
||||
Reference in New Issue
Block a user