vitepress-plugin-filelist 0.7.0 → 0.7.2
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.
- package/README.md +8 -5
- package/dist/client/browser/index.d.ts +10 -0
- package/dist/client/browser/index.js +284 -189
- package/dist/client/ssr/index.d.ts +10 -0
- package/dist/client/ssr/index.js +145 -36
- package/dist/client/style.css +90 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,6 +85,7 @@ export default {
|
|
|
85
85
|
| `rememberPassword` | `boolean` | `true` | 输入密码时是否提供“在此标签页中记住”开关;`false` 时不写入 sessionStorage |
|
|
86
86
|
| `pageSize` | `number` | `200` | 每个文件夹先显示的条数,之后显示“显示更多 / 全部显示”;`0` 全部显示 |
|
|
87
87
|
| `deepSearchLimit` | `number` | `500` | 深度搜索每次最多读取的文件夹数,之后可“继续” |
|
|
88
|
+
| `deepSearch` | `'manual' \| 'auto'` | `'manual'` | `auto`:输入关键词即自动深度搜索(适合挂载目录不大的站点) |
|
|
88
89
|
| `zipWarnSize` | `number` | `500`(触屏 `200`) | 需在内存中打包的浏览器(Firefox、Safari)超过该大小(MB)先确认;`0` 不提示 |
|
|
89
90
|
| `zipMaxSize` | `number` | `2048`(触屏 `1024`) | 同上,超过该大小(MB)不打包;`0` 不限制 |
|
|
90
91
|
| `title` | `string` | `''` | 工具栏标题;为空时回退到 OpenList 的 `site_title` |
|
|
@@ -148,11 +149,13 @@ interface FileListSource {
|
|
|
148
149
|
|
|
149
150
|
## 筛选与深度搜索
|
|
150
151
|
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
- 深度搜索不使用 OpenList 的搜索接口(无需搜索索引):组件逐个读取未加载的子文件夹(同时 4 个,每次最多 `deepSearchLimit`
|
|
154
|
-
-
|
|
155
|
-
-
|
|
152
|
+
- 输入关键词后立即筛选已加载的内容,显示匹配项及其所在目录,关键词高亮;搜索框右侧的 ×(或 Esc)清除筛选,回到原来的展开状态
|
|
153
|
+
- 挂载目录下还有未加载的子文件夹时,列表末尾居中显示“只筛选了已加载的内容,**尝试深度搜索**”
|
|
154
|
+
- 深度搜索不使用 OpenList 的搜索接口(无需搜索索引):组件逐个读取未加载的子文件夹(同时 4 个,每次最多 `deepSearchLimit` 个),匹配项出现在原位置,可勾选、打包、预览、下载
|
|
155
|
+
- 点过一次即进入**深度搜索状态**,直到清空关键词:更换关键词、刷新、解锁文件夹后都会自动继续,不再出现按钮;刷新时结果保留,读完一次性替换
|
|
156
|
+
- 搜索中可“停止”,达到上限或停止后显示“继续”
|
|
157
|
+
- 深度搜索无法进入的加密文件夹会显示在结果中(带锁,提示“未搜索(需要密码)”),可原地输入密码,解锁后自动搜索其中内容
|
|
158
|
+
- `deep-search="auto"` 时输入关键词即自动进入深度搜索状态
|
|
156
159
|
|
|
157
160
|
## 刷新与目录密码
|
|
158
161
|
|
|
@@ -102,6 +102,10 @@ interface FileListLabels {
|
|
|
102
102
|
deepContinue: string;
|
|
103
103
|
deepSkipped: string;
|
|
104
104
|
deepFailed: string;
|
|
105
|
+
/** Beside a locked folder shown in deep search results. */
|
|
106
|
+
deepLocked: string;
|
|
107
|
+
/** The × in the filter box. */
|
|
108
|
+
clearFilter: string;
|
|
105
109
|
/** Markdown / HTML preview: the source / rendered switch. */
|
|
106
110
|
viewMode: string;
|
|
107
111
|
viewSource: string;
|
|
@@ -179,6 +183,11 @@ interface FileListProps {
|
|
|
179
183
|
* Defaults to `500`.
|
|
180
184
|
*/
|
|
181
185
|
deepSearchLimit?: number;
|
|
186
|
+
/**
|
|
187
|
+
* `manual` (default): “Try deep search” starts deep search mode.
|
|
188
|
+
* `auto`: typing a keyword starts it at once (for small mounts).
|
|
189
|
+
*/
|
|
190
|
+
deepSearch?: 'manual' | 'auto';
|
|
182
191
|
/**
|
|
183
192
|
* Browsers that must build the ZIP in memory (Firefox, Safari) ask first above
|
|
184
193
|
* this many MB. Defaults to 500 (200 on touch devices); `0` never asks.
|
|
@@ -216,6 +225,7 @@ declare const _default: import("vue").DefineComponent<FileListProps, {}, {}, {},
|
|
|
216
225
|
rememberPassword: boolean;
|
|
217
226
|
pageSize: number;
|
|
218
227
|
deepSearchLimit: number;
|
|
228
|
+
deepSearch: "manual" | "auto";
|
|
219
229
|
locale: FileListLocale;
|
|
220
230
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
221
231
|
declare global {
|