bkui-vue 1.0.3-beta.65.dialog.1 → 1.0.3-beta.66

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.
Files changed (95) hide show
  1. package/dist/index.cjs.js +69 -69
  2. package/dist/index.esm.js +18967 -19760
  3. package/dist/index.umd.js +69 -69
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/checkbox/index.js +4 -4
  7. package/lib/components.d.ts +0 -1
  8. package/lib/components.js +0 -1
  9. package/lib/dialog/dialog.css +77 -139
  10. package/lib/dialog/dialog.d.ts +121 -41
  11. package/lib/dialog/dialog.less +65 -10
  12. package/lib/dialog/dialog.variable.css +77 -139
  13. package/lib/dialog/index.d.ts +272 -105
  14. package/lib/dialog/index.js +100 -91
  15. package/lib/dialog/props.d.ts +48 -8
  16. package/lib/form/index.js +3 -1
  17. package/lib/info-box/index.d.ts +2 -2
  18. package/lib/info-box/index.js +173 -312
  19. package/lib/info-box/info-box.css +7 -63
  20. package/lib/info-box/info-box.d.ts +16 -17
  21. package/lib/info-box/info-box.less +14 -76
  22. package/lib/info-box/info-box.variable.css +7 -63
  23. package/lib/modal/index.d.ts +325 -45
  24. package/lib/modal/index.js +666 -187
  25. package/lib/modal/modal.css +31 -131
  26. package/lib/modal/modal.d.ts +126 -16
  27. package/lib/modal/modal.less +28 -84
  28. package/lib/modal/modal.variable.css +31 -131
  29. package/lib/modal/props.mixin.d.ts +53 -2
  30. package/lib/radio/index.js +5 -5
  31. package/lib/search-select/index.d.ts +54 -10
  32. package/lib/search-select/index.js +119 -63
  33. package/lib/search-select/input.d.ts +8 -4
  34. package/lib/search-select/search-select.d.ts +22 -5
  35. package/lib/search-select/selected.d.ts +11 -3
  36. package/lib/search-select/utils.d.ts +7 -6
  37. package/lib/select/index.d.ts +33 -0
  38. package/lib/select/index.js +5 -2
  39. package/lib/select/select.css +19 -5
  40. package/lib/select/select.d.ts +11 -0
  41. package/lib/select/select.less +26 -6
  42. package/lib/select/select.variable.css +19 -5
  43. package/lib/select/selectTagInput.d.ts +7 -0
  44. package/lib/shared/index.d.ts +1 -0
  45. package/lib/shared/index.js +48 -1
  46. package/lib/shared/mask.d.ts +11 -0
  47. package/lib/sideslider/index.d.ts +222 -31
  48. package/lib/sideslider/index.js +36 -49
  49. package/lib/sideslider/sideslider.css +42 -4
  50. package/lib/sideslider/sideslider.d.ts +105 -14
  51. package/lib/sideslider/sideslider.less +58 -13
  52. package/lib/sideslider/sideslider.variable.css +42 -4
  53. package/lib/table/const.d.ts +1 -1
  54. package/lib/table/index.d.ts +0 -23
  55. package/lib/table/index.js +47 -184
  56. package/lib/table/plugins/use-fixed-column.d.ts +1 -1
  57. package/lib/table/plugins/use-pagination.d.ts +1 -3
  58. package/lib/table/props.d.ts +0 -8
  59. package/lib/table/table.css +42 -97
  60. package/lib/table/table.d.ts +0 -11
  61. package/lib/table/table.less +58 -43
  62. package/lib/table/table.variable.css +42 -97
  63. package/lib/table/use-attributes.d.ts +0 -1
  64. package/lib/table/use-render.d.ts +1 -1
  65. package/lib/table-column/index.js +2 -6
  66. package/lib/tree/index.d.ts +0 -23
  67. package/lib/tree/index.js +3 -9
  68. package/lib/tree/props.d.ts +0 -8
  69. package/lib/tree/tree.css +2 -75
  70. package/lib/tree/tree.d.ts +0 -11
  71. package/lib/tree/tree.variable.css +2 -75
  72. package/lib/virtual-render/index.d.ts +0 -27
  73. package/lib/virtual-render/index.js +63 -264
  74. package/lib/virtual-render/props.d.ts +0 -16
  75. package/lib/virtual-render/use-fix-top.d.ts +7 -2
  76. package/lib/virtual-render/v-virtual-render.d.ts +1 -2
  77. package/lib/virtual-render/virtual-render.css +2 -75
  78. package/lib/virtual-render/virtual-render.d.ts +0 -13
  79. package/lib/virtual-render/virtual-render.less +3 -3
  80. package/lib/virtual-render/virtual-render.variable.css +2 -75
  81. package/package.json +1 -1
  82. package/lib/info-box/render-component.d.ts +0 -4
  83. package/lib/modal/mask.d.ts +0 -6
  84. package/lib/scrollbar/index.d.ts +0 -14
  85. package/lib/scrollbar/index.js +0 -18740
  86. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
  87. package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
  88. package/lib/scrollbar/scrollbar-core/index.d.ts +0 -236
  89. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
  90. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
  91. package/lib/scrollbar/scrollbar.css +0 -74
  92. package/lib/scrollbar/scrollbar.less +0 -93
  93. package/lib/scrollbar/scrollbar.variable.css +0 -203
  94. package/lib/table/plugins/use-shift-key.d.ts +0 -11
  95. package/lib/virtual-render/use-scrollbar.d.ts +0 -23
