@vuepress-plume/plugin-search 1.0.0-rc.173 → 1.0.0-rc.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,7 +32,7 @@ import BackIcon from './icons/BackIcon.vue'
|
|
|
32
32
|
import ClearIcon from './icons/ClearIcon.vue'
|
|
33
33
|
import SearchIcon from './icons/SearchIcon.vue'
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const { locales, options } = defineProps<{
|
|
36
36
|
locales: SearchBoxLocales
|
|
37
37
|
options: SearchOptions
|
|
38
38
|
}>()
|
|
@@ -42,7 +42,7 @@ const emit = defineEmits<{
|
|
|
42
42
|
}>()
|
|
43
43
|
|
|
44
44
|
const routeLocale = useRouteLocale()
|
|
45
|
-
const locale = useLocale(toRef(
|
|
45
|
+
const locale = useLocale(toRef(() => locales))
|
|
46
46
|
|
|
47
47
|
const el = shallowRef<HTMLElement>()
|
|
48
48
|
const resultsEl = shallowRef<HTMLElement>()
|
|
@@ -71,15 +71,15 @@ const searchIndex = computedAsync(async () =>
|
|
|
71
71
|
prefix: true,
|
|
72
72
|
boost: { title: 4, text: 2, titles: 1 },
|
|
73
73
|
},
|
|
74
|
-
...
|
|
75
|
-
...
|
|
74
|
+
...options.miniSearch?.searchOptions,
|
|
75
|
+
...options.miniSearch?.options,
|
|
76
76
|
},
|
|
77
77
|
),
|
|
78
78
|
),
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
const disableQueryPersistence = computed(() =>
|
|
82
|
-
|
|
82
|
+
options?.disableQueryPersistence === true,
|
|
83
83
|
)
|
|
84
84
|
const filterText = disableQueryPersistence.value
|
|
85
85
|
? ref('')
|
|
@@ -3,11 +3,11 @@ import type { SearchBoxLocales } from '../../shared/index.js'
|
|
|
3
3
|
import { toRef } from 'vue'
|
|
4
4
|
import { useLocale } from '../composables/index.js'
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const { locales } = defineProps<{
|
|
7
7
|
locales: SearchBoxLocales
|
|
8
8
|
}>()
|
|
9
9
|
|
|
10
|
-
const locale = useLocale(toRef(
|
|
10
|
+
const locale = useLocale(toRef(() => locales))
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress-plume/plugin-search",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.175",
|
|
5
5
|
"description": "The Plugin for VuePress 2 - local search",
|
|
6
6
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"vuepress": "2.0.0-rc.26"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@vuepress/helper": "2.0.0-rc.
|
|
38
|
-
"@vueuse/core": "^
|
|
39
|
-
"@vueuse/integrations": "^
|
|
37
|
+
"@vuepress/helper": "2.0.0-rc.118",
|
|
38
|
+
"@vueuse/core": "^14.0.0",
|
|
39
|
+
"@vueuse/integrations": "^14.0.0",
|
|
40
40
|
"chokidar": "4.0.3",
|
|
41
|
-
"focus-trap": "^7.6.
|
|
41
|
+
"focus-trap": "^7.6.6",
|
|
42
42
|
"mark.js": "^8.11.1",
|
|
43
43
|
"minisearch": "^7.2.0",
|
|
44
44
|
"p-map": "^7.0.3",
|