@cw-devops-fe/vue-tree-vue3 1.0.1 → 1.1.0

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.
@@ -1,4 +1,6 @@
1
+ import { nextTick } from 'vue';
1
2
  import { default as TreeStore } from './model/tree-store';
3
+ import { default as Node } from './model/node';
2
4
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
5
  data: {
4
6
  type: ArrayConstructor;
@@ -62,11 +64,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
62
64
  default: number;
63
65
  };
64
66
  iconClass: StringConstructor;
65
- /** 开启虚拟滚动(只虚拟化第一层节点)。默认 false,数据量大时传 true */
67
+ /** 已展开且未被过滤的各层节点共用一个虚拟窗口,隐藏或收起的子树仍由模型保存。 */
66
68
  virtual: {
67
69
  type: BooleanConstructor;
68
70
  default: boolean;
69
71
  };
72
+ /**
73
+ * 仅用于有 renderContent 或默认插槽的虚拟树。行、文件名和复选框先显示,
74
+ * 图标、菜单等自定义内容由 VirtualTreeRows 分帧安排,轮到本行时再挂载。
75
+ */
76
+ deferContent: BooleanConstructor;
77
+ /** 虚拟行可读取调用方的数据字段。例如 loadingKey="pending" 对应 data.pending。 */
78
+ loadingKey: StringConstructor;
70
79
  }>, {
71
80
  store: import('vue').Ref<{
72
81
  currentNode: any;
@@ -95,12 +104,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
95
104
  readonly disabled: any;
96
105
  readonly nextSibling: any;
97
106
  readonly previousSibling: any;
98
- contains: (target: import('./model/node').default, deep?: boolean) => boolean;
107
+ contains: (target: Node, deep?: boolean) => boolean;
99
108
  remove: () => void;
100
109
  insertChild: (child: any, index?: number, batch?: boolean) => void;
101
- insertBefore: (child: any, ref: import('./model/node').default) => void;
102
- insertAfter: (child: any, ref: import('./model/node').default) => void;
103
- removeChild: (child: import('./model/node').default) => void;
110
+ insertBefore: (child: any, ref: Node) => void;
111
+ insertAfter: (child: any, ref: Node) => void;
112
+ removeChild: (child: Node) => void;
104
113
  removeChildByData: (data: any) => void;
105
114
  expand: (callback?: Function | null, expandParent?: boolean) => void;
106
115
  doCreateChildren: (array: any[], defaultProps?: {}) => void;
@@ -112,6 +121,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
112
121
  updateChildren: () => void;
113
122
  loadData: (callback?: Function, defaultProps?: {}) => void;
114
123
  };
124
+ isVirtual?: (() => boolean) | undefined;
115
125
  key: string;
116
126
  data: any;
117
127
  lazy: boolean;
@@ -124,6 +134,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
124
134
  autoExpandParent: boolean;
125
135
  defaultExpandAll: boolean;
126
136
  filterNodeMethod: Function | null;
137
+ initializeRoot: () => void;
138
+ collapseOtherBranches: (node: Node) => void;
127
139
  filter: (value: any) => void;
128
140
  setData: (newVal: any) => void;
129
141
  getNode: (data: any) => any;
@@ -178,12 +190,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
178
190
  readonly disabled: any;
179
191
  readonly nextSibling: any;
180
192
  readonly previousSibling: any;
181
- contains: (target: import('./model/node').default, deep?: boolean) => boolean;
193
+ contains: (target: Node, deep?: boolean) => boolean;
182
194
  remove: () => void;
183
195
  insertChild: (child: any, index?: number, batch?: boolean) => void;
184
- insertBefore: (child: any, ref: import('./model/node').default) => void;
185
- insertAfter: (child: any, ref: import('./model/node').default) => void;
186
- removeChild: (child: import('./model/node').default) => void;
196
+ insertBefore: (child: any, ref: Node) => void;
197
+ insertAfter: (child: any, ref: Node) => void;
198
+ removeChild: (child: Node) => void;
187
199
  removeChildByData: (data: any) => void;
188
200
  expand: (callback?: Function | null, expandParent?: boolean) => void;
189
201
  doCreateChildren: (array: any[], defaultProps?: {}) => void;
@@ -195,6 +207,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
195
207
  updateChildren: () => void;
196
208
  loadData: (callback?: Function, defaultProps?: {}) => void;
197
209
  };
