bkui-vue 2.0.1-beta.57.table.1 → 2.0.1-beta.58

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.
@@ -2686,12 +2686,10 @@ var timeProps = {
2686
2686
  // const parentProvide = injectStrict(timePickerKey);
2687
2687
  var parentProvide = (0,external_vue_namespaceObject.inject)(timePickerKey);
2688
2688
  var timeSpinnerRef = (0,external_vue_namespaceObject.ref)(null);
2689
+ var visibleDate = (0,external_vue_namespaceObject.ref)(src_fecha.format(parentProvide.panelDate, props.format));
2689
2690
  var showSeconds = (0,external_vue_namespaceObject.computed)(function () {
2690
2691
  return !(props.format || '').match(/mm$/);
2691
2692
  });
2692
- var visibleDate = (0,external_vue_namespaceObject.computed)(function () {
2693
- return src_fecha.format(parentProvide.panelDate, props.format);
2694
- });
2695
2693
  var timeSlots = (0,external_vue_namespaceObject.computed)(function () {
2696
2694
  if (!props.value[0]) {
2697
2695
  return [];
@@ -2745,6 +2743,10 @@ var timeProps = {
2745
2743
  var newVal = dates[0] || initTime();
2746
2744
  newVal = new Date(newVal);
2747
2745
  state.date = newVal;
2746
+ parentProvide.panelDate = newVal;
2747
+ visibleDate.value = src_fecha.format(parentProvide.panelDate, props.format);
2748
+ }, {
2749
+ immediate: true
2748
2750
  });
2749
2751
  (0,external_vue_namespaceObject.onMounted)(function () {
2750
2752
  if (parentProvide && parentProvide.parentName === 'DatePanel') {
@@ -5382,7 +5384,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
5382
5384
  var handleInputChange = function handleInputChange(e) {
5383
5385
  var _props$disabledDate;
5384
5386
  var isArrayValue = props.type.includes('range') || props.multiple;
5385
- var oldValue = visualValue.value;
5387
+ // const oldValue = visualValue.value;
5386
5388
  var newValue = e.target.value;
5387
5389
  var newDate = parseDate(newValue, props.type, props.multiple, props.format);
5388
5390
  var valueToTest = isArrayValue ? newDate : newDate[0];
@@ -5390,7 +5392,9 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
5390
5392
  var isValidDate = newDate.reduce(function (valid, date) {
5391
5393
  return valid && date instanceof Date;
5392
5394
  }, true);
5393
- if (newValue !== oldValue && !isDisabled && isValidDate) {
5395
+ // 这里不需要进行新旧数据对比是因为input输入的时候visualValue的computed依赖始终是最新的
5396
+ // if (newValue !== oldValue && !isDisabled && isValidDate) {
5397
+ if (!isDisabled && isValidDate) {
5394
5398
  emitChange(props.type);
5395
5399
  state.internalValue = newDate;
5396
5400
  } else {
@@ -186,7 +186,7 @@ declare const _default: import("vue").DefineComponent<{
186
186
  readonly default: true;
187
187
  };
188
188
  }, {
189
- visibleDate: import("vue").ComputedRef<any>;
189
+ visibleDate: import("vue").Ref<any>;
190
190
  showSeconds: import("vue").ComputedRef<boolean>;
191
191
  timeSlots: import("vue").ComputedRef<any[]>;
192
192
  disabledHMS: import("vue").ComputedRef<IDisabledHMS>;
@@ -1053,7 +1053,7 @@ function _toConsumableArray(arr) {
1053
1053
  ;// CONCATENATED MODULE: external "vue"
1054
1054
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1055
1055
  var external_vue_y = x => () => x
1056
- const external_vue_namespaceObject = external_vue_x({ ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render });
1056
+ const external_vue_namespaceObject = external_vue_x({ ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render });
1057
1057
  ;// CONCATENATED MODULE: external "../shared"
1058
1058
  var shared_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1059
1059
  var shared_y = x => () => x
@@ -1100,9 +1100,15 @@ var tooltips_nodeList = new WeakMap();
1100
1100
  var tooltips = {
1101
1101
  beforeMount: function beforeMount(el, binding) {
1102
1102
  var opts = getOpts(binding);
1103
- var trigger = opts.trigger;
1103
+ var trigger = opts.trigger,
1104
+ showOnInit = opts.showOnInit;
1104
1105
  var popper = renderContent(opts);
1105
1106
  var delayTimeout = null;
1107
+ if (showOnInit) {
1108
+ (0,external_vue_namespaceObject.nextTick)(function () {
1109
+ show(el);
1110
+ });
1111
+ }
1106
1112
  if (trigger === 'hover') {
1107
1113
  var hideTimeout = null;
1108
1114
  el.addEventListener('mouseenter', function () {
@@ -1250,7 +1256,6 @@ function createPopperInstance(el, popper) {
1250
1256
  opts = _nodeList$get.opts;
1251
1257
  var placement = opts.placement,
1252
1258
  distance = opts.distance,
1253
- showOnInit = opts.showOnInit,
1254
1259
  sameWidth = opts.sameWidth;
1255
1260
  var popperInstance = (0,core_namespaceObject.createPopper)(el, popper, {
1256
1261
  placement: placement,
@@ -1275,7 +1280,6 @@ function createPopperInstance(el, popper) {
1275
1280
  }
1276
1281
  }] : []))
1277
1282
  });
1278
- if (showOnInit) show(el);
1279
1283
  return popperInstance;
1280
1284
  }
1281
1285
  /**
package/lib/index.js CHANGED
@@ -4,5 +4,5 @@ export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
6
  export * as plugins from './plugins';
7
- export const version = "2.0.1-beta.57.table.1";
7
+ export const version = "2.0.1-beta.58";
8
8
  window.__bkui_vue_version__ = version;
@@ -832,6 +832,7 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
832
832
  cls = _ctx$attrs["class"],
833
833
  style = _ctx$attrs.style,
834
834
  inputAttrs = _objectWithoutProperties(_ctx$attrs, _excluded);
835
+ var parentRef = (0,external_vue_namespaceObject.ref)();
835
836
  var inputRef = (0,external_vue_namespaceObject.ref)();
836
837
  var innerInputValue = (0,external_vue_namespaceObject.ref)(typeof props.modelValue === 'undefined' || props.modelValue === null ? {} : {
837
838
  value: props.modelValue
@@ -872,7 +873,27 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
872
873
  }
873
874
  };
874
875
  };
876
+ var dragTextareaResize = function dragTextareaResize() {
877
+ return function () {
878
+ var _parentRef$value;
879
+ // 必须是autosize才能实现拖拽,且设置了maxRows还是会覆盖原有默认高度出现滚动条
880
+ if (!isTextArea.value || !props.autosize) return;
881
+ var isElHidden = ((_parentRef$value = parentRef.value) === null || _parentRef$value === void 0 ? void 0 : _parentRef$value.offsetParent) === null;
882
+ if (!isElHidden) {
883
+ var _inputRef$value2, _parentRef$value2, _parentRef$value3, _parentRef$value4, _parentRef$value5;
884
+ (_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 || (_inputRef$value2 = _inputRef$value2.style) === null || _inputRef$value2 === void 0 || _inputRef$value2.setProperty('height', "".concat((_parentRef$value2 = parentRef.value) === null || _parentRef$value2 === void 0 ? void 0 : _parentRef$value2.offsetHeight, "px"));
885
+ textareaCalcStyle.value = Object.assign(textareaCalcStyle.value, {
886
+ height: "".concat((_parentRef$value3 = parentRef.value) === null || _parentRef$value3 === void 0 ? void 0 : _parentRef$value3.offsetHeight, "px")
887
+ });
888
+ if (((_parentRef$value4 = parentRef.value) === null || _parentRef$value4 === void 0 ? void 0 : _parentRef$value4.offsetWidth) > ((_parentRef$value5 = parentRef.value) === null || _parentRef$value5 === void 0 || (_parentRef$value5 = _parentRef$value5.parentNode) === null || _parentRef$value5 === void 0 ? void 0 : _parentRef$value5.offsetWidth)) {
889
+ var _parentRef$value6, _parentRef$value7;
890
+ (_parentRef$value6 = parentRef.value) === null || _parentRef$value6 === void 0 || (_parentRef$value6 = _parentRef$value6.style) === null || _parentRef$value6 === void 0 || _parentRef$value6.setProperty('width', "".concat((_parentRef$value7 = parentRef.value) === null || _parentRef$value7 === void 0 || (_parentRef$value7 = _parentRef$value7.parentNode) === null || _parentRef$value7 === void 0 ? void 0 : _parentRef$value7.offsetWidth, "px"));
891
+ }
892
+ }
893
+ };
894
+ };
875
895
  var onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
896
+ var onDragSizeTextarea = dragTextareaResize();
876
897
  var suffixCls = getCls('suffix-icon');
877
898
  var suffixIconMap = {
878
899
  search: function search() {
@@ -965,6 +986,7 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
965
986
  });
966
987
  var resizeObserver = new ResizeObserver(function () {
967
988
  onceInitSizeTextarea();
989
+ onDragSizeTextarea();
968
990
  setOverflow();
969
991
  });
970
992
  (0,external_vue_namespaceObject.watch)(function () {
@@ -994,7 +1016,8 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
994
1016
  value: val
995
1017
  };
996
1018
  (0,external_vue_namespaceObject.nextTick)(function () {
997
- return resizeTextarea();
1019
+ resizeTextarea();
1020
+ onDragSizeTextarea();
998
1021
  });
999
1022
  setOverflow();
1000
1023
  });
@@ -1006,8 +1029,8 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
1006
1029
  });
1007
1030
  // Hack: 修复autofocus属性失效问题 原生autofocus属性只在页面加载时生效
1008
1031
  if (Object.prototype.hasOwnProperty.call(ctx.attrs, 'autofocus')) {
1009
- var _inputRef$value2, _inputRef$value2$focu;
1010
- (_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 || (_inputRef$value2$focu = _inputRef$value2.focus) === null || _inputRef$value2$focu === void 0 || _inputRef$value2$focu.call(_inputRef$value2);
1032
+ var _inputRef$value3, _inputRef$value3$focu;
1033
+ (_inputRef$value3 = inputRef.value) === null || _inputRef$value3 === void 0 || (_inputRef$value3$focu = _inputRef$value3.focus) === null || _inputRef$value3$focu === void 0 || _inputRef$value3$focu.call(_inputRef$value3);
1011
1034
  }
1012
1035
  });
1013
1036
  (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
@@ -1024,8 +1047,8 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
1024
1047
  clear: clear
1025
1048
  });
1026
1049
  function detectOverflow() {
1027
- var _inputRef$value3, _inputRef$value4;
1028
- return ((_inputRef$value3 = inputRef.value) === null || _inputRef$value3 === void 0 ? void 0 : _inputRef$value3.scrollWidth) > ((_inputRef$value4 = inputRef.value) === null || _inputRef$value4 === void 0 ? void 0 : _inputRef$value4.clientWidth) + 2;
1050
+ var _inputRef$value4, _inputRef$value5;
1051
+ return ((_inputRef$value4 = inputRef.value) === null || _inputRef$value4 === void 0 ? void 0 : _inputRef$value4.scrollWidth) > ((_inputRef$value5 = inputRef.value) === null || _inputRef$value5 === void 0 ? void 0 : _inputRef$value5.clientWidth) + 2;
1029
1052
  }
1030
1053
  function setOverflow() {
1031
1054
  setTimeout(function () {
@@ -1163,6 +1186,7 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
1163
1186
  return function () {
1164
1187
  var _ctx$slots$prefix, _ctx$slots, _ctx$slots$prefix2, _ctx$slots$suffix, _ctx$slots2, _ctx$slots2$suffix;
1165
1188
  return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
1189
+ "ref": parentRef,
1166
1190
  "style": style,
1167
1191
  "class": inputCls.value
1168
1192
  }, [(_ctx$slots$prefix = (_ctx$slots = ctx.slots) === null || _ctx$slots === void 0 || (_ctx$slots$prefix2 = _ctx$slots.prefix) === null || _ctx$slots$prefix2 === void 0 ? void 0 : _ctx$slots$prefix2.call(_ctx$slots)) !== null && _ctx$slots$prefix !== void 0 ? _ctx$slots$prefix : props.prefix && (0,external_vue_namespaceObject.createVNode)("div", {
@@ -515,6 +515,7 @@ const popover_less_namespaceObject = popover_less_x({ });
515
515
  var inputRef = (0,external_vue_namespaceObject.ref)(null);
516
516
  var isFocused = (0,external_vue_namespaceObject.ref)(false);
517
517
  var localCurrent = (0,external_vue_namespaceObject.ref)(1);
518
+ var isPopoverShow = (0,external_vue_namespaceObject.ref)(false);
518
519
  var isPagePreDisabled = (0,external_vue_namespaceObject.computed)(function () {
519
520
  return localCurrent.value === 1;
520
521
  });
@@ -596,6 +597,7 @@ const popover_less_namespaceObject = popover_less_x({ });
596
597
  */
597
598
  var handlePageEditorBlur = function handlePageEditorBlur() {
598
599
  isFocused.value = false;
600
+ isPopoverShow.value = false;
599
601
  if (inputMemo !== localCurrent.value) {
600
602
  localCurrent.value = inputMemo;
601
603
  }
@@ -631,6 +633,13 @@ const popover_less_namespaceObject = popover_less_x({ });
631
633
  inputMemo = item;
632
634
  handlePageEditorBlur();
633
635
  };
636
+ /**
637
+ * @desc 点击关闭popover事件
638
+ * @param { boolean } isShow
639
+ */
640
+ var handlePopShow = function handlePopShow(isShow) {
641
+ isPopoverShow.value = isShow;
642
+ };
634
643
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
635
644
  resolveClassName = _usePrefix.resolveClassName;
636
645
  var render = function render() {
@@ -644,9 +653,16 @@ const popover_less_namespaceObject = popover_less_x({ });
644
653
  "arrow": false,
645
654
  "boundary": "body",
646
655
  "disabled": proxy.disabled,
656
+ "isShow": isPopoverShow.value,
647
657
  "placement": "bottom",
648
658
  "theme": "light",
649
- "trigger": "click"
659
+ "trigger": "click",
660
+ "onAfterHidden": function onAfterHidden() {
661
+ return handlePopShow(false);
662
+ },
663
+ "onAfterShow": function onAfterShow() {
664
+ return handlePopShow(true);
665
+ }
650
666
  }, {
651
667
  "default": function _default() {
652
668
  return (0,external_vue_namespaceObject.createVNode)("div", {
@@ -1610,12 +1610,8 @@ var BkScrollbar = /*#__PURE__*/function () {
1610
1610
  value: function scrollTo(_ref3) {
1611
1611
  var x = _ref3.x,
1612
1612
  y = _ref3.y;
1613
- if (y !== undefined && typeof y === 'number') {
1614
- this.element.scrollTop = y;
1615
- }
1616
- if (x !== undefined && typeof x === 'number') {
1617
- this.element.scrollLeft = x;
1618
- }
1613
+ this.element.scrollTop = y;
1614
+ this.element.scrollLeft = x;
1619
1615
  update_geometry(this);
1620
1616
  }
1621
1617
  /**
@@ -79,7 +79,7 @@ declare const _default: import("vue").DefineComponent<{
79
79
  } & {
80
80
  default: number;
81
81
  };
82
- }, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
82
+ }, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
83
83
  label: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
84
84
  field: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
85
85
  render: import("vue-types").VueTypeDef<import("../props").RenderFunctionString>;
@@ -6,7 +6,7 @@ declare const _default: (props: TablePropTypes, ctx: any) => {
6
6
  renderBody: (list: any, childrend?: any, fixedRows?: any) => JSX.Element;
7
7
  renderFooter: (childrend?: any) => JSX.Element;
8
8
  renderFixedBottom: () => JSX.Element;
9
- setBodyHeight: (height: number, withHeadFoot?: boolean) => void;
9
+ setBodyHeight: (height: number) => void;
10
10
  setVirtualBodyHeight: (height: number) => void;
11
11
  setFootHeight: (height: number) => void;
12
12
  setTranslateX: (val: number) => void;
@@ -18,10 +18,9 @@ declare const useRows: (props: TablePropTypes) => {
18
18
  getRowSelection: () => any[];
19
19
  getRowIndeterminate: () => any;
20
20
  getRowCheckedAllValue: () => any;
21
- getCurrentPageRowsHeight: () => any;
22
21
  changePageRowIndex: (sourceIndex: any, targetIndex: any) => void;
23
22
  toggleAllSelection: (value?: boolean) => void;
24
- getRowHeight: (row?: any, index?: any, type?: any) => number;
23
+ getRowHeight: (row?: any, index?: any, type?: any) => any;
25
24
  tableRowList: import("vue").Ref<any[]>;
26
25
  tableRowSchema: WeakMap<object, any> & Omit<WeakMap<object, any>, keyof WeakMap<any, any>>;
27
26
  pageRowList: any[];
@@ -34,6 +34,7 @@ declare const useSettings: (props: TablePropTypes, ctx: SetupContext, columns: U
34
34
  filter?: string | boolean | {
35
35
  list: {
36
36
  label: string;
37
+ text?: string;
37
38
  value: string;
38
39
  }[];
39
40
  filterFn?: (...args: any[]) => boolean;
@@ -86,6 +87,7 @@ declare const useSettings: (props: TablePropTypes, ctx: SetupContext, columns: U
86
87
  filter?: string | boolean | {
87
88
  list: {
88
89
  label: string;
90
+ text?: string;
89
91
  value: string;
90
92
  }[];
91
93
  filterFn?: (...args: any[]) => boolean;
@@ -908,7 +908,7 @@ declare const BkTable: {
908
908
  } & {
909
909
  default: number;
910
910
  };
911
- }, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
911
+ }, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
912
912
  label: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
913
913
  field: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
914
914
  render: import("vue-types").VueTypeDef<import("./props").RenderFunctionString>;
@@ -17327,7 +17327,9 @@ function _objectDestructuringEmpty(obj) {
17327
17327
  ;// CONCATENATED MODULE: external "vue"
17328
17328
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
17329
17329
  var external_vue_y = x => () => x
17330
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isRef, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17330
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isRef, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17331
+ // EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
17332
+ var lodash = __webpack_require__(6635);
17331
17333
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
17332
17334
  function typeof_typeof(o) {
17333
17335
  "@babel/helpers - typeof";
@@ -17938,8 +17940,6 @@ var tableProps = {
17938
17940
  }
17939
17941
  })
17940
17942
  };
17941
- // EXTERNAL MODULE: ../../node_modules/lodash/lodash.js
17942
- var lodash = __webpack_require__(6635);
17943
17943
  ;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
17944
17944
 
17945
17945
  /*
@@ -17999,23 +17999,10 @@ var TableColumnProp = {
17999
17999
  _objectDestructuringEmpty(_ref);
18000
18000
  var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
18001
18001
  var lastPropsVal = {};
18002
- var isPropsEqual = function isPropsEqual(sorce, target) {
18003
- var rawProps = (0,external_vue_namespaceObject.toRaw)(target);
18004
- var keys = Object.keys(rawProps);
18005
- return keys.every(function (key) {
18006
- if (typeof rawProps[key] === 'function') {
18007
- return sorce[key] !== undefined;
18008
- }
18009
- if (key === 'children') {
18010
- return true;
18011
- }
18012
- return (0,lodash.isEqual)(sorce[key], target[key]);
18013
- });
18014
- };
18015
18002
  (0,external_vue_namespaceObject.watch)(function () {
18016
18003
  return [props];
18017
18004
  }, function () {
18018
- if (!isPropsEqual(lastPropsVal, props)) {
18005
+ if (!(0,lodash.isEqual)(lastPropsVal, (0,external_vue_namespaceObject.toRaw)(props))) {
18019
18006
  initTableColumns();
18020
18007
  Object.assign(lastPropsVal, (0,external_vue_namespaceObject.toRaw)(props));
18021
18008
  }
@@ -18026,21 +18013,7 @@ var TableColumnProp = {
18026
18013
  (0,external_vue_namespaceObject.onUnmounted)(function () {
18027
18014
  initTableColumns();
18028
18015
  });
18029
- },
18030
- render: function render() {
18031
- try {
18032
- var _this$$slots$default, _this$$slots;
18033
- var renderDefault = (_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots, {
18034
- row: {},
18035
- column: {},
18036
- $index: -1
18037
- });
18038
- var children = [renderDefault];
18039
- var vnode = (0,external_vue_namespaceObject.h)('div', children);
18040
- return vnode;
18041
- } catch (_unused) {
18042
- return (0,external_vue_namespaceObject.h)('div', []);
18043
- }
18016
+ return function () {};
18044
18017
  }
18045
18018
  }));
18046
18019
  ;// CONCATENATED MODULE: ../../packages/table/src/events.ts
@@ -21357,12 +21330,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21357
21330
  return null;
21358
21331
  });
21359
21332
  var setBodyHeight = function setBodyHeight(height) {
21360
- var withHeadFoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
21361
- if (withHeadFoot) {
21362
- bodyHeight.value = height - headHeight.value - fixedBottomHeight.value - footHeight.value;
21363
- return;
21364
- }
21365
- bodyHeight.value = height;
21333
+ bodyHeight.value = height - headHeight.value - fixedBottomHeight.value - footHeight.value;
21366
21334
  };
21367
21335
  var setVirtualBodyHeight = function setVirtualBodyHeight(height) {
21368
21336
  bodyHeight.value = height;
@@ -21905,11 +21873,20 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21905
21873
  * 当表格中的字段或数据需要做解释说明时,可增加 [下划线] 提示,hover 可查看解释说明的 tooltips
21906
21874
  */
21907
21875
  if (props.column.explain) {
21908
- disabled = false;
21876
+ // showTooltip默认为false,所以disabled默认为true,当设置showTooltip时才需要展示表格内容是否显示溢出效果
21877
+ var isDisabled = true;
21878
+ if (typeof showOverflowTooltip === 'boolean') {
21879
+ isDisabled = !showOverflowTooltip;
21880
+ }
21881
+ if (typeof_typeof(showOverflowTooltip) === 'object') {
21882
+ isDisabled = showOverflowTooltip.disabled;
21883
+ }
21884
+ disabled = isDisabled;
21909
21885
  mode = 'static';
21910
21886
  if (typeof_typeof(props.column.explain) === 'object') {
21887
+ // 这里需要处理content为空,提供defaultContent
21911
21888
  content = function content() {
21912
- return resolvePropVal(props.column.explain, 'content', [props.column, props.row]);
21889
+ return resolvePropVal(props.column.explain, 'content', [props.column, props.row]) || defaultContent;
21913
21890
  };
21914
21891
  }
21915
21892
  }
@@ -22432,7 +22409,6 @@ var ROW_HEIGHT = 32;
22432
22409
  },
22433
22410
  emits: ['change', 'filterSave', 'reset'],
22434
22411
  setup: function setup(props, _ref) {
22435
- var _state$checked;
22436
22412
  var emit = _ref.emit;
22437
22413
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
22438
22414
  resolveClassName = _usePrefix.resolveClassName;
@@ -22448,16 +22424,16 @@ var ROW_HEIGHT = 32;
22448
22424
  var searchValue = (0,external_vue_namespaceObject.ref)('');
22449
22425
  var state = (0,external_vue_namespaceObject.reactive)({
22450
22426
  isOpen: false,
22451
- checked: []
22427
+ checked: checked.value
22452
22428
  });
22453
- (_state$checked = state.checked).push.apply(_state$checked, _toConsumableArray(checked.value));
22454
22429
  (0,external_vue_namespaceObject.watch)(function () {
22455
22430
  return checked;
22456
22431
  }, function () {
22457
- var _state$checked2;
22432
+ var _state$checked;
22458
22433
  state.checked.length = 0;
22459
22434
  state.checked = [];
22460
- (_state$checked2 = state.checked).push.apply(_state$checked2, _toConsumableArray(checked.value));
22435
+ (_state$checked = state.checked).push.apply(_state$checked, _toConsumableArray(checked.value));
22436
+ // handleBtnSaveClick();
22461
22437
  }, {
22462
22438
  deep: true
22463
22439
  });
@@ -22481,7 +22457,7 @@ var ROW_HEIGHT = 32;
22481
22457
  list = _filter$value$list === void 0 ? [] : _filter$value$list;
22482
22458
  var filterList = list.filter(function (l) {
22483
22459
  var reg = getRegExp(searchValue.value);
22484
- return reg.test(l.label) || reg.test(l.value);
22460
+ return reg.test(l.label) || reg.test(l.text) || reg.test(l.value);
22485
22461
  });
22486
22462
  return filterList;
22487
22463
  });
@@ -22491,8 +22467,11 @@ var ROW_HEIGHT = 32;
22491
22467
  return (_filter$value$maxHeig = (_filter$value2 = filter.value) === null || _filter$value2 === void 0 ? void 0 : _filter$value2.maxHeight) !== null && _filter$value$maxHeig !== void 0 ? _filter$value$maxHeig : ROW_HEIGHT * maxLength;
22492
22468
  });
22493
22469
  var height = (0,external_vue_namespaceObject.computed)(function () {
22494
- var _filter$value3;
22495
- return ((_filter$value3 = filter.value) === null || _filter$value3 === void 0 ? void 0 : _filter$value3.height) || '100%';
22470
+ var _filter$value3 = filter.value,
22471
+ height = _filter$value3.height,
22472
+ _filter$value3$list = _filter$value3.list,
22473
+ list = _filter$value3$list === void 0 ? [] : _filter$value3$list;
22474
+ return height || list.length * ROW_HEIGHT;
22496
22475
  });
22497
22476
  var minHeight = (0,external_vue_namespaceObject.computed)(function () {
22498
22477
  var defaultMin = ROW_HEIGHT * 2;
@@ -22581,7 +22560,7 @@ var ROW_HEIGHT = 32;
22581
22560
  });
22582
22561
  };
22583
22562
  var handleValueChange = function handleValueChange(val, item) {
22584
- var _state$checked3;
22563
+ var _state$checked2;
22585
22564
  var setValue = new Set(state.checked);
22586
22565
  if (val) {
22587
22566
  setValue.add(item.value);
@@ -22589,7 +22568,7 @@ var ROW_HEIGHT = 32;
22589
22568
  setValue["delete"](item.value);
22590
22569
  }
22591
22570
  state.checked.length = 0;
22592
- (_state$checked3 = state.checked).push.apply(_state$checked3, _toConsumableArray(Array.from(setValue)));
22571
+ (_state$checked2 = state.checked).push.apply(_state$checked2, _toConsumableArray(Array.from(setValue)));
22593
22572
  handleFilterChange();
22594
22573
  };
22595
22574
  var renderFilterList = function renderFilterList(scope) {
@@ -24006,11 +23985,6 @@ var useRows = function useRows(props) {
24006
23985
  (_tableRowList$value = tableRowList.value).push.apply(_tableRowList$value, _toConsumableArray(data));
24007
23986
  formatDataSchema();
24008
23987
  };
24009
- var getCurrentPageRowsHeight = function getCurrentPageRowsHeight() {
24010
- return pageRowList.reduce(function (out, row) {
24011
- return out + getRowHeight(row);
24012
- }, 0);
24013
- };
24014
23988
  return {
24015
23989
  setRowIndex: setRowIndex,
24016
23990
  setRowExpand: setRowExpand,
@@ -24029,7 +24003,6 @@ var useRows = function useRows(props) {
24029
24003
  getRowSelection: getRowSelection,
24030
24004
  getRowIndeterminate: getRowIndeterminate,
24031
24005
  getRowCheckedAllValue: getRowCheckedAllValue,
24032
- getCurrentPageRowsHeight: getCurrentPageRowsHeight,
24033
24006
  changePageRowIndex: changePageRowIndex,
24034
24007
  toggleAllSelection: toggleAllSelection,
24035
24008
  getRowHeight: getRowHeight,
@@ -24562,7 +24535,6 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24562
24535
  setBodyHeight(Number("".concat(props.height).replace('px', '')));
24563
24536
  }
24564
24537
  };
24565
- var scrollTo00 = (0,external_vue_namespaceObject.ref)(false);
24566
24538
  var setTableData = (0,lodash.debounce)(function () {
24567
24539
  var resetScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
24568
24540
  var filterOrderList = getFilterAndSortList();
@@ -24573,15 +24545,10 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24573
24545
  }
24574
24546
  var renderList = getRenderRowList(filterOrderList);
24575
24547
  rows.setPageRowList(renderList);
24576
- if (resetScroll) {
24577
- scrollTo00.value = true;
24578
- }
24579
24548
  (0,external_vue_namespaceObject.nextTick)(function () {
24580
24549
  setOffsetRight();
24581
- setRowsBodyHeight();
24582
- if (scrollTo00.value) {
24550
+ if (resetScroll) {
24583
24551
  scrollTo(0, 0);
24584
- scrollTo00.value = false;
24585
24552
  }
24586
24553
  });
24587
24554
  }, 64);
@@ -24612,11 +24579,6 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24612
24579
  observerResizing.value = false;
24613
24580
  });
24614
24581
  });
24615
- var setRowsBodyHeight = function setRowsBodyHeight() {
24616
- if (props.height === '100%') {
24617
- setBodyHeight(rows.getCurrentPageRowsHeight(), false);
24618
- }
24619
- };
24620
24582
  (0,external_vue_namespaceObject.watch)(function () {
24621
24583
  return [props.columns];
24622
24584
  }, function () {
@@ -24642,19 +24604,12 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24642
24604
  deep: true
24643
24605
  });
24644
24606
  (0,external_vue_namespaceObject.watch)(function () {
24645
- return [columns.filterColumns];
24607
+ return [columns.sortColumns, columns.filterColumns];
24646
24608
  }, function () {
24647
24609
  setTableData();
24648
24610
  }, {
24649
24611
  deep: true
24650
24612
  });
24651
- (0,external_vue_namespaceObject.watch)(function () {
24652
- return [columns.sortColumns];
24653
- }, function () {
24654
- setTableData(false);
24655
- }, {
24656
- deep: true
24657
- });
24658
24613
  (0,external_vue_namespaceObject.watch)(function () {
24659
24614
  return [pagination.isShowPagination.value];
24660
24615
  }, function () {
@@ -24674,17 +24629,10 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24674
24629
  (0,external_vue_namespaceObject.watch)(function () {
24675
24630
  return [pagination.options.count, pagination.options.limit, pagination.options.current];
24676
24631
  }, function () {
24677
- setTableData(false);
24632
+ setTableData();
24678
24633
  }, {
24679
24634
  immediate: true
24680
24635
  });
24681
- (0,external_vue_namespaceObject.watch)(function () {
24682
- return [rows.pageRowList.length];
24683
- }, function () {
24684
- var _refBody$value2, _refBody$value2$updat;
24685
- scrollTo(undefined, 0);
24686
- refBody === null || refBody === void 0 || (_refBody$value2 = refBody.value) === null || _refBody$value2 === void 0 || (_refBody$value2$updat = _refBody$value2.updateScroll) === null || _refBody$value2$updat === void 0 || _refBody$value2$updat.call(_refBody$value2);
24687
- });
24688
24636
  ctx.expose({
24689
24637
  setRowExpand: rows.setRowExpand,
24690
24638
  setAllRowExpand: rows.setAllRowExpand,
@@ -182,6 +182,7 @@
182
182
  white-space: nowrap;
183
183
  text-overflow: ellipsis;
184
184
  overflow: hidden;
185
+ max-width: calc(100% - 22px);
185
186
  }
186
187
  .bk-popover.bk-pop2-content.bk-table-head-filter .content-list .content-items .list-item .bk-checkbox {
187
188
  margin-left: 0;
@@ -62,6 +62,7 @@
62
62
  white-space: nowrap;
63
63
  text-overflow: ellipsis;
64
64
  overflow: hidden;
65
+ max-width: calc(100% - 22px);
65
66
  }
66
67
 
67
68
  .@{bk-prefix}-checkbox {
@@ -442,6 +442,7 @@
442
442
  white-space: nowrap;
443
443
  text-overflow: ellipsis;
444
444
  overflow: hidden;
445
+ max-width: calc(100% - 22px);
445
446
  }
446
447
  .bk-popover.bk-pop2-content.bk-table-head-filter .content-list .content-items .list-item .bk-checkbox {
447
448
  margin-left: 0;
@@ -69,6 +69,7 @@ export type ISortPropShape = ISortShape | boolean | string;
69
69
  export type IFilterShape = {
70
70
  list: {
71
71
  label: string;
72
+ text?: string;
72
73
  value: string;
73
74
  }[];
74
75
  filterFn?: (...args: any[]) => boolean;
@@ -1054,6 +1054,7 @@
1054
1054
  white-space: nowrap;
1055
1055
  text-overflow: ellipsis;
1056
1056
  overflow: hidden;
1057
+ max-width: calc(100% - 22px);
1057
1058
  }
1058
1059
  .bk-popover.bk-pop2-content.bk-table-head-filter .content-list .content-items .list-item .bk-checkbox {
1059
1060
  margin-left: 0;
@@ -1523,14 +1524,6 @@
1523
1524
  cursor: pointer;
1524
1525
  background: var(--table-row-active-bg-color);
1525
1526
  }
1526
- .bk-table .bk-table-head table tbody tr.stripe-row,
1527
- .bk-table .bk-table-body table tbody tr.stripe-row {
1528
- background: #fafbfd;
1529
- }
1530
- .bk-table .bk-table-head table tbody tr.stripe-row td,
1531
- .bk-table .bk-table-body table tbody tr.stripe-row td {
1532
- background-color: #fafbfd;
1533
- }
1534
1527
  .bk-table .bk-table-head table tbody tr td,
1535
1528
  .bk-table .bk-table-body table tbody tr td {
1536
1529
  background-color: #fff;
@@ -1736,6 +1729,9 @@
1736
1729
  .bk-table .bk-pagination .is-last {
1737
1730
  margin-left: auto;
1738
1731
  }
1732
+ .bk-table .stripe-row {
1733
+ background: #fafbfd;
1734
+ }
1739
1735
  .bk-across-page-popover {
1740
1736
  padding: 0!important;
1741
1737
  }