Select V2 虚拟列表选择器
在某些使用情况下,单个选择器可能最终加载数万行数据。 将这么多的数据渲染至 DOM 中可能会给浏览器带来负担,从而造成性能问题。
基础用法
TIP
当前这个组件貌似有点问题
所以不放置demo了
配置选项
SelectV2
完全继承了 ElSelectV2
的属性 您可以从下面的链接里找到相关文档
typescript
声明
/**
* select props
*/
type VSelectV2Props = VueProps<typeof ElSelectV2>
/**
* select
*/
export interface VSelectV2Item<T extends object, Key extends DeepKey<T> = DeepKey<T>> extends VBaseItem<T, Key> {
/**
* props
*/
props?: VPropDef<T, VSelectV2Props>
slots?: {
/**
* slot for render option
* 自定义 Option 模板
*/
default?: (option: any, index: number) => JSX.Element | JSX.Element[] | string
prefix?: () => JSX.Element | JSX.Element[] | string
empty?: () => JSX.Element | JSX.Element[] | string
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26