210
+ isVirtual?: (() => boolean) | undefined;
198
211
  key: string;
199
212
  data: any;
200
213
  lazy: boolean;
@@ -207,6 +220,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
207
220
  autoExpandParent: boolean;
208
221
  defaultExpandAll: boolean;
209
222
  filterNodeMethod: Function | null;
223
+ initializeRoot: () => void;
224
+ collapseOtherBranches: (node: Node) => void;
210
225
  filter: (value: any) => void;
211
226
  setData: (newVal: any) => void;
212
227
  getNode: (data: any) => any;
@@ -246,7 +261,316 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
246
261
  };
247
262
  dropIndicator: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
248
263
  treeContainerRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
249
- virtualListRef: import('vue').Ref<any, any>;
264
+ virtualListRef: import('vue').Ref<({
265
+ $: import('vue').ComponentInternalInstance;
266
+ $data: {};
267
+ $props: {
268
+ readonly rows: Node[];
269
+ readonly getRowKey: (node: Node) => string | number;
270
+ readonly showCheckbox?: boolean | undefined;
271
+ readonly renderContent?: Function | undefined;
272
+ readonly deferContent?: boolean | undefined;
273
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
274
+ $attrs: import('vue').Attrs;
275
+ $refs: {
276
+ [x: string]: unknown;
277
+ } & {
278
+ list: ({
279
+ $: import('vue').ComponentInternalInstance;
280
+ $data: {};
281
+ $props: {
282
+ readonly listData?: unknown[] | undefined;
283
+ readonly itemKey?: ((item: unknown) => string | number) | undefined;
284
+ readonly immediateScrollUpdate?: boolean | undefined;
285
+ readonly estimatedItemSize: number;
286
+ readonly estimatedItemSizes?: number[] | undefined;
287
+ readonly bufferScale?: number | undefined;
288
+ readonly height?: string | undefined;
289
+ readonly showLoading?: boolean | undefined;
290
+ readonly "onLoading-change"?: ((value: boolean) => any) | undefined | undefined;
291
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
292
+ $attrs: import('vue').Attrs;
293
+ $refs: {
294
+ [x: string]: unknown;
295
+ } & {
296
+ listRef: HTMLDivElement;
297
+ phantomRef: HTMLDivElement;
298
+ contentRef: HTMLDivElement;
299
+ };
300
+ $slots: Readonly<{
301
+ [name: string]: import('vue').Slot<any> | undefined;
302
+ }>;
303
+ $root: import('vue').ComponentPublicInstance | null;
304
+ $parent: import('vue').ComponentPublicInstance | null;
305
+ $host: Element | null;
306
+ $emit: (event: "loading-change", value: boolean) => void;
307
+ $el: HTMLDivElement;
308
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
309
+ "onLoading-change"?: ((value: boolean) => any) | undefined;
310
+ }>, {
311
+ isIndexVisible: (index: number) => boolean;
312
+ scrollToIndex: (index?: number) => Promise<void>;
313
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
314
+ "loading-change": (value: boolean) => any;
315
+ }, string, {
316
+ listData: unknown[];
317
+ immediateScrollUpdate: boolean;
318
+ estimatedItemSizes: number[];
319
+ bufferScale: number;
320
+ height: string;
321
+ showLoading: boolean;
322
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
323
+ beforeCreate?: (() => void) | (() => void)[];
324
+ created?: (() => void) | (() => void)[];
325
+ beforeMount?: (() => void) | (() => void)[];
326
+ mounted?: (() => void) | (() => void)[];
327
+ beforeUpdate?: (() => void) | (() => void)[];
328
+ updated?: (() => void) | (() => void)[];
329
+ activated?: (() => void) | (() => void)[];
330
+ deactivated?: (() => void) | (() => void)[];
331
+ beforeDestroy?: (() => void) | (() => void)[];
332
+ beforeUnmount?: (() => void) | (() => void)[];
333
+ destroyed?: (() => void) | (() => void)[];
334
+ unmounted?: (() => void) | (() => void)[];
335
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
336
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
337
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
338
+ };
339
+ $forceUpdate: () => void;
340
+ $nextTick: typeof nextTick;
341
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
342
+ } & Readonly<{
343
+ listData: unknown[];
344
+ immediateScrollUpdate: boolean;
345
+ estimatedItemSizes: number[];
346
+ bufferScale: number;
347
+ height: string;
348
+ showLoading: boolean;
349
+ }> & Omit<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
350
+ "onLoading-change"?: ((value: boolean) => any) | undefined;
351
+ }>, "listData" | "immediateScrollUpdate" | "estimatedItemSizes" | "bufferScale" | "height" | "showLoading" | "isIndexVisible" | "scrollToIndex"> & {
352
+ isIndexVisible: (index: number) => boolean;
353
+ scrollToIndex: (index?: number) => Promise<void>;
354
+ } & {} & import('vue').ComponentCustomProperties & {} & {
355
+ $slots: {
356
+ loading?(_: {}): any;
357
+ default?(_: {
358
+ item: {
359
+ item: Record<string, unknown>;
360
+ index: string;
361
+ top: number;
362
+ };
363
+ }): any;
364
+ };
365
+ }) | null;
366
+ };
367
+ $slots: Readonly<{
368
+ [name: string]: import('vue').Slot<any> | undefined;
369
+ }>;
370
+ $root: import('vue').ComponentPublicInstance | null;
371
+ $parent: import('vue').ComponentPublicInstance | null;
372
+ $host: Element | null;
373
+ $emit: (event: string, ...args: any[]) => void;
374
+ $el: any;
375
+ $options: import('vue').ComponentOptionsBase<Readonly<{
376
+ rows: Node[];
377
+ getRowKey: (node: Node) => string | number;
378
+ showCheckbox?: boolean;
379
+ renderContent?: Function;
380
+ deferContent?: boolean;
381
+ }> & Readonly<{}>, {
382
+ isIndexVisible: (index: number) => boolean;
383
+ scrollToIndex: (index: number) => Promise<void> | undefined;
384
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
385
+ beforeCreate?: (() => void) | (() => void)[];
386
+ created?: (() => void) | (() => void)[];
387
+ beforeMount?: (() => void) | (() => void)[];
388
+ mounted?: (() => void) | (() => void)[];
389
+ beforeUpdate?: (() => void) | (() => void)[];
390
+ updated?: (() => void) | (() => void)[];
391
+ activated?: (() => void) | (() => void)[];
392
+ deactivated?: (() => void) | (() => void)[];
393
+ beforeDestroy?: (() => void) | (() => void)[];
394
+ beforeUnmount?: (() => void) | (() => void)[];
395
+ destroyed?: (() => void) | (() => void)[];
396
+ unmounted?: (() => void) | (() => void)[];
397
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
398
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
399
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
400
+ };
401
+ $forceUpdate: () => void;
402
+ $nextTick: typeof nextTick;
403
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
404
+ } & Readonly<{}> & Omit<Readonly<{
405
+ rows: Node[];
406
+ getRowKey: (node: Node) => string | number;
407
+ showCheckbox?: boolean;
408
+ renderContent?: Function;
409
+ deferContent?: boolean;
410
+ }> & Readonly<{}>, "isIndexVisible" | "scrollToIndex"> & {
411
+ isIndexVisible: (index: number) => boolean;
412
+ scrollToIndex: (index: number) => Promise<void> | undefined;
413
+ } & {} & import('vue').ComponentCustomProperties & {} & {
414
+ $slots: {
415
+ 'node-loading'?(_: {}): any;
416
+ };
417
+ }) | undefined, ({
418
+ $: import('vue').ComponentInternalInstance;
419
+ $data: {};
420
+ $props: {
421
+ readonly rows: Node[];
422
+ readonly getRowKey: (node: Node) => string | number;
423
+ readonly showCheckbox?: boolean | undefined;
424
+ readonly renderContent?: Function | undefined;
425
+ readonly deferContent?: boolean | undefined;
426
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
427
+ $attrs: import('vue').Attrs;
428
+ $refs: {
429
+ [x: string]: unknown;
430
+ } & {
431
+ list: ({
432
+ $: import('vue').ComponentInternalInstance;
433
+ $data: {};
434
+ $props: {
435
+ readonly listData?: unknown[] | undefined;
436
+ readonly itemKey?: ((item: unknown) => string | number) | undefined;
437
+ readonly immediateScrollUpdate?: boolean | undefined;
438
+ readonly estimatedItemSize: number;
439
+ readonly estimatedItemSizes?: number[] | undefined;
440
+ readonly bufferScale?: number | undefined;
441
+ readonly height?: string | undefined;
442
+ readonly showLoading?: boolean | undefined;
443
+ readonly "onLoading-change"?: ((value: boolean) => any) | undefined | undefined;
444
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
445
+ $attrs: import('vue').Attrs;
446
+ $refs: {
447
+ [x: string]: unknown;
448
+ } & {
449
+ listRef: HTMLDivElement;
450
+ phantomRef: HTMLDivElement;
451
+ contentRef: HTMLDivElement;
452
+ };
453
+ $slots: Readonly<{
454
+ [name: string]: import('vue').Slot<any> | undefined;
455
+ }>;
456
+ $root: import('vue').ComponentPublicInstance | null;
457
+ $parent: import('vue').ComponentPublicInstance | null;
458
+ $host: Element | null;
459
+ $emit: (event: "loading-change", value: boolean) => void;
460
+ $el: HTMLDivElement;
461
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
462
+ "onLoading-change"?: ((value: boolean) => any) | undefined;
463
+ }>, {
464
+ isIndexVisible: (index: number) => boolean;
465
+ scrollToIndex: (index?: number) => Promise<void>;
466
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
467
+ "loading-change": (value: boolean) => any;
468
+ }, string, {
469
+ listData: unknown[];
470
+ immediateScrollUpdate: boolean;
471
+ estimatedItemSizes: number[];
472
+ bufferScale: number;
473
+ height: string;
474
+ showLoading: boolean;
475
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
476
+ beforeCreate?: (() => void) | (() => void)[];
477
+ created?: (() => void) | (() => void)[];
478
+ beforeMount?: (() => void) | (() => void)[];
479
+ mounted?: (() => void) | (() => void)[];
480
+ beforeUpdate?: (() => void) | (() => void)[];
481
+ updated?: (() => void) | (() => void)[];
482
+ activated?: (() => void) | (() => void)[];
483
+ deactivated?: (() => void) | (() => void)[];
484
+ beforeDestroy?: (() => void) | (() => void)[];
485
+ beforeUnmount?: (() => void) | (() => void)[];
486
+ destroyed?: (() => void) | (() => void)[];
487
+ unmounted?: (() => void) | (() => void)[];
488
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
489
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
490
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
491
+ };
492
+ $forceUpdate: () => void;
493
+ $nextTick: typeof nextTick;
494
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
495
+ } & Readonly<{
496
+ listData: unknown[];
497
+ immediateScrollUpdate: boolean;
498
+ estimatedItemSizes: number[];
499
+ bufferScale: number;
500
+ height: string;
501
+ showLoading: boolean;
502
+ }> & Omit<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
503
+ "onLoading-change"?: ((value: boolean) => any) | undefined;
504
+ }>, "listData" | "immediateScrollUpdate" | "estimatedItemSizes" | "bufferScale" | "height" | "showLoading" | "isIndexVisible" | "scrollToIndex"> & {
505
+ isIndexVisible: (index: number) => boolean;
506
+ scrollToIndex: (index?: number) => Promise<void>;
507
+ } & {} & import('vue').ComponentCustomProperties & {} & {
508
+ $slots: {
509
+ loading?(_: {}): any;
510
+ default?(_: {
511
+ item: {
512
+ item: Record<string, unknown>;
513
+ index: string;
514
+ top: number;
515
+ };
516
+ }): any;
517
+ };
518
+ }) | null;
519
+ };
520
+ $slots: Readonly<{
521
+ [name: string]: import('vue').Slot<any> | undefined;
522
+ }>;
523
+ $root: import('vue').ComponentPublicInstance | null;
524
+ $parent: import('vue').ComponentPublicInstance | null;
525
+ $host: Element | null;
526
+ $emit: (event: string, ...args: any[]) => void;
527
+ $el: any;
528
+ $options: import('vue').ComponentOptionsBase<Readonly<{
529
+ rows: Node[];
530
+ getRowKey: (node: Node) => string | number;
531
+ showCheckbox?: boolean;
532
+ renderContent?: Function;
533
+ deferContent?: boolean;
534
+ }> & Readonly<{}>, {
535
+ isIndexVisible: (index: number) => boolean;
536
+ scrollToIndex: (index: number) => Promise<void> | undefined;
537
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
538
+ beforeCreate?: (() => void) | (() => void)[];
539
+ created?: (() => void) | (() => void)[];
540
+ beforeMount?: (() => void) | (() => void)[];
541
+ mounted?: (() => void) | (() => void)[];
542
+ beforeUpdate?: (() => void) | (() => void)[];
543
+ updated?: (() => void) | (() => void)[];
544
+ activated?: (() => void) | (() => void)[];
545
+ deactivated?: (() => void) | (() => void)[];
546
+ beforeDestroy?: (() => void) | (() => void)[];
547
+ beforeUnmount?: (() => void) | (() => void)[];
548
+ destroyed?: (() => void) | (() => void)[];
549
+ unmounted?: (() => void) | (() => void)[];
550
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
551
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
552
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
553
+ };
554
+ $forceUpdate: () => void;
555
+ $nextTick: typeof nextTick;
556
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
557
+ } & Readonly<{}> & Omit<Readonly<{
558
+ rows: Node[];
559
+ getRowKey: (node: Node) => string | number;
560
+ showCheckbox?: boolean;
561
+ renderContent?: Function;
562
+ deferContent?: boolean;
563
+ }> & Readonly<{}>, "isIndexVisible" | "scrollToIndex"> & {
564
+ isIndexVisible: (index: number) => boolean;
565
+ scrollToIndex: (index: number) => Promise<void> | undefined;
566
+ } & {} & import('vue').ComponentCustomProperties & {} & {
567
+ $slots: {
568
+ 'node-loading'?(_: {}): any;
569
+ };
570
+ }) | undefined>;
571
+ expandedRows: import('vue').ComputedRef<Node[]>;
572
+ shouldDeferContent: () => boolean;
573
+ getRowKey: (node: Node) => any;
250
574
  isEmpty: import('vue').ComputedRef<any>;
