|
|
@ -26,6 +26,7 @@ const { theme, localeIndex } = useData()
|
|
|
|
// payload), we delay initializing it until the user has actually clicked or
|
|
|
|
// payload), we delay initializing it until the user has actually clicked or
|
|
|
|
// hit the hotkey to invoke it.
|
|
|
|
// hit the hotkey to invoke it.
|
|
|
|
const loaded = ref(false)
|
|
|
|
const loaded = ref(false)
|
|
|
|
|
|
|
|
const actuallyLoaded = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
const buttonText = computed(() => {
|
|
|
|
const buttonText = computed(() => {
|
|
|
|
const options = theme.value.search?.options ?? theme.value.algolia
|
|
|
|
const options = theme.value.search?.options ?? theme.value.algolia
|
|
|
@ -169,9 +170,10 @@ const provider = __ALGOLIA__ ? 'algolia' : __VP_LOCAL_SEARCH__ ? 'local' : ''
|
|
|
|
<VPAlgoliaSearchBox
|
|
|
|
<VPAlgoliaSearchBox
|
|
|
|
v-if="loaded"
|
|
|
|
v-if="loaded"
|
|
|
|
:algolia="theme.search?.options ?? theme.algolia"
|
|
|
|
:algolia="theme.search?.options ?? theme.algolia"
|
|
|
|
|
|
|
|
@vue:beforeMount="actuallyLoaded = true"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else id="docsearch">
|
|
|
|
<div v-if="!actuallyLoaded" id="docsearch">
|
|
|
|
<VPNavBarSearchButton :placeholder="buttonText" @click="load" />
|
|
|
|
<VPNavBarSearchButton :placeholder="buttonText" @click="load" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|