mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
22 lines
628 B
TypeScript
22 lines
628 B
TypeScript
import { h } from 'vue'
|
|
import { defineClientConfig } from 'vuepress/client'
|
|
import type { ClientConfig } from 'vuepress/client'
|
|
import Search from './components/Search.vue'
|
|
import type { SearchBoxLocales, SearchOptions } from '../shared/index.js'
|
|
|
|
declare const __SEARCH_LOCALES__: SearchBoxLocales
|
|
declare const __SEARCH_OPTIONS__: SearchOptions
|
|
|
|
const locales = __SEARCH_LOCALES__
|
|
const searchOptions = __SEARCH_OPTIONS__
|
|
|
|
export default defineClientConfig({
|
|
enhance({ app }) {
|
|
app.component('SearchBox', props => h(Search, {
|
|
locales,
|
|
options: searchOptions,
|
|
...props,
|
|
}))
|
|
},
|
|
}) as ClientConfig
|