251
575
  getNodeKeyFn: (node: any) => any;
252
576
  handleNodeExpand: (nodeData: any, node: any, nodeInstance: any) => void;
@@ -314,11 +638,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
314
638
  default: number;
315
639
  };
316
640
  iconClass: StringConstructor;
317
- /** 开启虚拟滚动(只虚拟化第一层节点)。默认 false,数据量大时传 true */
641
+ /** 已展开且未被过滤的各层节点共用一个虚拟窗口,隐藏或收起的子树仍由模型保存。 */
318
642
  virtual: {
319
643
  type: BooleanConstructor;
320
644
  default: boolean;
321
645
  };
646
+ /**
647
+ * 仅用于有 renderContent 或默认插槽的虚拟树。行、文件名和复选框先显示,
648
+ * 图标、菜单等自定义内容由 VirtualTreeRows 分帧安排,轮到本行时再挂载。
649
+ */
650
+ deferContent: BooleanConstructor;
651
+ /** 虚拟行可读取调用方的数据字段。例如 loadingKey="pending" 对应 data.pending。 */
652
+ loadingKey: StringConstructor;
322
653
  }>> & Readonly<{
323
654
  "onNode-expand"?: ((...args: any[]) => any) | undefined;
324
655
  "onCheck-change"?: ((...args: any[]) => any) | undefined;
@@ -343,6 +674,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
343
674
  renderAfterExpand: boolean;
344
675
  showCheckbox: boolean;
345
676
  draggable: boolean;
677
+ deferContent: boolean;
346
678
  checkStrictly: boolean;
347
679
  defaultExpandAll: boolean;
348
680
  checkOnClickNode: boolean;
@@ -418,69 +750,137 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
418
750
  [key: string]: any;
419
751
  }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