@@ -124,7 +124,6 @@ declare const BkVirtualRender: {
124
124
  } & {
125
125
  default: boolean;
126
126
  };
127
- scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
128
127
  autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
129
128
  default: boolean;
130
129
  } & {
@@ -133,11 +132,6 @@ declare const BkVirtualRender: {
133
132
  wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
134
133
  default: any;
135
134
  };
136
- autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
137
- default: boolean;
138
- } & {
139
- default: boolean;
140
- };
141
135
  }>> & {
142
136
  [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
143
137
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -267,7 +261,6 @@ declare const BkVirtualRender: {
267
261
  } & {
268
262
  default: boolean;
269
263
  };
270
- scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
271
264
  autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
272
265
  default: boolean;
273
266
  } & {
@@ -276,11 +269,6 @@ declare const BkVirtualRender: {
276
269
  wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
277
270
  default: any;
278
271
  };
279
- autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
280
- default: boolean;
281
- } & {
282
- default: boolean;
283
- };
284
272
  }>> & {
285
273
  [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
286
274
  }, {
@@ -315,7 +303,6 @@ declare const BkVirtualRender: {
315
303
  rowKey: string;
316
304
  keepAlive: boolean;
317
305
  autoReset: boolean;
318
- autoIndex: boolean;
319
306
  }, true, {}, import("vue").SlotsType<{
320
307
  default?: any;
321
308
  beforeContent?: any;
@@ -453,7 +440,6 @@ declare const BkVirtualRender: {
453
440
  } & {
454
441
  default: boolean;
455
442
  };
456
- scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
457
443
  autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
458
444
  default: boolean;
459
445
  } & {
@@ -462,11 +448,6 @@ declare const BkVirtualRender: {
462
448
  wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
463
449
  default: any;
464
450
  };
465
- autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
466
- default: boolean;
467
- } & {
468
- default: boolean;
469
- };
470
451
  }>> & {
471
452
  [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
472
453
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -503,7 +484,6 @@ declare const BkVirtualRender: {
503
484
  rowKey: string;
504
485
  keepAlive: boolean;
505
486
  autoReset: boolean;
506
- autoIndex: boolean;
507
487
  }>;
508
488
  __isFragment?: never;
509
489
  __isTeleport?: never;
@@ -633,7 +613,6 @@ declare const BkVirtualRender: {
633
613
  } & {
634
614
  default: boolean;
635
615
  };
636
- scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
637
616
  autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
638
617
  default: boolean;
639
618
  } & {
@@ -642,11 +621,6 @@ declare const BkVirtualRender: {
642
621
  wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
643
622
  default: any;
644
623
  };
645
- autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
646
- default: boolean;
647
- } & {
648
- default: boolean;
649
- };
650
624
  }>> & {
651
625
  [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
652
626
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -683,7 +657,6 @@ declare const BkVirtualRender: {
683
657
  rowKey: string;
684
658
  keepAlive: boolean;
685
659
  autoReset: boolean;
686
- autoIndex: boolean;
687
660
  }, {}, string, import("vue").SlotsType<{
688
661
  default?: any;
689
662
  beforeContent?: any;
@@ -3,8 +3,6 @@ import "./virtual-render.less";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
6
- import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
7
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_scrollbar_918447d0__ from "../scrollbar";
8
6
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
9
7
  /******/ // The require scope
10
8
  /******/ var __webpack_require__ = {};
@@ -124,15 +122,11 @@ function _defineProperty(obj, key, value) {
124
122
  ;// CONCATENATED MODULE: external "vue"
125
123
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
126
124
  var external_vue_y = x => () => x
127
- const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watchEffect"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect });
125
+ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
128
126
  ;// CONCATENATED MODULE: external "../config-provider"
129
127
  var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
130
128
  var config_provider_y = x => () => x
131
129
  const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
132
- ;// CONCATENATED MODULE: external "vue-types"
133
- var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
134
- var external_vue_types_y = x => () => x
135
- const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
136
130
  ;// CONCATENATED MODULE: ../../packages/virtual-render/src/props.ts
137
131
 
138
132
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -163,7 +157,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
163
157
  * IN THE SOFTWARE.
164
158
  */
165
159
 
166
-
167
160
  var EventProps = {
168
161
  onContentScroll: Function
169
162
  };
@@ -248,52 +241,23 @@ var virtualRenderProps = _objectSpread({
248
241
  * 保持滚动条位置、当前渲染区间
249
242
  */
250
243
  keepAlive: shared_namespaceObject.PropTypes.bool.def(false),
251
- /**
252
- * 是否允许滚动条改变原有DOM结构
253
- */
254
- scrollbar: (0,external_vue_types_namespaceObject.toType)('IScrollbarOption', {
255
- "default": {
256
- enabled: true
257
- }
258
- }),
259
244
  /**
260
245
  * 数据监听改变时,是否自动重置位置到[0, 0]
261
246
  */
262
247
  autoReset: shared_namespaceObject.PropTypes.bool.def(true),
263
- wrapperStyle: shared_namespaceObject.PropTypes.any.def({}),
264
- /**
265
- * 传入数据如果没有设置rowKey,是否自动生成$index作为唯一ID
266
- * $index的值默认为index
267
- */
268
- autoIndex: shared_namespaceObject.PropTypes.bool.def(true)
248
+ wrapperStyle: shared_namespaceObject.PropTypes.any.def({})
269
249
  }, EventProps);
270
250
  ;// CONCATENATED MODULE: ../../packages/virtual-render/src/use-fix-top.tsx
271
- /*
272
- * Tencent is pleased to support the open source community by making
273
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
274
- *
275
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
276
- *
277
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
278
- *
279
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
280
- *
281
- * ---------------------------------------------------
282
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
283
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
284
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
285
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
286
- *
287
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
288
- * the Software.
289
- *
290
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
291
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
292
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
293
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
294
- * IN THE SOFTWARE.
295
- */
296
- /* harmony default export */ const use_fix_top = (function (props, scrollTo) {
251
+ /* harmony default export */ const use_fix_top = (function (props, refRoot) {
252
+ var scrollTo = function scrollTo() {
253
+ var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
254
+ left: 0,
255
+ top: 0
256
+ };
257
+ var left = option.left,
258
+ top = option.top;
259
+ refRoot.value.scrollTo(left, top);
260
+ };
297
261
  /**
298
262
  * 指定元素滚动到顶部
299
263
  * @param param0
@@ -318,91 +282,15 @@ var virtualRenderProps = _objectSpread({
318
282
  if (typeof targetIndex === 'number') {
319
283
  var resolvedIndex = targetIndex >= 0 ? targetIndex : 0;
320
284
  var offsetY = resolvedIndex * props.lineHeight;
321
- scrollTo(0, offsetY);
322
- }
323
- return null;
324
- };
325
- return {
326
- fixToTop: fixToTop
327
- };
328
- });
329
- ;// CONCATENATED MODULE: external "../scrollbar"
330
- var scrollbar_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
331
- var scrollbar_y = x => () => x
332
- const scrollbar_namespaceObject = scrollbar_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_scrollbar_918447d0__["default"] });
333
- ;// CONCATENATED MODULE: ../../packages/virtual-render/src/use-scrollbar.tsx
334
- /*
335
- * Tencent is pleased to support the open source community by making
336
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
337
- *
338
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
339
- *
340
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
341
- *
342
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
343
- *
344
- * ---------------------------------------------------
345
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
346
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
347
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
348
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
349
- *
350
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
351
- * the Software.
352
- *
353
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
354
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
355
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
356
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
357
- * IN THE SOFTWARE.
358
- */
359
-
360
-
361
- /* harmony default export */ const use_scrollbar = (function (target, props) {
362
- var instance = null;
363
- var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
364
- resolveClassName = _usePrefix.resolveClassName;
365
- var classNames = {
366
- contentEl: resolveClassName('scrollbar-content-el'),
367
- wrapper: resolveClassName('scrollbar-wrapper'),
368
- scrollbar: resolveClassName('scrollbar'),
369
- track: resolveClassName('scrollbar-track'),
370
- visible: resolveClassName('scrollbar-visible'),
371
- horizontal: resolveClassName('scrollbar-horizontal'),
372
- vertical: resolveClassName('scrollbar-vertical'),
373
- hover: resolveClassName('scrollbar-hover'),
374
- dragging: resolveClassName('scrollbar-dragging'),
375
- scrolling: resolveClassName('scrollbar-scrolling'),
376
- scrollable: resolveClassName('scrollbar-scrollable'),
377
- mouseEntered: resolveClassName('scrollbar-mouse-entered')
378
- };
379
- var init = function init(scrollFn, delegateXContent, delegateYContent) {
380
- instance = new scrollbar_namespaceObject["default"](target.value, {
381
- classNames: classNames,
382
- wrapperNode: target.value,
383
- useSystemScrollYBehavior: !props.enabled,
384
- useSystemScrollXBehavior: true,
385
- delegateXContent: delegateXContent,
386
- delegateYContent: delegateYContent,
387
- onScrollCallback: scrollFn
388
- });
389
- };
390
- var scrollTo = function scrollTo(x, y) {
391
- var _props$scrollbar;
392
- if ((_props$scrollbar = props.scrollbar) !== null && _props$scrollbar !== void 0 && _props$scrollbar.enabled) {
393
- instance.scrollTo({
394
- left: x,
395
- top: y
285
+ scrollTo({
286
+ left: 0,
287
+ top: offsetY
396
288
  });
397
- return;
398
289
  }
399
- target.value.scrollTo(x, y);
400
290
  };
401
291
  return {
402
- init: init,
403
- instance: instance,
404
- scrollTo: scrollTo,
405
- classNames: classNames
292
+ fixToTop: fixToTop,
293
+ scrollTo: scrollTo
406
294
  };
407
295
  });
408
296
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
@@ -437,7 +325,6 @@ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTER
437
325
  ;// CONCATENATED MODULE: ../../packages/virtual-render/src/v-virtual-render.ts
438
326
 
439
327
 
440
-
441
328
  /*
442
329
  * Tencent is pleased to support the open source community by making
443
330
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
@@ -488,14 +375,14 @@ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
488
375
  diffHeight: diffHeight
489
376
  };
490
377
  }
491
- function computedVirtualIndex(lineHeight, callback, pagination, wrapper, event) {
492
- if (!wrapper || !event.offset) {
378
+ function computedVirtualIndex(lineHeight, callback, pagination, _el, event) {
379
+ if (!event.target) {
493
380
  return;
494
381
  }
495
- var elScrollTop = event.offset.y;
496
- var elScrollLeft = event.offset.x;
497
- var elScrollHeight = wrapper.scrollHeight;
498
- var elOffsetHeight = wrapper.offsetHeight;
382
+ var elScrollTop = event.target.scrollTop;
383
+ var elScrollLeft = event.target.scrollLeft;
384
+ var elScrollHeight = event.target.scrollHeight;
385
+ var elOffsetHeight = event.target.offsetHeight;
499
386
  var count = pagination.count,
500
387
  groupItemCount = pagination.groupItemCount;
501
388
  var targetStartIndex = 0;
@@ -515,8 +402,7 @@ function computedVirtualIndex(lineHeight, callback, pagination, wrapper, event)
515
402
  }
516
403
  var bottom = elScrollHeight - elOffsetHeight - elScrollTop;
517
404
  typeof callback === 'function' && callback(event, targetStartIndex, targetEndIndex, elScrollTop, translateY, elScrollLeft, {
518
- bottom: bottom >= 0 ? bottom : 0,
519
- scrollbar: event
405
+ bottom: bottom >= 0 ? bottom : 0
520
406
  });
521
407
  return {
522
408
  targetStartIndex: targetStartIndex,
@@ -528,33 +414,7 @@ function computedVirtualIndex(lineHeight, callback, pagination, wrapper, event)
528
414
  }
529
415
  var VisibleRender = /*#__PURE__*/function () {
530
416
  function VisibleRender(binding, el) {
531
- var _this = this;
532
417
  _classCallCheck(this, VisibleRender);
533
- _defineProperty(this, "getEvent", function (event) {
534
- var _this$binding$value$s = _this.binding.value.scrollbar,
535
- scrollbar = _this$binding$value$s === void 0 ? {
536
- enabled: false
537
- } : _this$binding$value$s;
538
- if (scrollbar.enabled) {
539
- var _event$offset;
540
- return {
541
- offset: (_event$offset = event.offset) !== null && _event$offset !== void 0 ? _event$offset : event
542
- };
543
- }
544
- if (event !== null && event !== void 0 && event.offset) {
545
- return {
546
- offset: event === null || event === void 0 ? void 0 : event.offset
547
- };
548
- }
549
- var elScrollTop = event.target.scrollTop;
550
- var elScrollLeft = event.target.scrollLeft;
551
- return {
552
- offset: {
553
- x: elScrollLeft,
554
- y: elScrollTop
555
- }
556
- };
557
- });
558
418
  this.binding = binding;
559
419
  this.wrapper = el;
560
420
  var throttleDelay = binding.value.throttleDelay;
@@ -571,13 +431,11 @@ var VisibleRender = /*#__PURE__*/function () {
571
431
  pagination = _this$binding$value$p === void 0 ? {} : _this$binding$value$p,
572
432
  onlyScroll = _this$binding$value.onlyScroll;
573
433
  if (onlyScroll) {
574
- var _e$offset, _e$offset$x, _e$offset2;
575
- var elScrollTop = (_e$offset = e.offset) === null || _e$offset === void 0 ? void 0 : _e$offset.y;
576
- var elScrollLeft = (_e$offset$x = (_e$offset2 = e.offset) === null || _e$offset2 === void 0 ? void 0 : _e$offset2.x) !== null && _e$offset$x !== void 0 ? _e$offset$x : 0;
577
- var bottom = this.wrapper.scrollHeight - this.wrapper.offsetHeight - elScrollTop;
434
+ var elScrollTop = this.wrapper.scrollTop;
435
+ var elScrollLeft = this.wrapper.scrollLeft;
436
+ var bottom = this.wrapper.scrollHeight - this.wrapper.offsetHeight - this.wrapper.scrollTop;
578
437
  handleScrollCallback(e, null, null, elScrollTop, elScrollTop, elScrollLeft, {
579
- bottom: bottom >= 0 ? bottom : 0,
580
- scrollbar: e
438
+ bottom: bottom >= 0 ? bottom : 0
581
439
  });
582
440
  return;
583
441
  }
@@ -599,7 +457,7 @@ var VisibleRender = /*#__PURE__*/function () {
599
457
  }, {
600
458
  key: "executeThrottledRender",
601
459
  value: function executeThrottledRender(e) {
602
- (0,throttle_namespaceObject["default"])(this.render.bind(this), this.delay)(this.getEvent(e));
460
+ (0,throttle_namespaceObject["default"])(this.render.bind(this), this.delay)(e);
603
461
  }
604
462
  }, {
605
463
  key: "install",
@@ -674,46 +532,28 @@ function use_tag_render_objectSpread(e) { for (var r = 1; r < arguments.length;
674
532
 
675
533
 
676
534
 
677
-
678
535
  /* harmony default export */ const use_tag_render = (function (props, ctx) {
679
536
  var renderAs = props.renderAs,
680
537
  contentAs = props.contentAs;
681
- var refRoot = (0,external_vue_namespaceObject.ref)(null);
682
- var _useScrollbar = use_scrollbar(refRoot, props),
683
- init = _useScrollbar.init,
684
- scrollTo = _useScrollbar.scrollTo,
685
- classNames = _useScrollbar.classNames;
686
- var contentStyle = (0,external_vue_namespaceObject.reactive)({
687
- x: 0,
688
- y: 0
689
- });
690
- var computedStyle = (0,external_vue_namespaceObject.computed)(function () {
691
- return use_tag_render_objectSpread({}, props.contentStyle);
692
- });
693
538
  /** 指令触发Scroll事件,计算当前startIndex & endIndex & scrollTop & translateY */
694
539
  var handleScrollCallback = function handleScrollCallback(event, _startIndex, _endIndex, _scrollTop, translateY, scrollLeft, pos) {
695
- var scrollbar = pos.scrollbar;
696
- if (scrollbar !== null && scrollbar !== void 0 && scrollbar.offset) {
697
- var _scrollbar$offset;
698
- Object.assign(contentStyle, (_scrollbar$offset = scrollbar === null || scrollbar === void 0 ? void 0 : scrollbar.offset) !== null && _scrollbar$offset !== void 0 ? _scrollbar$offset : {});
699
- }
700
540
  ctx.emit('content-scroll', [event, {
701
541
  translateY: translateY,
702
542
  translateX: scrollLeft,
703
543
  pos: pos
704
544
  }]);
705
545
  };
706
- var renderInstance = null;
546
+ var instance = null;
707
547
  var binding = (0,external_vue_namespaceObject.computed)(function () {
708
548
  return {
709
549
  lineHeight: props.lineHeight,
710
- scrollbar: props.scrollbar,
711
550
  handleScrollCallback: handleScrollCallback,
712
551
  pagination: {},
713
552
  throttleDelay: props.throttleDelay,
714
553
  onlyScroll: props.scrollEvent
715
554
  };
716
555
  });
556
+ var refRoot = (0,external_vue_namespaceObject.ref)(null);
717
557
  /** 虚拟渲染外层容器样式 */
718
558
  var wrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
719
559
  var _props$maxHeight;
@@ -725,36 +565,20 @@ function use_tag_render_objectSpread(e) { for (var r = 1; r < arguments.length;
725
565
  maxHeight: (_props$maxHeight = props.maxHeight) !== null && _props$maxHeight !== void 0 ? _props$maxHeight : height
726
566
  }, props.wrapperStyle);
727
567
  });
728
- var _useFixTop = use_fix_top(props, scrollTo),
568
+ var _useFixTop = use_fix_top(props, refRoot),
569
+ scrollTo = _useFixTop.scrollTo,
729
570
  fixToTop = _useFixTop.fixToTop;
730
571
  ctx.expose({
731
572
  scrollTo: scrollTo,
732
573
  fixToTop: fixToTop
733
574
  });
734
575
  (0,external_vue_namespaceObject.onMounted)(function () {
735
- var _props$scrollbar;
736
- renderInstance = new VisibleRender(binding, refRoot.value);
737
- if ((_props$scrollbar = props.scrollbar) !== null && _props$scrollbar !== void 0 && _props$scrollbar.enabled) {
738
- init(renderInstance.executeThrottledRender.bind(renderInstance));
739
- return;
740
- }
741
- renderInstance.install();
576
+ instance = new VisibleRender(binding, refRoot.value);
577
+ instance.install();
742
578
  });
743
579
  (0,external_vue_namespaceObject.onUnmounted)(function () {
744
- var _renderInstance;
745
- (_renderInstance = renderInstance) === null || _renderInstance === void 0 || _renderInstance.uninstall();
746
- });
747
- var wrapperClassNames = (0,external_vue_namespaceObject.computed)(function () {
748
- if (props.scrollbar.enabled) {
749
- return [props.className, classNames.wrapper];
750
- }
751
- return [props.className];
752
- });
753
- var contentClassNames = (0,external_vue_namespaceObject.computed)(function () {
754
- if (props.scrollbar.enabled) {
755
- return [props.contentClassName, classNames.contentEl];
756
- }
757
- return [props.contentClassName];
580
+ var _instance;
581
+ (_instance = instance) === null || _instance === void 0 || _instance.uninstall();
758
582
  });
759
583
  return {
760
584
  rendAsTag: function rendAsTag() {
@@ -762,12 +586,12 @@ function use_tag_render_objectSpread(e) { for (var r = 1; r < arguments.length;
762
586
  return (0,external_vue_namespaceObject.h)(
763
587
  // @ts-ignore:next-line
764
588
  renderAs, {
765
- "class": wrapperClassNames.value,
589
+ "class": props.className,
766
590
  style: wrapperStyle.value,
767
591
  ref: refRoot
768
592
  }, [(_ctx$slots$beforeCont = (_ctx$slots$beforeCont2 = (_ctx$slots = ctx.slots).beforeContent) === null || _ctx$slots$beforeCont2 === void 0 ? void 0 : _ctx$slots$beforeCont2.call(_ctx$slots)) !== null && _ctx$slots$beforeCont !== void 0 ? _ctx$slots$beforeCont : '', (0,external_vue_namespaceObject.h)(contentAs, {
769
- "class": contentClassNames.value,
770
- style: computedStyle.value
593
+ "class": props.contentClassName,
594
+ style: props.contentStyle
771
595
  }, [(_ctx$slots$default = (_ctx$slots$default2 = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default2 === void 0 ? void 0 : _ctx$slots$default2.call(_ctx$slots2, {
772
596
  data: props.list
773
597
  })) !== null && _ctx$slots$default !== void 0 ? _ctx$slots$default : '']), (_ctx$slots$afterConte = (_ctx$slots$afterConte2 = (_ctx$slots3 = ctx.slots).afterContent) === null || _ctx$slots$afterConte2 === void 0 ? void 0 : _ctx$slots$afterConte2.call(_ctx$slots3)) !== null && _ctx$slots$afterConte !== void 0 ? _ctx$slots$afterConte : '', (_ctx$slots$afterSecti = (_ctx$slots$afterSecti2 = (_ctx$slots4 = ctx.slots).afterSection) === null || _ctx$slots$afterSecti2 === void 0 ? void 0 : _ctx$slots$afterSecti2.call(_ctx$slots4)) !== null && _ctx$slots$afterSecti !== void 0 ? _ctx$slots$afterSecti : '']);
@@ -816,7 +640,6 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
816
640
 
817
641
 
818
642
 
819
-
820
643
  /* harmony default export */ const virtual_render = ((0,external_vue_namespaceObject.defineComponent)({
821
644
  name: 'VirtualRender',
822
645
  directives: {
@@ -848,17 +671,10 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
848
671
  lineHeight: props.lineHeight,
849
672
  handleScrollCallback: handleScrollCallback,
850
673
  pagination: pagination,
851
- throttleDelay: props.throttleDelay,
852
- scrollbar: props.scrollbar
674
+ throttleDelay: props.throttleDelay
853
675
  };
854
676
  });
855
677
  var refRoot = (0,external_vue_namespaceObject.ref)(null);
856
- var refVirtualSection = (0,external_vue_namespaceObject.ref)(null);
857
- var refContent = (0,external_vue_namespaceObject.ref)(null);
858
- var _useScrollbar = use_scrollbar(refRoot, props),
859
- init = _useScrollbar.init,
860
- scrollTo = _useScrollbar.scrollTo,
861
- classNames = _useScrollbar.classNames;
862
678
  var instance = null;
863
679
  var pagination = (0,external_vue_namespaceObject.reactive)({
864
680
  startIndex: 0,
@@ -888,30 +704,20 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
888
704
  var end = (pagination.endIndex + props.preloadItemCount) * props.groupItemCount;
889
705
  var total = localList.value.length;
890
706
  if (total < end) {
707
+ var contentLength = end - start;
891
708
  calcList.value = localList.value.slice(start, total);
892
- end = total;
893
- start = end - Math.floor(refContent.value.offsetHeight / props.lineHeight);
709
+ end = total + 1;
710
+ start = end - contentLength;
894
711
  start = start < 0 ? 0 : start;
895
712
  }
896
- var value = localList.value.slice(start, end);
713
+ var value = localList.value.slice(start, end + 10);
897
714
  calcList.value = value;
898
715
  if (event) {
899
716
  ctx.emit('content-scroll', [event, pagination]);
900
717
  }
901
718
  };
902
719
  (0,external_vue_namespaceObject.onMounted)(function () {
903
- var _props$scrollbar;
904
720
  instance = new VisibleRender(binding, refRoot.value);
905
- if ((_props$scrollbar = props.scrollbar) !== null && _props$scrollbar !== void 0 && _props$scrollbar.enabled) {
906
- init(instance.executeThrottledRender.bind(instance), null, refVirtualSection.value);
907
- instance.executeThrottledRender.call(instance, {
908
- offset: {
909
- x: 0,
910
- y: 0
911
- }
912
- });
913
- return;
914
- }
915
721
  instance.install();
916
722
  });
917
723
  (0,external_vue_namespaceObject.onUnmounted)(function () {
@@ -964,7 +770,7 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
964
770
  };
965
771
  /** 映射传入的数组为新的数组,增加 $index属性,用来处理唯一Index */
966
772
  var localList = (0,external_vue_namespaceObject.computed)(function () {
967
- if (props.rowKey !== undefined || !props.autoIndex) {
773
+ if (props.rowKey !== undefined) {
968
774
  return props.list;
969
775
  }
970
776
  return (props.list || []).map(function (item, index) {
@@ -975,7 +781,10 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
975
781
  });
976
782
  /** 展示列表内容区域样式 */
977
783
  var innerContentStyle = (0,external_vue_namespaceObject.computed)(function () {
978
- return props.scrollPosition === 'content' ? {} : {};
784
+ return props.scrollPosition === 'content' ? {
785
+ top: "".concat(pagination.scrollTop + props.scrollOffsetTop, "px"),
786
+ transform: "translateY(-".concat(pagination.translateY, "px)")
787
+ } : {};
979
788
  });
980
789
  /** 虚拟渲染外层容器样式 */
981
790
  var wrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
@@ -1000,7 +809,7 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
1000
809
  resolveClassName = _usePrefix.resolveClassName;
1001
810
  /** 外层样式列表 */
1002
811
  var wrapperClass = (0,external_vue_namespaceObject.computed)(function () {
1003
- return [resolveClassName('virtual-render')].concat(_toConsumableArray(resolvePropClassName(props.className)), [props.scrollPosition === 'container' ? resolveClassName('virtual-content') : '']);
812
+ return [resolveClassName('virtual-render'), props.scrollXName, props.scrollYName].concat(_toConsumableArray(resolvePropClassName(props.className)), [props.scrollPosition === 'container' ? resolveClassName('virtual-content') : '']);
1004
813
  });
1005
814
  /** 内容区域样式列表 */
1006
815
  var innerClass = (0,external_vue_namespaceObject.computed)(function () {
@@ -1011,32 +820,24 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
1011
820
  * @param keepLastPostion
1012
821
  */
1013
822
  var reset = function reset() {
1014
- var _instance2;
1015
823
  handleChangeListConfig();
1016
824
  afterListDataReset();
1017
- (_instance2 = instance) === null || _instance2 === void 0 || _instance2.executeThrottledRender.call(instance, {
1018
- offset: {
1019
- x: 0,
1020
- y: 0
1021
- }
1022
- });
1023
825
  };
1024
- var _useFixTop = use_fix_top(props, scrollTo),
826
+ var _useFixTop = use_fix_top(props, refRoot),
827
+ scrollTo = _useFixTop.scrollTo,
1025
828
  fixToTop = _useFixTop.fixToTop;
1026
- (0,external_vue_namespaceObject.watchEffect)(function () {
1027
- var _instance3;
1028
- (_instance3 = instance) === null || _instance3 === void 0 || _instance3.setBinding(binding);
829
+ (0,external_vue_namespaceObject.watch)(function () {
830
+ return [props.lineHeight, props.height, props.list, props.maxHeight];
831
+ }, function () {
832
+ var _instance2;
833
+ (_instance2 = instance) === null || _instance2 === void 0 || _instance2.setBinding(binding);
1029
834
  handleChangeListConfig();
1030
835
  (0,external_vue_namespaceObject.nextTick)(function () {
1031
- var _instance4;
1032
836
  afterListDataReset();
1033
- (_instance4 = instance) === null || _instance4 === void 0 || _instance4.executeThrottledRender.call(instance, {
1034
- offset: {
1035
- x: pagination.scrollLeft,
1036
- y: pagination.scrollTop
1037
- }
1038
- });
1039
837
  });
838
+ }, {
839
+ deep: true,
840
+ immediate: true
1040
841
  });
1041
842
  ctx.expose({
1042
843
  reset: reset,
@@ -1049,16 +850,14 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
1049
850
  // @ts-ignore:next-line
1050
851
  renderAs || 'div', {
1051
852
  ref: refRoot,
1052
- "class": [].concat(_toConsumableArray(wrapperClass.value), [classNames.wrapper]),
853
+ "class": wrapperClass.value,
1053
854
  style: wrapperStyle.value
1054
855
  }, [(_ctx$slots$beforeCont = (_ctx$slots$beforeCont2 = (_ctx$slots = ctx.slots).beforeContent) === null || _ctx$slots$beforeCont2 === void 0 ? void 0 : _ctx$slots$beforeCont2.call(_ctx$slots)) !== null && _ctx$slots$beforeCont !== void 0 ? _ctx$slots$beforeCont : '', (0,external_vue_namespaceObject.h)(contentAs || 'div', {
1055
- ref: refContent,
1056
- "class": [].concat(_toConsumableArray(innerClass.value), [classNames.contentEl]),
856
+ "class": innerClass.value,
1057
857
  style: virtual_render_objectSpread(virtual_render_objectSpread({}, innerContentStyle.value), props.contentStyle)
1058
858
  }, [(_ctx$slots$default = (_ctx$slots$default2 = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default2 === void 0 ? void 0 : _ctx$slots$default2.call(_ctx$slots2, {
1059
859
  data: calcList.value
1060
860
  })) !== null && _ctx$slots$default !== void 0 ? _ctx$slots$default : '']), (_ctx$slots$afterConte = (_ctx$slots$afterConte2 = (_ctx$slots3 = ctx.slots).afterContent) === null || _ctx$slots$afterConte2 === void 0 ? void 0 : _ctx$slots$afterConte2.call(_ctx$slots3)) !== null && _ctx$slots$afterConte !== void 0 ? _ctx$slots$afterConte : '', (0,external_vue_namespaceObject.h)('div', {
1061
- ref: refVirtualSection,
1062
861
  "class": [resolveClassName('virtual-section')],
1063
862
  style: innerStyle.value
1064
863
  }), (_ctx$slots$afterSecti = (_ctx$slots$afterSecti2 = (_ctx$slots4 = ctx.slots).afterSection) === null || _ctx$slots$afterSecti2 === void 0 ? void 0 : _ctx$slots$afterSecti2.call(_ctx$slots4)) !== null && _ctx$slots$afterSecti !== void 0 ? _ctx$slots$afterSecti : '']);