bkui-vue 0.0.1-beta.15 → 0.0.1-beta.16

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 (80) hide show
  1. package/dist/bkui-vue.cjs.js +51 -25
  2. package/dist/bkui-vue.esm.js +51 -25
  3. package/dist/bkui-vue.umd.js +51 -25
  4. package/lib/alert/index.js +1 -1
  5. package/lib/backtop/index.js +1 -1
  6. package/lib/breadcrumb/index.js +1 -1
  7. package/lib/collapse/index.js +1 -1
  8. package/lib/date-picker/index.js +1 -1
  9. package/lib/dialog/dialog.d.ts +3 -3
  10. package/lib/dialog/index.d.ts +7 -7
  11. package/lib/icon/angle-double-left.js +15 -0
  12. package/lib/icon/angle-double-right.js +15 -0
  13. package/lib/icon/angle-down-fill.js +15 -0
  14. package/lib/icon/angle-down-line.js +15 -0
  15. package/lib/icon/angle-down.js +15 -0
  16. package/lib/icon/angle-left.js +15 -0
  17. package/lib/icon/angle-right.js +15 -0
  18. package/lib/icon/angle-up-fill.js +15 -0
  19. package/lib/icon/angle-up.js +15 -0
  20. package/lib/icon/arrows-left.js +15 -0
  21. package/lib/icon/circle.js +15 -0
  22. package/lib/icon/close.js +15 -0
  23. package/lib/icon/code.js +15 -0
  24. package/lib/icon/cog-shape.js +15 -0
  25. package/lib/icon/collapse-left.js +15 -0
  26. package/lib/icon/copy.js +15 -0
  27. package/lib/icon/done.js +15 -0
  28. package/lib/icon/down-shape.js +15 -0
  29. package/lib/icon/down-small.js +15 -0
  30. package/lib/icon/error.js +15 -0
  31. package/lib/icon/eye.js +15 -0
  32. package/lib/icon/folder-open.js +15 -0
  33. package/lib/icon/folder-shape-open.js +15 -0
  34. package/lib/icon/folder-shape.js +15 -0
  35. package/lib/icon/folder.js +15 -0
  36. package/lib/icon/help-document-fill.js +15 -0
  37. package/lib/icon/help-fill.js +15 -0
  38. package/lib/icon/help.js +15 -0
  39. package/lib/icon/icon.js +15 -0
  40. package/lib/icon/info-line.js +15 -0
  41. package/lib/icon/info.js +15 -0
  42. package/lib/icon/play-shape.js +15 -0
  43. package/lib/icon/plus.js +15 -0
  44. package/lib/icon/right-shape.js +15 -0
  45. package/lib/icon/search.js +15 -0
  46. package/lib/icon/share.js +15 -0
  47. package/lib/icon/spinner.js +15 -0
  48. package/lib/icon/success.js +15 -0
  49. package/lib/icon/switcher-loading.js +15 -0
  50. package/lib/icon/text-file.js +15 -0
  51. package/lib/icon/tree-application-shape.js +15 -0
  52. package/lib/icon/unvisible.js +15 -0
  53. package/lib/icon/warn.js +15 -0
  54. package/lib/input/index.js +2 -2
  55. package/lib/menu/index.js +1 -1
  56. package/lib/menu/submenu.css +3 -0
  57. package/lib/menu/submenu.less +1 -1
  58. package/lib/menu/submenu.variable.css +3 -0
  59. package/lib/message/index.js +1 -1
  60. package/lib/modal/index.d.ts +8 -8
  61. package/lib/modal/index.js +1 -1
  62. package/lib/modal/modal.d.ts +3 -3
  63. package/lib/modal/props.mixin.d.ts +1 -1
  64. package/lib/navigation/index.js +1 -1
  65. package/lib/notify/index.js +1 -1
  66. package/lib/process/index.js +1 -1
  67. package/lib/select/index.js +2 -2
  68. package/lib/sideslider/index.d.ts +7 -7
  69. package/lib/sideslider/sideslider.d.ts +3 -3
  70. package/lib/steps/index.js +1 -1
  71. package/lib/switcher/index.js +1 -1
  72. package/lib/tab/index.js +1 -1
  73. package/lib/table/index.js +1 -1
  74. package/lib/table/utils.d.ts +2 -1
  75. package/lib/tree/index.js +1 -1
  76. package/lib/virtual-render/index.d.ts +17 -2
  77. package/lib/virtual-render/index.js +1 -1
  78. package/lib/virtual-render/props.d.ts +9 -0
  79. package/lib/virtual-render/virtual-render.d.ts +9 -1
  80. package/package.json +2 -2
@@ -3436,7 +3436,7 @@ const propsMixin$1 = {
3436
3436
  default: "50%"
3437
3437
  },
3438
3438
  customClass: {
3439
- type: [Object, String],
3439
+ type: [Array, String],
3440
3440
  default: ""
3441
3441
  },