420
752
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
421
- VirtualList: {
422
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
423
- "onLoading-change"?: ((value: boolean) => any) | undefined;
424
- }>, {
753
+ VirtualTreeRows: {
754
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
755
+ rows: Node[];
756
+ getRowKey: (node: Node) => string | number;
757
+ showCheckbox?: boolean;
758
+ renderContent?: Function;
759
+ deferContent?: boolean;
760
+ }> & Readonly<{}>, {
425
761
  isIndexVisible: (index: number) => boolean;
426
- scrollToIndex: (index?: number) => Promise<void>;
427
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
428
- "loading-change": (value: boolean) => any;
429
- }, import('vue').PublicProps, {
430
- listData: unknown[];
431
- estimatedItemSizes: number[];
432
- bufferScale: number;
433
- height: string;
434
- showLoading: boolean;
435
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
436
- listRef: HTMLDivElement;
437
- phantomRef: HTMLDivElement;
438
- contentRef: HTMLDivElement;
439
- }, HTMLDivElement, import('vue').ComponentProvideOptions, {
762
+ scrollToIndex: (index: number) => Promise<void> | undefined;
763
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
764
+ list: ({
765
+ $: import('vue').ComponentInternalInstance;
766
+ $data: {};
767
+ $props: {
768
+ readonly listData?: unknown[] | undefined;
769
+ readonly itemKey?: ((item: unknown) => string | number) | undefined;
770
+ readonly immediateScrollUpdate?: boolean | undefined;
771
+ readonly estimatedItemSize: number;
772
+ readonly estimatedItemSizes?: number[] | undefined;
773
+ readonly bufferScale?: number | undefined;
774
+ readonly height?: string | undefined;
775
+ readonly showLoading?: boolean | undefined;
776
+ readonly "onLoading-change"?: ((value: boolean) => any) | undefined | undefined;
777
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
778
+ $attrs: import('vue').Attrs;
779
+ $refs: {
780
+ [x: string]: unknown;
781
+ } & {
782
+ listRef: HTMLDivElement;
783
+ phantomRef: HTMLDivElement;
784
+ contentRef: HTMLDivElement;
785
+ };
786
+ $slots: Readonly<{
787
+ [name: string]: import('vue').Slot<any> | undefined;
788
+ }>;
789
+ $root: import('vue').ComponentPublicInstance | null;
790
+ $parent: import('vue').ComponentPublicInstance | null;
791
+ $host: Element | null;
792
+ $emit: (event: "loading-change", value: boolean) => void;
793
+ $el: HTMLDivElement;
794
+ $options: import('vue').ComponentOptionsBase<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
795
+ "onLoading-change"?: ((value: boolean) => any) | undefined;
796
+ }>, {
797
+ isIndexVisible: (index: number) => boolean;
798
+ scrollToIndex: (index?: number) => Promise<void>;
799
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
800
+ "loading-change": (value: boolean) => any;
801
+ }, string, {
802
+ listData: unknown[];
803
+ immediateScrollUpdate: boolean;
804
+ estimatedItemSizes: number[];
805
+ bufferScale: number;
806
+ height: string;
807
+ showLoading: boolean;
808
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
809
+ beforeCreate?: (() => void) | (() => void)[];
810
+ created?: (() => void) | (() => void)[];
811
+ beforeMount?: (() => void) | (() => void)[];
812
+ mounted?: (() => void) | (() => void)[];
813
+ beforeUpdate?: (() => void) | (() => void)[];
814
+ updated?: (() => void) | (() => void)[];
815
+ activated?: (() => void) | (() => void)[];
816
+ deactivated?: (() => void) | (() => void)[];
817
+ beforeDestroy?: (() => void) | (() => void)[];
818
+ beforeUnmount?: (() => void) | (() => void)[];
819
+ destroyed?: (() => void) | (() => void)[];
820
+ unmounted?: (() => void) | (() => void)[];
821
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
822
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
823
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
824
+ };
825
+ $forceUpdate: () => void;
826
+ $nextTick: typeof nextTick;
827
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
828
+ } & Readonly<{
829
+ listData: unknown[];
830
+ immediateScrollUpdate: boolean;
831
+ estimatedItemSizes: number[];
832
+ bufferScale: number;
833
+ height: string;
834
+ showLoading: boolean;
835
+ }> & Omit<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
836
+ "onLoading-change"?: ((value: boolean) => any) | undefined;
837
+ }>, "listData" | "immediateScrollUpdate" | "estimatedItemSizes" | "bufferScale" | "height" | "showLoading" | "isIndexVisible" | "scrollToIndex"> & {
838
+ isIndexVisible: (index: number) => boolean;
839
+ scrollToIndex: (index?: number) => Promise<void>;
840
+ } & {} & import('vue').ComponentCustomProperties & {} & {
841
+ $slots: {
842
+ loading?(_: {}): any;
843
+ default?(_: {
844
+ item: {
845
+ item: Record<string, unknown>;
846
+ index: string;
847
+ top: number;
848
+ };
849
+ }): any;
850
+ };
851
+ }) | null;
852
+ }, any, import('vue').ComponentProvideOptions, {
440
853
  P: {};
441
854
  B: {};
442
855
  D: {};
443
856
  C: {};
444
857
  M: {};
445
858
  Defaults: {};
446
- }, Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
447
- "onLoading-change"?: ((value: boolean) => any) | undefined;
448
- }>, {
859
+ }, Readonly<{
860
+ rows: Node[];
861
+ getRowKey: (node: Node) => string | number;
862
+ showCheckbox?: boolean;
863
+ renderContent?: Function;
864
+ deferContent?: boolean;
865
+ }> & Readonly<{}>, {
449
866
  isIndexVisible: (index: number) => boolean;
450
- scrollToIndex: (index?: number) => Promise<void>;
451
- }, {}, {}, {}, {
452
- listData: unknown[];
453
- estimatedItemSizes: number[];
454
- bufferScale: number;
455
- height: string;
456
- showLoading: boolean;
457
- }>;
867
+ scrollToIndex: (index: number) => Promise<void> | undefined;
868
+ }, {}, {}, {}, {}>;
458
869
  __isFragment?: never;
