List.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. import { d as T, R as de, c as V, a8 as ve, w as x, s as C, P as pe, _ as ge } from "./index2.js";
  2. import { createVNode as R, cloneVNode as me, defineComponent as oe, reactive as G, ref as be, watch as F, onUnmounted as Se, onMounted as ne, onBeforeUnmount as le, computed as O, shallowRef as P, toRaw as Me, nextTick as q, onUpdated as Te, watchEffect as ye } from "vue";
  3. import { c as ee } from "./createRef.js";
  4. const j = (e, n) => {
  5. let {
  6. height: r,
  7. offset: o,
  8. prefixCls: i,
  9. onInnerResize: l
  10. } = e, {
  11. slots: f
  12. } = n;
  13. var a;
  14. let d = {}, s = {
  15. display: "flex",
  16. flexDirection: "column"
  17. };
  18. return o !== void 0 && (d = {
  19. height: `${r}px`,
  20. position: "relative",
  21. overflow: "hidden"
  22. }, s = T(T({}, s), {
  23. transform: `translateY(${o}px)`,
  24. position: "absolute",
  25. left: 0,
  26. right: 0,
  27. top: 0
  28. })), R("div", {
  29. style: d
  30. }, [R(de, {
  31. onResize: (v) => {
  32. let {
  33. offsetHeight: h
  34. } = v;
  35. h && l && l();
  36. }
  37. }, {
  38. default: () => [R("div", {
  39. style: s,
  40. class: V({
  41. [`${i}-holder-inner`]: i
  42. })
  43. }, [(a = f.default) === null || a === void 0 ? void 0 : a.call(f)])]
  44. })]);
  45. };
  46. j.displayName = "Filter";
  47. j.inheritAttrs = !1;
  48. j.props = {
  49. prefixCls: String,
  50. /** Virtual filler height. Should be `count * itemMinHeight` */
  51. height: Number,
  52. /** Set offset of visible items. Should be the top of start item position */
  53. offset: Number,
  54. onInnerResize: Function
  55. };
  56. const se = (e, n) => {
  57. let {
  58. setRef: r
  59. } = e, {
  60. slots: o
  61. } = n;
  62. var i;
  63. const l = ve((i = o.default) === null || i === void 0 ? void 0 : i.call(o));
  64. return l && l.length ? me(l[0], {
  65. ref: r
  66. }) : l;
  67. };
  68. se.props = {
  69. setRef: {
  70. type: Function,
  71. default: () => {
  72. }
  73. }
  74. };
  75. const He = 20;
  76. function te(e) {
  77. return "touches" in e ? e.touches[0].pageY : e.pageY;
  78. }
  79. const Re = oe({
  80. compatConfig: {
  81. MODE: 3
  82. },
  83. name: "ScrollBar",
  84. inheritAttrs: !1,
  85. props: {
  86. prefixCls: String,
  87. scrollTop: Number,
  88. scrollHeight: Number,
  89. height: Number,
  90. count: Number,
  91. onScroll: {
  92. type: Function
  93. },
  94. onStartMove: {
  95. type: Function
  96. },
  97. onStopMove: {
  98. type: Function
  99. }
  100. },
  101. setup() {
  102. return {
  103. moveRaf: null,
  104. scrollbarRef: ee(),
  105. thumbRef: ee(),
  106. visibleTimeout: null,
  107. state: G({
  108. dragging: !1,
  109. pageY: null,
  110. startTop: null,
  111. visible: !1
  112. })
  113. };
  114. },
  115. watch: {
  116. scrollTop: {
  117. handler() {
  118. this.delayHidden();
  119. },
  120. flush: "post"
  121. }
  122. },
  123. mounted() {
  124. var e, n;
  125. (e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, C ? {
  126. passive: !1
  127. } : !1), (n = this.thumbRef.current) === null || n === void 0 || n.addEventListener("touchstart", this.onMouseDown, C ? {
  128. passive: !1
  129. } : !1);
  130. },
  131. beforeUnmount() {
  132. this.removeEvents(), clearTimeout(this.visibleTimeout);
  133. },
  134. methods: {
  135. delayHidden() {
  136. clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
  137. this.state.visible = !1;
  138. }, 2e3);
  139. },
  140. onScrollbarTouchStart(e) {
  141. e.preventDefault();
  142. },
  143. onContainerMouseDown(e) {
  144. e.stopPropagation(), e.preventDefault();
  145. },
  146. // ======================= Clean =======================
  147. patchEvents() {
  148. window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, C ? {
  149. passive: !1
  150. } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
  151. },
  152. removeEvents() {
  153. window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, C ? {
  154. passive: !1
  155. } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, C ? {
  156. passive: !1
  157. } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, C ? {
  158. passive: !1
  159. } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), x.cancel(this.moveRaf);
  160. },
  161. // ======================= Thumb =======================
  162. onMouseDown(e) {
  163. const {
  164. onStartMove: n
  165. } = this.$props;
  166. T(this.state, {
  167. dragging: !0,
  168. pageY: te(e),
  169. startTop: this.getTop()
  170. }), n(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
  171. },
  172. onMouseMove(e) {
  173. const {
  174. dragging: n,
  175. pageY: r,
  176. startTop: o
  177. } = this.state, {
  178. onScroll: i
  179. } = this.$props;
  180. if (x.cancel(this.moveRaf), n) {
  181. const l = te(e) - r, f = o + l, a = this.getEnableScrollRange(), d = this.getEnableHeightRange(), s = d ? f / d : 0, v = Math.ceil(s * a);
  182. this.moveRaf = x(() => {
  183. i(v);
  184. });
  185. }
  186. },
  187. onMouseUp() {
  188. const {
  189. onStopMove: e
  190. } = this.$props;
  191. this.state.dragging = !1, e(), this.removeEvents();
  192. },
  193. // ===================== Calculate =====================
  194. getSpinHeight() {
  195. const {
  196. height: e,
  197. scrollHeight: n
  198. } = this.$props;
  199. let r = e / n * 100;
  200. return r = Math.max(r, He), r = Math.min(r, e / 2), Math.floor(r);
  201. },
  202. getEnableScrollRange() {
  203. const {
  204. scrollHeight: e,
  205. height: n
  206. } = this.$props;
  207. return e - n || 0;
  208. },
  209. getEnableHeightRange() {
  210. const {
  211. height: e
  212. } = this.$props, n = this.getSpinHeight();
  213. return e - n || 0;
  214. },
  215. getTop() {
  216. const {
  217. scrollTop: e
  218. } = this.$props, n = this.getEnableScrollRange(), r = this.getEnableHeightRange();
  219. return e === 0 || n === 0 ? 0 : e / n * r;
  220. },
  221. // Not show scrollbar when height is large than scrollHeight
  222. showScroll() {
  223. const {
  224. height: e,
  225. scrollHeight: n
  226. } = this.$props;
  227. return n > e;
  228. }
  229. },
  230. render() {
  231. const {
  232. dragging: e,
  233. visible: n
  234. } = this.state, {
  235. prefixCls: r
  236. } = this.$props, o = this.getSpinHeight() + "px", i = this.getTop() + "px", l = this.showScroll(), f = l && n;
  237. return R("div", {
  238. ref: this.scrollbarRef,
  239. class: V(`${r}-scrollbar`, {
  240. [`${r}-scrollbar-show`]: l
  241. }),
  242. style: {
  243. width: "8px",
  244. top: 0,
  245. bottom: 0,
  246. right: 0,
  247. position: "absolute",
  248. display: f ? void 0 : "none"
  249. },
  250. onMousedown: this.onContainerMouseDown,
  251. onMousemove: this.delayHidden
  252. }, [R("div", {
  253. ref: this.thumbRef,
  254. class: V(`${r}-scrollbar-thumb`, {
  255. [`${r}-scrollbar-thumb-moving`]: e
  256. }),
  257. style: {
  258. width: "100%",
  259. height: o,
  260. top: i,
  261. left: 0,
  262. position: "absolute",
  263. background: "rgba(0, 0, 0, 0.5)",
  264. borderRadius: "99px",
  265. cursor: "pointer",
  266. userSelect: "none"
  267. },
  268. onMousedown: this.onMouseDown
  269. }, null)]);
  270. }
  271. });
  272. function we(e, n, r, o) {
  273. const i = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), f = be(Symbol("update"));
  274. F(e, () => {
  275. f.value = Symbol("update");
  276. });
  277. let a;
  278. function d() {
  279. x.cancel(a);
  280. }
  281. function s() {
  282. d(), a = x(() => {
  283. i.forEach((h, c) => {
  284. if (h && h.offsetParent) {
  285. const {
  286. offsetHeight: p
  287. } = h;
  288. l.get(c) !== p && (f.value = Symbol("update"), l.set(c, h.offsetHeight));
  289. }
  290. });
  291. });
  292. }
  293. function v(h, c) {
  294. const p = n(h);
  295. i.get(p), c ? (i.set(p, c.$el || c), s()) : i.delete(p);
  296. }
  297. return Se(() => {
  298. d();
  299. }), [v, s, l, f];
  300. }
  301. function Ee(e, n, r, o, i, l, f, a) {
  302. let d;
  303. return (s) => {
  304. if (s == null) {
  305. a();
  306. return;
  307. }
  308. x.cancel(d);
  309. const v = n.value, h = o.itemHeight;
  310. if (typeof s == "number")
  311. f(s);
  312. else if (s && typeof s == "object") {
  313. let c;
  314. const {
  315. align: p
  316. } = s;
  317. "index" in s ? {
  318. index: c
  319. } = s : c = v.findIndex((y) => i(y) === s.key);
  320. const {
  321. offset: m = 0
  322. } = s, N = (y, I) => {
  323. if (y < 0 || !e.value) return;
  324. const D = e.value.clientHeight;
  325. let b = !1, M = I;
  326. if (D) {
  327. const _ = I || p;
  328. let k = 0, w = 0, E = 0;
  329. const Y = Math.min(v.length, c);
  330. for (let S = 0; S <= Y; S += 1) {
  331. const U = i(v[S]);
  332. w = k;
  333. const B = r.get(U);
  334. E = w + (B === void 0 ? h : B), k = E, S === c && B === void 0 && (b = !0);
  335. }
  336. const $ = e.value.scrollTop;
  337. let H = null;
  338. switch (_) {
  339. case "top":
  340. H = w - m;
  341. break;
  342. case "bottom":
  343. H = E - D + m;
  344. break;
  345. default: {
  346. const S = $ + D;
  347. w < $ ? M = "top" : E > S && (M = "bottom");
  348. }
  349. }
  350. H !== null && H !== $ && f(H);
  351. }
  352. d = x(() => {
  353. b && l(), N(y - 1, M);
  354. }, 2);
  355. };
  356. N(5);
  357. }
  358. };
  359. }
  360. const xe = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), ie = (e, n) => {
  361. let r = !1, o = null;
  362. function i() {
  363. clearTimeout(o), r = !0, o = setTimeout(() => {
  364. r = !1;
  365. }, 50);
  366. }
  367. return function(l) {
  368. let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  369. const a = (
  370. // Pass origin wheel when on the top
  371. l < 0 && e.value || // Pass origin wheel when on the bottom
  372. l > 0 && n.value
  373. );
  374. return f && a ? (clearTimeout(o), r = !1) : (!a || r) && i(), !r && a;
  375. };
  376. };
  377. function Le(e, n, r, o) {
  378. let i = 0, l = null, f = null, a = !1;
  379. const d = ie(n, r);
  380. function s(h) {
  381. if (!e.value) return;
  382. x.cancel(l);
  383. const {
  384. deltaY: c
  385. } = h;
  386. i += c, f = c, !d(c) && (xe || h.preventDefault(), l = x(() => {
  387. o(i * (a ? 10 : 1)), i = 0;
  388. }));
  389. }
  390. function v(h) {
  391. e.value && (a = h.detail === f);
  392. }
  393. return [s, v];
  394. }
  395. const Ce = 14 / 15;
  396. function Fe(e, n, r) {
  397. let o = !1, i = 0, l = null, f = null;
  398. const a = () => {
  399. l && (l.removeEventListener("touchmove", d), l.removeEventListener("touchend", s));
  400. }, d = (c) => {
  401. if (o) {
  402. const p = Math.ceil(c.touches[0].pageY);
  403. let m = i - p;
  404. i = p, r(m) && c.preventDefault(), clearInterval(f), f = setInterval(() => {
  405. m *= Ce, (!r(m, !0) || Math.abs(m) <= 0.1) && clearInterval(f);
  406. }, 16);
  407. }
  408. }, s = () => {
  409. o = !1, a();
  410. }, v = (c) => {
  411. a(), c.touches.length === 1 && !o && (o = !0, i = Math.ceil(c.touches[0].pageY), l = c.target, l.addEventListener("touchmove", d, {
  412. passive: !1
  413. }), l.addEventListener("touchend", s));
  414. }, h = () => {
  415. };
  416. ne(() => {
  417. document.addEventListener("touchmove", h, {
  418. passive: !1
  419. }), F(e, (c) => {
  420. n.value.removeEventListener("touchstart", v), a(), clearInterval(f), c && n.value.addEventListener("touchstart", v, {
  421. passive: !1
  422. });
  423. }, {
  424. immediate: !0
  425. });
  426. }), le(() => {
  427. document.removeEventListener("touchmove", h);
  428. });
  429. }
  430. var Ie = function(e, n) {
  431. var r = {};
  432. for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (r[o] = e[o]);
  433. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, o = Object.getOwnPropertySymbols(e); i < o.length; i++)
  434. n.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[i]) && (r[o[i]] = e[o[i]]);
  435. return r;
  436. };
  437. const De = [], _e = {
  438. overflowY: "auto",
  439. overflowAnchor: "none"
  440. };
  441. function $e(e, n, r, o, i, l) {
  442. let {
  443. getKey: f
  444. } = l;
  445. return e.slice(n, r + 1).map((a, d) => {
  446. const s = n + d, v = i(a, s, {
  447. // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
  448. }), h = f(a);
  449. return R(se, {
  450. key: h,
  451. setRef: (c) => o(a, c)
  452. }, {
  453. default: () => [v]
  454. });
  455. });
  456. }
  457. const Pe = oe({
  458. compatConfig: {
  459. MODE: 3
  460. },
  461. name: "List",
  462. inheritAttrs: !1,
  463. props: {
  464. prefixCls: String,
  465. data: pe.array,
  466. height: Number,
  467. itemHeight: Number,
  468. /** If not match virtual scroll condition, Set List still use height of container. */
  469. fullHeight: {
  470. type: Boolean,
  471. default: void 0
  472. },
  473. itemKey: {
  474. type: [String, Number, Function],
  475. required: !0
  476. },
  477. component: {
  478. type: [String, Object]
  479. },
  480. /** Set `false` will always use real scroll instead of virtual one */
  481. virtual: {
  482. type: Boolean,
  483. default: void 0
  484. },
  485. children: Function,
  486. onScroll: Function,
  487. onMousedown: Function,
  488. onMouseenter: Function,
  489. onVisibleChange: Function
  490. },
  491. setup(e, n) {
  492. let {
  493. expose: r
  494. } = n;
  495. const o = O(() => {
  496. const {
  497. height: t,
  498. itemHeight: u,
  499. virtual: g
  500. } = e;
  501. return !!(g !== !1 && t && u);
  502. }), i = O(() => {
  503. const {
  504. height: t,
  505. itemHeight: u,
  506. data: g
  507. } = e;
  508. return o.value && g && u * g.length > t;
  509. }), l = G({
  510. scrollTop: 0,
  511. scrollMoving: !1
  512. }), f = O(() => e.data || De), a = P([]);
  513. F(f, () => {
  514. a.value = Me(f.value).slice();
  515. }, {
  516. immediate: !0
  517. });
  518. const d = P((t) => {
  519. });
  520. F(() => e.itemKey, (t) => {
  521. typeof t == "function" ? d.value = t : d.value = (u) => u == null ? void 0 : u[t];
  522. }, {
  523. immediate: !0
  524. });
  525. const s = P(), v = P(), h = P(), c = (t) => d.value(t), p = {
  526. getKey: c
  527. };
  528. function m(t) {
  529. let u;
  530. typeof t == "function" ? u = t(l.scrollTop) : u = t;
  531. const g = k(u);
  532. s.value && (s.value.scrollTop = g), l.scrollTop = g;
  533. }
  534. const [N, y, I, D] = we(a, c), b = G({
  535. scrollHeight: void 0,
  536. start: 0,
  537. end: 0,
  538. offset: void 0
  539. }), M = P(0);
  540. ne(() => {
  541. q(() => {
  542. var t;
  543. M.value = ((t = v.value) === null || t === void 0 ? void 0 : t.offsetHeight) || 0;
  544. });
  545. }), Te(() => {
  546. q(() => {
  547. var t;
  548. M.value = ((t = v.value) === null || t === void 0 ? void 0 : t.offsetHeight) || 0;
  549. });
  550. }), F([o, a], () => {
  551. o.value || T(b, {
  552. scrollHeight: void 0,
  553. start: 0,
  554. end: a.value.length - 1,
  555. offset: void 0
  556. });
  557. }, {
  558. immediate: !0
  559. }), F([o, a, M, i], () => {
  560. o.value && !i.value && T(b, {
  561. scrollHeight: M.value,
  562. start: 0,
  563. end: a.value.length - 1,
  564. offset: void 0
  565. }), s.value && (l.scrollTop = s.value.scrollTop);
  566. }, {
  567. immediate: !0
  568. }), F([i, o, () => l.scrollTop, a, D, () => e.height, M], () => {
  569. if (!o.value || !i.value)
  570. return;
  571. let t = 0, u, g, L;
  572. const z = a.value.length, ce = a.value, J = l.scrollTop, {
  573. itemHeight: Q,
  574. height: X
  575. } = e, ue = J + X;
  576. for (let A = 0; A < z; A += 1) {
  577. const fe = ce[A], he = c(fe);
  578. let K = I.get(he);
  579. K === void 0 && (K = Q);
  580. const W = t + K;
  581. u === void 0 && W >= J && (u = A, g = t), L === void 0 && W > ue && (L = A), t = W;
  582. }
  583. u === void 0 && (u = 0, g = 0, L = Math.ceil(X / Q)), L === void 0 && (L = z - 1), L = Math.min(L + 1, z), T(b, {
  584. scrollHeight: t,
  585. start: u,
  586. end: L,
  587. offset: g
  588. });
  589. }, {
  590. immediate: !0
  591. });
  592. const _ = O(() => b.scrollHeight - e.height);
  593. function k(t) {
  594. let u = t;
  595. return Number.isNaN(_.value) || (u = Math.min(u, _.value)), u = Math.max(u, 0), u;
  596. }
  597. const w = O(() => l.scrollTop <= 0), E = O(() => l.scrollTop >= _.value), Y = ie(w, E);
  598. function $(t) {
  599. m(t);
  600. }
  601. function H(t) {
  602. var u;
  603. const {
  604. scrollTop: g
  605. } = t.currentTarget;
  606. g !== l.scrollTop && m(g), (u = e.onScroll) === null || u === void 0 || u.call(e, t);
  607. }
  608. const [S, U] = Le(o, w, E, (t) => {
  609. m((u) => u + t);
  610. });
  611. Fe(o, s, (t, u) => Y(t, u) ? !1 : (S({
  612. preventDefault() {
  613. },
  614. deltaY: t
  615. }), !0));
  616. function B(t) {
  617. o.value && t.preventDefault();
  618. }
  619. const Z = () => {
  620. s.value && (s.value.removeEventListener("wheel", S, C ? {
  621. passive: !1
  622. } : !1), s.value.removeEventListener("DOMMouseScroll", U), s.value.removeEventListener("MozMousePixelScroll", B));
  623. };
  624. ye(() => {
  625. q(() => {
  626. s.value && (Z(), s.value.addEventListener("wheel", S, C ? {
  627. passive: !1
  628. } : !1), s.value.addEventListener("DOMMouseScroll", U), s.value.addEventListener("MozMousePixelScroll", B));
  629. });
  630. }), le(() => {
  631. Z();
  632. });
  633. const re = Ee(s, a, I, e, c, y, m, () => {
  634. var t;
  635. (t = h.value) === null || t === void 0 || t.delayHidden();
  636. });
  637. r({
  638. scrollTo: re
  639. });
  640. const ae = O(() => {
  641. let t = null;
  642. return e.height && (t = T({
  643. [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
  644. }, _e), o.value && (t.overflowY = "hidden", l.scrollMoving && (t.pointerEvents = "none"))), t;
  645. });
  646. return F([() => b.start, () => b.end, a], () => {
  647. if (e.onVisibleChange) {
  648. const t = a.value.slice(b.start, b.end + 1);
  649. e.onVisibleChange(t, a.value);
  650. }
  651. }, {
  652. flush: "post"
  653. }), {
  654. state: l,
  655. mergedData: a,
  656. componentStyle: ae,
  657. onFallbackScroll: H,
  658. onScrollBar: $,
  659. componentRef: s,
  660. useVirtual: o,
  661. calRes: b,
  662. collectHeight: y,
  663. setInstance: N,
  664. sharedConfig: p,
  665. scrollBarRef: h,
  666. fillerInnerRef: v,
  667. delayHideScrollBar: () => {
  668. var t;
  669. (t = h.value) === null || t === void 0 || t.delayHidden();
  670. }
  671. };
  672. },
  673. render() {
  674. const e = T(T({}, this.$props), this.$attrs), {
  675. prefixCls: n = "rc-virtual-list",
  676. height: r,
  677. itemHeight: o,
  678. // eslint-disable-next-line no-unused-vars
  679. fullHeight: i,
  680. data: l,
  681. itemKey: f,
  682. virtual: a,
  683. component: d = "div",
  684. onScroll: s,
  685. children: v = this.$slots.default,
  686. style: h,
  687. class: c
  688. } = e, p = Ie(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), m = V(n, c), {
  689. scrollTop: N
  690. } = this.state, {
  691. scrollHeight: y,
  692. offset: I,
  693. start: D,
  694. end: b
  695. } = this.calRes, {
  696. componentStyle: M,
  697. onFallbackScroll: _,
  698. onScrollBar: k,
  699. useVirtual: w,
  700. collectHeight: E,
  701. sharedConfig: Y,
  702. setInstance: $,
  703. mergedData: H,
  704. delayHideScrollBar: S
  705. } = this;
  706. return R("div", ge({
  707. style: T(T({}, h), {
  708. position: "relative"
  709. }),
  710. class: m
  711. }, p), [R(d, {
  712. class: `${n}-holder`,
  713. style: M,
  714. ref: "componentRef",
  715. onScroll: _,
  716. onMouseenter: S
  717. }, {
  718. default: () => [R(j, {
  719. prefixCls: n,
  720. height: y,
  721. offset: I,
  722. onInnerResize: E,
  723. ref: "fillerInnerRef"
  724. }, {
  725. default: () => $e(H, D, b, $, v, Y)
  726. })]
  727. }), w && R(Re, {
  728. ref: "scrollBarRef",
  729. prefixCls: n,
  730. scrollTop: N,
  731. height: r,
  732. scrollHeight: y,
  733. count: H.length,
  734. onScroll: k,
  735. onStartMove: () => {
  736. this.state.scrollMoving = !0;
  737. },
  738. onStopMove: () => {
  739. this.state.scrollMoving = !1;
  740. }
  741. }, null)]);
  742. }
  743. });
  744. export {
  745. Pe as L
  746. };