3442
3442
  scrollable: {
@@ -3452,6 +3452,21 @@ var Component$i = vue.defineComponent({
3452
3452
  visible: false
3453
3453
  };
3454
3454
  },
3455
+ computed: {
3456
+ dialogWidth() {
3457
+ return /^\d+$/.test(`${this.width}`) ? `${this.width}px` : this.width;
3458
+ },
3459
+ dialogHeight() {
3460
+ return /^\d+$/.test(`${this.height}`) ? `${this.height}px` : this.height;
3461
+ },
3462
+ compStyle() {
3463
+ return {
3464
+ width: this.dialogWidth,
3465
+ height: this.dialogHeight,
3466
+ display: this.visible ? "inherit" : "none"
3467
+ };
3468
+ }
3469
+ },
3455
3470
  watch: {
3456
3471
  isShow: {
3457
3472
  handler(val) {
@@ -3468,21 +3483,6 @@ var Component$i = vue.defineComponent({
3468
3483
  }
3469
3484
  }
3470
3485
  },
3471
- computed: {
3472
- dialogWidth() {
3473
- return /^\d+$/.test(`${this.width}`) ? `${this.width}px` : this.width;
3474
- },
3475
- dialogHeight() {
3476
- return /^\d+$/.test(`${this.height}`) ? `${this.height}px` : this.height;
3477
- },
3478
- compStyle() {
3479
- return {
3480
- width: this.dialogWidth,
3481
- height: this.dialogHeight,
3482
- display: this.visible ? "inherit" : "none"
3483
- };
3484
- }
3485
- },
3486
3486
  beforeUnmount() {
3487
3487
  bkPopIndexManager.hide(this.$el);
3488
3488
  },
@@ -5847,11 +5847,17 @@ const resolveNumberToNumArray = (prop) => {
5847
5847
  return [];
5848
5848
  };
5849
5849
  const resolveWidth = (propWidth) => resolveNumberOrStringToPix(propWidth, "auto");
5850
- const resolveNumberOrStringToPix = (val, defaultValue = "100%") => {
5850
+ const resolveNumberOrStringToPix = (val, defaultValue = "100%", offset2 = null) => {
5851
+ let target = "";
5851
5852
  if (/^auto|null|undefined$/ig.test(`${val}`)) {
5852
- return defaultValue;
5853
+ target = defaultValue;
5854
+ } else {
5855
+ target = /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
5853
5856
  }
5854
- return /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
5857
+ if (offset2) {
5858
+ target = `calc(${target} - ${offset2})`;
5859
+ }
5860
+ return target;
5855
5861
  };
5856
5862
  class TableRender {
5857
5863
  constructor(props, ctx, reactiveProp) {
@@ -5956,7 +5962,8 @@ const virtualRenderProps = {
5956
5962
  contentAs: PropTypes.string.def("div"),
5957
5963
  scrollOffsetTop: PropTypes.number.def(0),
5958
5964
  scrollPosition: PropTypes.string.def("content"),
5959
- abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto")
5965
+ abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
5966
+ throttleDelay: PropTypes.number.def(60)
5960
5967
  };
5961
5968
  function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
5962
5969
  let startIndex = 0;
@@ -6004,17 +6011,28 @@ function visibleRender(e2, wrapper, binding) {
6004
6011
  const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination;
6005
6012
  computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e2);
6006
6013
  }
6007
- const throttledRender = throttle((e2, wrapper, binding) => visibleRender(e2, wrapper, binding), 60);
6014
+ const throttledRender = (delay = 60) => throttle((e2, wrapper, binding) => visibleRender(e2, wrapper, binding), delay);
6015
+ let cachedThrottle = null;
6016
+ const executeThrottledRender = (e2, wrapper, binding, delay = 60) => {
6017
+ if (!cachedThrottle) {
6018
+ cachedThrottle = throttledRender(delay);
6019
+ }
6020
+ if (typeof cachedThrottle === "function") {
6021
+ cachedThrottle.call(void 0, e2, wrapper, binding);
6022
+ }
6023
+ };
6008
6024
  var virtualRender = {
6009
6025
  mounted(el, binding) {
6010
6026
  const wrapper = el.parentNode;
6027
+ const { throttleDelay } = binding.value;
6011
6028
  wrapper.addEventListener("scroll", (e2) => {
6012
- throttledRender(e2, wrapper, binding);
6029
+ executeThrottledRender(e2, wrapper, binding, throttleDelay);
6013
6030
  });
6014
6031
  },
6015
6032
  updated(el, binding) {
6016
6033
  const wrapper = el.parentNode;
6017
- throttledRender(null, wrapper, binding);
6034
+ const { throttleDelay } = binding.value;
6035
+ executeThrottledRender(null, wrapper, binding, throttleDelay);
6018
6036
  },
6019
6037
  unbind(el) {
6020
6038
  if (el) {
@@ -6027,11 +6045,12 @@ var virtualRender = {
6027
6045
  }
6028
6046
  };
6029
6047
  var Component$4 = vue.defineComponent({
6030
- name: "bk-virtual-render",
6048
+ name: "VirtualRender",
6031
6049
  directives: {
6032
6050
  bkVirtualRender: virtualRender
6033
6051
  },
6034
6052
  props: virtualRenderProps,
6053
+ emits: ["content-scroll"],
6035
6054
  setup(props, ctx) {
6036
6055
  const {
6037
6056
  renderAs,
@@ -6150,7 +6169,8 @@ var Component$4 = vue.defineComponent({
6150
6169
  const dirModifier = {
6151
6170
  lineHeight: props.lineHeight,
6152
6171
  handleScrollCallback,
6153
- pagination
6172
+ pagination,
6173
+ throttleDelay: props.throttleDelay
6154
6174
  };
6155
6175
  return () => {
6156
6176
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -6206,12 +6226,18 @@ var Component$3 = vue.defineComponent({
6206
6226
  const tableClass = classes({
6207
6227
  [resolveClassName("table")]: true
6208
6228
  });
6229
+ const handleScrollChanged = (args) => {
6230
+ const pagination = args[1];
6231
+ reactiveProp.scrollTranslateY = pagination.translateY;
6232
+ };
6209
6233
  return () => vue.createVNode(BkTree, {
6210
6234
  "className": tableClass,
6211
6235
  "style": wrapperStyle.value,
6212
6236
  "lineHeight": props.rowHeight,
6213
6237
  "contentClassName": resolveClassName("table-body"),
6214
6238
  "list": props.data,
6239
+ "on-content-scroll": handleScrollChanged,
6240
+ "throttleDelay": 0,
6215
6241
  "enabled": props.virtualEnabled
6216
6242
  }, {
6217
6243
  default: (scope) => tableRender.renderTableBodySchema(scope.data || props.data),
@@ -3433,7 +3433,7 @@ const propsMixin$1 = {
3433
3433
  default: "50%"
3434
3434
  },
3435
3435
  customClass: {
3436
- type: [Object, String],
3436
+ type: [Array, String],
3437
3437
  default: ""
3438
3438
  },
3439
3439
  scrollable: {
@@ -3449,6 +3449,21 @@ var Component$i = defineComponent({
3449
3449
  visible: false
3450
3450
  };
3451
3451
  },
3452
+ computed: {
3453
+ dialogWidth() {
3454
+ return /^\d+$/.test(`${this.width}`) ? `${this.width}px` : this.width;
3455
+ },
3456
+ dialogHeight() {
3457
+ return /^\d+$/.test(`${this.height}`) ? `${this.height}px` : this.height;
3458
+ },
3459
+ compStyle() {
3460
+ return {
3461
+ width: this.dialogWidth,
3462
+ height: this.dialogHeight,
3463
+ display: this.visible ? "inherit" : "none"
3464
+ };
3465
+ }
3466
+ },
3452
3467
  watch: {
3453
3468
  isShow: {
3454
3469
  handler(val) {
@@ -3465,21 +3480,6 @@ var Component$i = defineComponent({
3465
3480
  }
3466
3481
  }
3467
3482
  },
3468
- computed: {
3469
- dialogWidth() {
3470
- return /^\d+$/.test(`${this.width}`) ? `${this.width}px` : this.width;
3471
- },
3472
- dialogHeight() {
3473
- return /^\d+$/.test(`${this.height}`) ? `${this.height}px` : this.height;
3474
- },
3475
- compStyle() {
3476
- return {
3477
- width: this.dialogWidth,
3478
- height: this.dialogHeight,
3479
- display: this.visible ? "inherit" : "none"
3480
- };
3481
- }
3482
- },
3483
3483
  beforeUnmount() {
3484
3484
  bkPopIndexManager.hide(this.$el);
3485
3485
  },
@@ -5844,11 +5844,17 @@ const resolveNumberToNumArray = (prop) => {
5844
5844
  return [];
5845
5845
  };
5846
5846
  const resolveWidth = (propWidth) => resolveNumberOrStringToPix(propWidth, "auto");
5847
- const resolveNumberOrStringToPix = (val, defaultValue = "100%") => {
5847
+ const resolveNumberOrStringToPix = (val, defaultValue = "100%", offset2 = null) => {
5848
+ let target = "";
5848
5849
  if (/^auto|null|undefined$/ig.test(`${val}`)) {
5849
- return defaultValue;
5850
+ target = defaultValue;
5851
+ } else {
5852
+ target = /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
5850
5853
  }
5851
- return /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
5854
+ if (offset2) {
5855
+ target = `calc(${target} - ${offset2})`;
5856
+ }
5857
+ return target;
5852
5858
  };
5853
5859
  class TableRender {
5854
5860
  constructor(props, ctx, reactiveProp) {
@@ -5953,7 +5959,8 @@ const virtualRenderProps = {
5953
5959
  contentAs: PropTypes.string.def("div"),
5954
5960
  scrollOffsetTop: PropTypes.number.def(0),
5955
5961
  scrollPosition: PropTypes.string.def("content"),
5956
- abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto")
5962
+ abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
5963
+ throttleDelay: PropTypes.number.def(60)
5957
5964
  };
5958
5965
  function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
5959
5966
  let startIndex = 0;
@@ -6001,17 +6008,28 @@ function visibleRender(e2, wrapper, binding) {
6001
6008
  const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination;
6002
6009
  computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e2);
6003
6010
  }
6004
- const throttledRender = throttle((e2, wrapper, binding) => visibleRender(e2, wrapper, binding), 60);
6011
+ const throttledRender = (delay = 60) => throttle((e2, wrapper, binding) => visibleRender(e2, wrapper, binding), delay);
6012
+ let cachedThrottle = null;
6013
+ const executeThrottledRender = (e2, wrapper, binding, delay = 60) => {
6014
+ if (!cachedThrottle) {
6015
+ cachedThrottle = throttledRender(delay);
6016
+ }
6017
+ if (typeof cachedThrottle === "function") {
6018
+ cachedThrottle.call(void 0, e2, wrapper, binding);
6019
+ }
6020
+ };
6005
6021
  var virtualRender = {
6006
6022
  mounted(el, binding) {
6007
6023
  const wrapper = el.parentNode;
6024
+ const { throttleDelay } = binding.value;
6008
6025
  wrapper.addEventListener("scroll", (e2) => {
6009
- throttledRender(e2, wrapper, binding);
6026
+ executeThrottledRender(e2, wrapper, binding, throttleDelay);
6010
6027
  });
6011
6028
  },
6012
6029
  updated(el, binding) {
6013
6030
  const wrapper = el.parentNode;
6014
- throttledRender(null, wrapper, binding);
6031
+ const { throttleDelay } = binding.value;
6032
+ executeThrottledRender(null, wrapper, binding, throttleDelay);
6015
6033
  },
6016
6034
  unbind(el) {
6017
6035
  if (el) {
@@ -6024,11 +6042,12 @@ var virtualRender = {
6024
6042
  }
6025
6043
  };
6026
6044
  var Component$4 = defineComponent({
6027
- name: "bk-virtual-render",
6045
+ name: "VirtualRender",
6028
6046
  directives: {
6029
6047
  bkVirtualRender: virtualRender
6030
6048
  },
6031
6049
  props: virtualRenderProps,
6050
+ emits: ["content-scroll"],
6032
6051
  setup(props, ctx) {
6033
6052
  const {
6034
6053
  renderAs,
@@ -6147,7 +6166,8 @@ var Component$4 = defineComponent({
6147
6166
  const dirModifier = {
6148
6167
  lineHeight: props.lineHeight,
6149
6168
  handleScrollCallback,
6150
- pagination
6169
+ pagination,
6170
+ throttleDelay: props.throttleDelay
6151
6171
  };
6152
6172
  return () => {
6153
6173
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -6203,12 +6223,18 @@ var Component$3 = defineComponent({
6203
6223
  const tableClass = classes({
6204
6224
  [resolveClassName("table")]: true
6205
6225
  });
6226
+ const handleScrollChanged = (args) => {
6227
+ const pagination = args[1];
6228
+ reactiveProp.scrollTranslateY = pagination.translateY;
6229
+ };
6206
6230
  return () => createVNode(BkTree, {
6207
6231
  "className": tableClass,
6208
6232
  "style": wrapperStyle.value,
6209
6233
  "lineHeight": props.rowHeight,
6210
6234
  "contentClassName": resolveClassName("table-body"),
6211
6235
  "list": props.data,
6236
+ "on-content-scroll": handleScrollChanged,
6237
+ "throttleDelay": 0,
6212
6238
  "enabled": props.virtualEnabled
6213
6239
  }, {
6214
6240
  default: (scope) => tableRender.renderTableBodySchema(scope.data || props.data),
@@ -3436,7 +3436,7 @@ ${$(r2)}`), n2;
3436
3436
  default: "50%"
3437
3437
  },
3438
3438
  customClass: {
3439
- type: [Object, String],
3439
+ type: [Array, String],
3440
3440
  default: ""
3441
3441
  },
3442
3442
  scrollable: {
@@ -3452,6 +3452,21 @@ ${$(r2)}`), n2;
3452
3452
  visible: false
3453
3453
  };
3454
3454
  },
3455
+ computed: {
3456
+ dialogWidth() {
3457
+ return /^\d+$/.test(`${this.width}`) ? `${this.width}px` : this.width;
3458
+ },
3459
+ dialogHeight() {
3460
+ return /^\d+$/.test(`${this.height}`) ? `${this.height}px` : this.height;
3461
+ },
3462
+ compStyle() {
3463
+ return {
3464
+ width: this.dialogWidth,
3465
+ height: this.dialogHeight,
3466
+ display: this.visible ? "inherit" : "none"
3467
+ };
3468
+ }
3469
+ },
3455
3470
  watch: {
3456
3471
  isShow: {
3457
3472
  handler(val) {
@@ -3468,21 +3483,6 @@ ${$(r2)}`), n2;
3468
3483
  }
3469
3484
  }
3470
3485
  },
3471
- computed: {
3472
- dialogWidth() {
3473
- return /^\d+$/.test(`${this.width}`) ? `${this.width}px` : this.width;
3474
- },
3475
- dialogHeight() {
3476
- return /^\d+$/.test(`${this.height}`) ? `${this.height}px` : this.height;
3477
- },
3478
- compStyle() {
3479
- return {
3480
- width: this.dialogWidth,
3481
- height: this.dialogHeight,
3482
- display: this.visible ? "inherit" : "none"
3483
- };
3484
- }
3485
- },
3486
3486
  beforeUnmount() {
3487
3487
  bkPopIndexManager.hide(this.$el);
3488
3488
  },
@@ -5847,11 +5847,17 @@ ${$(r2)}`), n2;
5847
5847
  return [];
5848
5848
  };
5849
5849
  const resolveWidth = (propWidth) => resolveNumberOrStringToPix(propWidth, "auto");
5850
- const resolveNumberOrStringToPix = (val, defaultValue = "100%") => {
5850
+ const resolveNumberOrStringToPix = (val, defaultValue = "100%", offset2 = null) => {
5851
+ let target = "";
5851
5852
  if (/^auto|null|undefined$/ig.test(`${val}`)) {
5852
- return defaultValue;
5853
+ target = defaultValue;
5854
+ } else {
5855
+ target = /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
5853
5856
  }
5854
- return /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
5857
+ if (offset2) {
5858
+ target = `calc(${target} - ${offset2})`;
5859
+ }
5860
+ return target;
5855
5861
  };
5856
5862
  class TableRender {
5857
5863
  constructor(props, ctx, reactiveProp) {
@@ -5956,7 +5962,8 @@ ${$(r2)}`), n2;
5956
5962
  contentAs: PropTypes.string.def("div"),
5957
5963
  scrollOffsetTop: PropTypes.number.def(0),
5958
5964
  scrollPosition: PropTypes.string.def("content"),
5959
- abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto")
5965
+ abosuteHeight: PropTypes.oneOfType([PropTypes.string.def("auto"), PropTypes.number]).def("auto"),
5966
+ throttleDelay: PropTypes.number.def(60)
5960
5967
  };
5961
5968
  function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
5962
5969
  let startIndex = 0;
@@ -6004,17 +6011,28 @@ ${$(r2)}`), n2;
6004
6011
  const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination;
6005
6012
  computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e2);
6006
6013
  }
6007
- const throttledRender = throttle((e2, wrapper, binding) => visibleRender(e2, wrapper, binding), 60);
6014
+ const throttledRender = (delay = 60) => throttle((e2, wrapper, binding) => visibleRender(e2, wrapper, binding), delay);
6015
+ let cachedThrottle = null;
6016
+ const executeThrottledRender = (e2, wrapper, binding, delay = 60) => {
6017
+ if (!cachedThrottle) {
6018
+ cachedThrottle = throttledRender(delay);
6019
+ }
6020
+ if (typeof cachedThrottle === "function") {
6021
+ cachedThrottle.call(void 0, e2, wrapper, binding);
6022
+ }
6023
+ };
6008
6024
  var virtualRender = {
6009
6025
  mounted(el, binding) {
6010
6026
  const wrapper = el.parentNode;
6027
+ const { throttleDelay } = binding.value;
6011
6028
  wrapper.addEventListener("scroll", (e2) => {
6012
- throttledRender(e2, wrapper, binding);
6029
+ executeThrottledRender(e2, wrapper, binding, throttleDelay);
6013
6030
  });
6014
6031
  },
6015
6032
  updated(el, binding) {
6016
6033
  const wrapper = el.parentNode;
6017
- throttledRender(null, wrapper, binding);
6034
+ const { throttleDelay } = binding.value;
6035
+ executeThrottledRender(null, wrapper, binding, throttleDelay);
6018
6036
  },
6019
6037
  unbind(el) {
6020
6038
  if (el) {
@@ -6027,11 +6045,12 @@ ${$(r2)}`), n2;
6027
6045
  }
6028
6046
  };
6029
6047
  var Component$4 = vue.defineComponent({
6030
- name: "bk-virtual-render",
6048
+ name: "VirtualRender",
6031
6049
  directives: {
6032
6050
  bkVirtualRender: virtualRender
6033
6051
  },
6034
6052
  props: virtualRenderProps,
6053
+ emits: ["content-scroll"],
6035
6054
  setup(props, ctx) {
6036
6055
  const {
6037
6056
  renderAs,
@@ -6150,7 +6169,8 @@ ${$(r2)}`), n2;
6150
6169
  const dirModifier = {
6151
6170
  lineHeight: props.lineHeight,
6152
6171
  handleScrollCallback,
6153
- pagination
6172
+ pagination,
6173
+ throttleDelay: props.throttleDelay
6154
6174
  };
6155
6175
  return () => {
6156
6176
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -6206,12 +6226,18 @@ ${$(r2)}`), n2;
6206
6226
  const tableClass = classes({
6207
6227
  [resolveClassName("table")]: true
6208
6228
  });
6229
+ const handleScrollChanged = (args) => {
6230
+ const pagination = args[1];
6231
+ reactiveProp.scrollTranslateY = pagination.translateY;
6232
+ };
6209
6233
  return () => vue.createVNode(BkTree, {
6210
6234
  "className": tableClass,
6211
6235
  "style": wrapperStyle.value,
6212
6236
  "lineHeight": props.rowHeight,
6213
6237
  "contentClassName": resolveClassName("table-body"),
6214
6238
  "list": props.data,
6239
+ "on-content-scroll": handleScrollChanged,
6240
+ "throttleDelay": 0,
6215
6241
  "enabled": props.virtualEnabled
6216
6242
  }, {
6217
6243
  default: (scope) => tableRender.renderTableBodySchema(scope.data || props.data),
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,t,o,s){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e){e.exports=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports}(i);var l=r(i.exports),n=t.defineComponent({name:"Alert",props:{theme:o.PropTypes.theme(["info","success","warning","error"]).def("info"),size:o.PropTypes.string,title:o.PropTypes.string,closable:o.PropTypes.bool.def(!1),closeText:o.PropTypes.string,showIcon:o.PropTypes.bool.def(!0)},emits:["close"],setup:function(e,o){var s=t.reactive({visible:!0});return{state:s,handleClose:function(){s.visible=!1,o.emit("close")}}},render:function(){if(!this.state.visible)return null;var e=Boolean(this.closeText),r=o.classes({"bk-alert-close":!0,"close-text":e,"icon-close":!e}),i=o.classes(l({"bk-alert":!0},"bk-alert-".concat(this.theme),!0));return t.createVNode("div",{class:i},[t.createVNode("div",{class:"bk-alert-wraper"},[this.showIcon&&t.createVNode(s.Help,{class:"bk-alert-icon-info"},null),t.createVNode("div",{class:"bk-alert-content"},[t.createVNode("div",{class:"bk-alert-title"},[this.title]),t.createVNode("div",{class:"bk-alert-description"},null)]),t.createVNode("span",{class:r,onClick:this.handleClose},[this.closeText])])])}}),a=o.withInstall(n);e.default=a,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("../icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","../icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,t,o,s){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e){e.exports=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports}(i);var l=r(i.exports),n=t.defineComponent({name:"Alert",props:{theme:o.PropTypes.theme(["info","success","warning","error"]).def("info"),size:o.PropTypes.string,title:o.PropTypes.string,closable:o.PropTypes.bool.def(!1),closeText:o.PropTypes.string,showIcon:o.PropTypes.bool.def(!0)},emits:["close"],setup:function(e,o){var s=t.reactive({visible:!0});return{state:s,handleClose:function(){s.visible=!1,o.emit("close")}}},render:function(){if(!this.state.visible)return null;var e=Boolean(this.closeText),r=o.classes({"bk-alert-close":!0,"close-text":e,"icon-close":!e}),i=o.classes(l({"bk-alert":!0},"bk-alert-".concat(this.theme),!0));return t.createVNode("div",{class:i},[t.createVNode("div",{class:"bk-alert-wraper"},[this.showIcon&&t.createVNode(s.Help,{class:"bk-alert-icon-info"},null),t.createVNode("div",{class:"bk-alert-content"},[t.createVNode("div",{class:"bk-alert-title"},[this.title]),t.createVNode("div",{class:"bk-alert-description"},null)]),t.createVNode("span",{class:r,onClick:this.handleClose},[this.closeText])])])}}),a=o.withInstall(n);e.default=a,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@bkui-vue/icon"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","@bkui-vue/icon","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e["@bkui-vue/icon/icons"],e.Shared)}(this,(function(e,t,n,o){"use strict";var r=t.defineComponent({name:"Backtop",props:{visibilityHeight:o.PropTypes.number.def(200),target:o.PropTypes.string.def(""),right:o.PropTypes.number.def(40),bottom:o.PropTypes.number.def(40),extCls:o.PropTypes.string.def("")},setup:function(e,r){var u=r.slots,i=t.ref(null),l=t.ref(null),a=t.ref(!1),d=t.ref(o.bkZIndexManager.getModalNextIndex()),c="".concat(e.bottom,"px"),s="".concat(e.right,"px"),f=o.throttle((function(){a.value=l.value.scrollTop>=e.visibilityHeight}),30),v=function(){l.value.scrollTo({top:0,behavior:"smooth"})};return t.watch((function(){return a}),(function(){d.value=o.bkZIndexManager.getModalNextIndex()})),t.onMounted((function(){if(i.value=document,l.value=document.documentElement,e.target){if(l.value=document.querySelector(e.target),!l.value)throw new Error("target does not exist");i.value=l.value}i.value.addEventListener("scroll",f)})),t.onBeforeUnmount((function(){i.value.removeEventListener("scroll",f)})),function(){var o,r;return t.createVNode(t.Transition,{name:"bk-fade"},{default:function(){return[a.value?t.createVNode("div",{class:"bk-backtop ".concat(e.extCls),style:{right:s,bottom:c,zIndex:d.value},onClick:v},[null!==(r=null===(o=u.default)||void 0===o?void 0:o.call(u))&&void 0!==r?r:t.createVNode(n.AngleUp,{style:{fontSize:"14px"}},null)]):""]}})}}}),u=o.withInstall(r);e.default=u,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../icon"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../icon","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e["@bkui-vue/icon/icons"],e.Shared)}(this,(function(e,t,n,o){"use strict";var r=t.defineComponent({name:"Backtop",props:{visibilityHeight:o.PropTypes.number.def(200),target:o.PropTypes.string.def(""),right:o.PropTypes.number.def(40),bottom:o.PropTypes.number.def(40),extCls:o.PropTypes.string.def("")},setup:function(e,r){var u=r.slots,i=t.ref(null),l=t.ref(null),a=t.ref(!1),d=t.ref(o.bkZIndexManager.getModalNextIndex()),c="".concat(e.bottom,"px"),s="".concat(e.right,"px"),f=o.throttle((function(){a.value=l.value.scrollTop>=e.visibilityHeight}),30),v=function(){l.value.scrollTo({top:0,behavior:"smooth"})};return t.watch((function(){return a}),(function(){d.value=o.bkZIndexManager.getModalNextIndex()})),t.onMounted((function(){if(i.value=document,l.value=document.documentElement,e.target){if(l.value=document.querySelector(e.target),!l.value)throw new Error("target does not exist");i.value=l.value}i.value.addEventListener("scroll",f)})),t.onBeforeUnmount((function(){i.value.removeEventListener("scroll",f)})),function(){var o,r;return t.createVNode(t.Transition,{name:"bk-fade"},{default:function(){return[a.value?t.createVNode("div",{class:"bk-backtop ".concat(e.extCls),style:{right:s,bottom:c,zIndex:d.value},onClick:v},[null!==(r=null===(o=u.default)||void 0===o?void 0:o.call(u))&&void 0!==r?r:t.createVNode(n.AngleUp,{style:{fontSize:"14px"}},null)]):""]}})}}}),u=o.withInstall(r);e.default=u,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1 +1 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue"),require("../shared"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,r,o,t){"use strict";var a=r.defineComponent({name:"Breadcrumb",props:{extCls:o.PropTypes.string,separator:o.PropTypes.string.def("/"),separatorClass:o.PropTypes.string,replace:o.PropTypes.bool,backRouter:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object]).def("")},setup:function(e,a){var n=a.slots,s=r.getCurrentInstance(),c=s.proxy,l=s.appContext;r.provide("breadcrumb",e),r.onMounted((function(){var e=c.$el.querySelectorAll(".bk-breadcrumb-item");e.length&&e[e.length-1].setAttribute("aria-current","page")}));var i=o.classes({"bk-breadcrumb":!0},"".concat(e.extCls||"")),p=function(){var r=e.backRouter,o=e.replace,t=l.config.globalProperties.$router;t&&(o?t.replace(r):t.push(r))};return function(){var o;return r.createVNode("div",{class:i,"aria-label":"Breadcrumb",role:"navigation"},[!n.prefix&&e.backRouter?r.createVNode("div",{class:"bk-breadcrumb-goback"},[r.createVNode(t.ArrowsLeft,{onClick:p},null)]):"",n.prefix?r.createVNode("div",{class:"bk-breadcrumb-goback"},[n.prefix()]):"",null===(o=n.default)||void 0===o?void 0:o.call(n)])}}}),n=r.defineComponent({name:"BreadcrumbItem",props:{extCls:o.PropTypes.string,to:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object]).def(""),replace:o.PropTypes.bool},setup:function(e,t){var a=t.slots,n=r.getCurrentInstance().appContext,s=r.inject("breadcrumb"),c=n.config.globalProperties.$router,l=e.to,i=e.replace,p=function(){l&&c&&(i?c.replace(l):c.push(l))},u=o.classes({"bk-breadcrumb-item":!0},"".concat(e.extCls||""));return function(){var e;return r.createVNode("span",{class:u},[r.createVNode("span",{ref:"link",class:"bk-breadcrumb-item-inner ".concat(l?"is-link":""),role:"link",onClick:p},[null===(e=null==a?void 0:a.default)||void 0===e?void 0:e.call(a)]),(null==s?void 0:s.separatorClass)?r.createVNode("i",{class:"bk-breadcrumb-separator ".concat(s.separatorClass)},null):r.createVNode("span",{class:"bk-breadcrumb-separator",role:"presentation"},[null==s?void 0:s.separator])])}}}),s=o.withInstallProps(a,{Item:n});e.BkBreadcrumb=s,e.BkBreadcrumbItem=n,e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue"),require("../shared"),require("../icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","../icon"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,r,o,t){"use strict";var a=r.defineComponent({name:"Breadcrumb",props:{extCls:o.PropTypes.string,separator:o.PropTypes.string.def("/"),separatorClass:o.PropTypes.string,replace:o.PropTypes.bool,backRouter:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object]).def("")},setup:function(e,a){var n=a.slots,s=r.getCurrentInstance(),c=s.proxy,l=s.appContext;r.provide("breadcrumb",e),r.onMounted((function(){var e=c.$el.querySelectorAll(".bk-breadcrumb-item");e.length&&e[e.length-1].setAttribute("aria-current","page")}));var i=o.classes({"bk-breadcrumb":!0},"".concat(e.extCls||"")),p=function(){var r=e.backRouter,o=e.replace,t=l.config.globalProperties.$router;t&&(o?t.replace(r):t.push(r))};return function(){var o;return r.createVNode("div",{class:i,"aria-label":"Breadcrumb",role:"navigation"},[!n.prefix&&e.backRouter?r.createVNode("div",{class:"bk-breadcrumb-goback"},[r.createVNode(t.ArrowsLeft,{onClick:p},null)]):"",n.prefix?r.createVNode("div",{class:"bk-breadcrumb-goback"},[n.prefix()]):"",null===(o=n.default)||void 0===o?void 0:o.call(n)])}}}),n=r.defineComponent({name:"BreadcrumbItem",props:{extCls:o.PropTypes.string,to:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object]).def(""),replace:o.PropTypes.bool},setup:function(e,t){var a=t.slots,n=r.getCurrentInstance().appContext,s=r.inject("breadcrumb"),c=n.config.globalProperties.$router,l=e.to,i=e.replace,p=function(){l&&c&&(i?c.replace(l):c.push(l))},u=o.classes({"bk-breadcrumb-item":!0},"".concat(e.extCls||""));return function(){var e;return r.createVNode("span",{class:u},[r.createVNode("span",{ref:"link",class:"bk-breadcrumb-item-inner ".concat(l?"is-link":""),role:"link",onClick:p},[null===(e=null==a?void 0:a.default)||void 0===e?void 0:e.call(a)]),(null==s?void 0:s.separatorClass)?r.createVNode("i",{class:"bk-breadcrumb-separator ".concat(s.separatorClass)},null):r.createVNode("span",{class:"bk-breadcrumb-separator",role:"presentation"},[null==s?void 0:s.separator])])}}}),s=o.withInstallProps(a,{Item:n});e.BkBreadcrumb=s,e.BkBreadcrumbItem=n,e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue"),require("../shared"),require("@bkui-vue/icon/")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon/"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e._)}(this,(function(e,n,t,o){"use strict";var i=n.defineComponent({name:"Collapse",props:{list:t.PropTypes.arrayOf(t.PropTypes.any).def([]),idFiled:t.PropTypes.string.def("$index"),titleField:t.PropTypes.string.def("name"),contentField:t.PropTypes.string.def("content"),activeIndex:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.number).def([]),t.PropTypes.number.def(-1)]),activeName:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.string).def([]),t.PropTypes.string.def("")]),accordion:t.PropTypes.bool.def(!0)},setup:function(e,t){var i=t.slots,r=n.ref(null);n.watch((function(){return[e.activeName,e.activeIndex]}),(function(){r.value=null}));var l=n.computed((function(){return(e.list||[]).map((function(e,n){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e?{$index:n,name:e}:Object.assign({$index:n},e)}))})),a=n.computed((function(){var n;return null!==r.value?r.value.map((function(e){return e.$index})):null!==e.activeName&&void 0!==e.activeName&&""!==e.activeName?u(e.activeName).map((function(n){return l.value.findIndex((function(t){return t[e.idFiled]===n}))})):u(null!==(n=e.activeIndex)&&void 0!==n?n:0)})),u=function n(t){return Array.isArray(t)?e.accordion?n(t[0]):t:"string"==typeof t||"number"==typeof t?[t]:[]},c=function(e){return a.value.some((function(n){return n===e.$index}))},d=function(){return l.value.map((function(t){var l,a,u,d;return n.createVNode("div",{class:"bk-collapse-item"},[n.createVNode("div",{class:"bk-collapse-header",onClick:function(){return function(n){if(null===r.value)r.value=[n];else if(e.accordion)r.value=[n];else{var t=r.value.findIndex((function(e){return e.$index===n.$index}));t>=0?r.value.splice(t,1):r.value.push(n)}}(t)}},[n.createVNode("span",{class:"bk-collapse-title"},[null!==(a=null===(l=i.default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:t[e.titleField]]),c(t)?n.createVNode(o.AngleDown,{class:"bk-collapse-icon"},null):n.createVNode(o.AngleRight,{class:"bk-collapse-icon"},null)]),n.createVNode("div",{class:"bk-collapse-content ".concat(c(t)?"active":"")},[null!==(d=null===(u=i.content)||void 0===u?void 0:u.call(i,t))&&void 0!==d?d:t[e.contentField]])])}))};return function(){return n.createVNode("div",{class:"bk-collapse-wrapper"},[d()])}}}),r=t.withInstall(i);e.default=r,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue"),require("../shared"),require("../icon/")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","../icon/"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e._)}(this,(function(e,n,t,o){"use strict";var i=n.defineComponent({name:"Collapse",props:{list:t.PropTypes.arrayOf(t.PropTypes.any).def([]),idFiled:t.PropTypes.string.def("$index"),titleField:t.PropTypes.string.def("name"),contentField:t.PropTypes.string.def("content"),activeIndex:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.number).def([]),t.PropTypes.number.def(-1)]),activeName:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.string).def([]),t.PropTypes.string.def("")]),accordion:t.PropTypes.bool.def(!0)},setup:function(e,t){var i=t.slots,r=n.ref(null);n.watch((function(){return[e.activeName,e.activeIndex]}),(function(){r.value=null}));var l=n.computed((function(){return(e.list||[]).map((function(e,n){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e?{$index:n,name:e}:Object.assign({$index:n},e)}))})),a=n.computed((function(){var n;return null!==r.value?r.value.map((function(e){return e.$index})):null!==e.activeName&&void 0!==e.activeName&&""!==e.activeName?u(e.activeName).map((function(n){return l.value.findIndex((function(t){return t[e.idFiled]===n}))})):u(null!==(n=e.activeIndex)&&void 0!==n?n:0)})),u=function n(t){return Array.isArray(t)?e.accordion?n(t[0]):t:"string"==typeof t||"number"==typeof t?[t]:[]},c=function(e){return a.value.some((function(n){return n===e.$index}))},d=function(){return l.value.map((function(t){var l,a,u,d;return n.createVNode("div",{class:"bk-collapse-item"},[n.createVNode("div",{class:"bk-collapse-header",onClick:function(){return function(n){if(null===r.value)r.value=[n];else if(e.accordion)r.value=[n];else{var t=r.value.findIndex((function(e){return e.$index===n.$index}));t>=0?r.value.splice(t,1):r.value.push(n)}}(t)}},[n.createVNode("span",{class:"bk-collapse-title"},[null!==(a=null===(l=i.default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:t[e.titleField]]),c(t)?n.createVNode(o.AngleDown,{class:"bk-collapse-icon"},null):n.createVNode(o.AngleRight,{class:"bk-collapse-icon"},null)]),n.createVNode("div",{class:"bk-collapse-content ".concat(c(t)?"active":"")},[null!==(d=null===(u=i.content)||void 0===u?void 0:u.call(i,t))&&void 0!==d?d:t[e.contentField]])])}))};return function(){return n.createVNode("div",{class:"bk-collapse-wrapper"},[d()])}}}),r=t.withInstall(i);e.default=r,Object.defineProperty(e,"__esModule",{value:!0})}));