459
870
  __isTeleport?: never;
460
871
  __isSuspense?: never;
461
- } & import('vue').ComponentOptionsBase<Readonly<import('@cw-devops-fe/virtual-list-vue3').VirtualListProps> & Readonly<{
462
- "onLoading-change"?: ((value: boolean) => any) | undefined;
463
- }>, {
872
+ } & import('vue').ComponentOptionsBase<Readonly<{
873
+ rows: Node[];
874
+ getRowKey: (node: Node) => string | number;
875
+ showCheckbox?: boolean;
876
+ renderContent?: Function;
877
+ deferContent?: boolean;
878
+ }> & Readonly<{}>, {
464
879
  isIndexVisible: (index: number) => boolean;
465
- scrollToIndex: (index?: number) => Promise<void>;
466
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
467
- "loading-change": (value: boolean) => any;
468
- }, string, {
469
- listData: unknown[];
470
- estimatedItemSizes: number[];
471
- bufferScale: number;
472
- height: string;
473
- showLoading: boolean;
474
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
880
+ scrollToIndex: (index: number) => Promise<void> | undefined;
881
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
475
882
  $slots: {
476
- loading?(_: {}): any;
477
- default?(_: {
478
- item: {
479
- item: Record<string, unknown>;
480
- index: string;
481
- top: number;
482
- };
483
- }): any;
883
+ 'node-loading'?(_: {}): any;
484
884
  };
485
885
  });
486
886
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;