mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
docs: code split docsearch (#10648)
This commit is contained in:
parent
e5cc7fadeb
commit
be22f4c1f8
@ -3,9 +3,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@docsearch/css';
|
||||
import docsearch from '@docsearch/js';
|
||||
|
||||
export default {
|
||||
name: 'VanDocSearch',
|
||||
|
||||
@ -27,9 +24,12 @@ export default {
|
||||
methods: {
|
||||
initDocsearch() {
|
||||
if (this.searchConfig) {
|
||||
docsearch({
|
||||
...this.searchConfig,
|
||||
container: '#docsearch',
|
||||
import('@docsearch/css');
|
||||
import('@docsearch/js').then((docsearch) => {
|
||||
docsearch.default({
|
||||
...this.searchConfig,
|
||||
container: '#docsearch',
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user