File tree 2 files changed +14
-2
lines changed
src/client/theme-default/components
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,15 @@ const filterText = disableQueryPersistence.value
104
104
105
105
const showDetailedList = useLocalStorage (
106
106
' vitepress:local-search-detailed-list' ,
107
- false
107
+ theme .value .search ?.provider === ' local' &&
108
+ theme .value .search .options ?.detailedView === true
108
109
)
109
110
110
111
const disableDetailedView = computed (() => {
111
112
return (
112
113
theme .value .search ?.provider === ' local' &&
113
- theme .value .search .options ?.disableDetailedView === true
114
+ (theme .value .search .options ?.disableDetailedView === true ||
115
+ theme .value .search .options ?.detailedView === false )
114
116
)
115
117
})
116
118
Original file line number Diff line number Diff line change @@ -331,9 +331,19 @@ export namespace DefaultTheme {
331
331
export interface LocalSearchOptions {
332
332
/**
333
333
* @default false
334
+ * @deprecated Use `detailedView: false` instead.
334
335
*/
335
336
disableDetailedView ?: boolean
336
337
338
+ /**
339
+ * If `true`, the detailed view will be enabled by default.
340
+ * If `false`, the detailed view will be disabled.
341
+ * If `'auto'`, the detailed view will be disabled by default, but can be enabled by the user.
342
+ *
343
+ * @default 'auto'
344
+ */
345
+ detailedView ?: boolean | 'auto'
346
+
337
347
/**
338
348
* @default false
339
349
*/
You can’t perform that action at this time.
0 commit comments