|
@@ -4,7 +4,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, computed, watch, shallowRef, markRaw, nextTick } from "vue";
|
|
|
+import { ref, computed, watch, shallowRef, markRaw, nextTick, onMounted } from "vue";
|
|
|
import Mark from 'mark.js/src/vanilla.js'
|
|
|
import localSearchIndex from '@localSearchIndex'
|
|
|
import MiniSearch, { type SearchResult } from 'minisearch'
|
|
@@ -64,6 +64,9 @@ const searchIndex = computedAsync(async () =>
|
|
|
const filterText = ref("");
|
|
|
const input$ = ref();
|
|
|
const { focused } = useFocus(computed(() => input$.value?.input));
|
|
|
+onMounted(() => {
|
|
|
+ focused.value = true
|
|
|
+})
|
|
|
const results = shallowRef<(SearchResult & Result)[]>([])
|
|
|
const loading = ref(false);
|
|
|
|