mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 12:07:54 +08:00
feat: update virtuallist
This commit is contained in:
parent
0d34f45895
commit
ab80874fa5
@ -1 +1 @@
|
||||
Subproject commit 83ab203d1ab9861132f6efd1e74015507c0e45f6
|
||||
Subproject commit 955716e4e9533bc628c651d6ba6c8d1eb9b21a9d
|
19
components/vc-virtual-list/utils/CacheMap.js
Normal file
19
components/vc-virtual-list/utils/CacheMap.js
Normal file
@ -0,0 +1,19 @@
|
||||
// Firefox has low performance of map.
|
||||
class CacheMap {
|
||||
maps;
|
||||
|
||||
constructor() {
|
||||
this.maps = {};
|
||||
this.maps.prototype = null;
|
||||
}
|
||||
|
||||
set(key, value) {
|
||||
this.maps[key] = value;
|
||||
}
|
||||
|
||||
get(key) {
|
||||
return this.maps[key];
|
||||
}
|
||||
}
|
||||
|
||||
export default CacheMap;
|
3
components/vc-virtual-list/utils/isFirefox.js
Normal file
3
components/vc-virtual-list/utils/isFirefox.js
Normal file
@ -0,0 +1,3 @@
|
||||
const isFF = typeof navigator === 'object' && /Firefox/i.test(navigator.userAgent);
|
||||
|
||||
export default isFF;
|
Loading…
Reference in New Issue
Block a user