bkui-vue 2.0.1-beta.57.table.2 → 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.2";
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,8 +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
- getBodyHeight: (height: any) => number;
10
- setBodyHeight: (height: number, withHeadFoot?: boolean) => void;
9
+ setBodyHeight: (height: number) => void;
11
10
  setVirtualBodyHeight: (height: number) => void;
12
11
  setFootHeight: (height: number) => void;
13
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
@@ -21356,16 +21329,8 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21356
21329
  }
21357
21330
  return null;
21358
21331
  });
21359
- var getBodyHeight = function getBodyHeight(height) {
21360
- return height - headHeight.value - fixedBottomHeight.value - footHeight.value;
21361
- };
21362
21332
  var setBodyHeight = function setBodyHeight(height) {
21363
- var withHeadFoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
21364
- if (withHeadFoot) {
21365
- bodyHeight.value = getBodyHeight(height);
21366
- return;
21367
- }
21368
- bodyHeight.value = height;
21333
+ bodyHeight.value = height - headHeight.value - fixedBottomHeight.value - footHeight.value;
21369
21334
  };
21370
21335
  var setVirtualBodyHeight = function setVirtualBodyHeight(height) {
21371
21336
  bodyHeight.value = height;
@@ -21506,7 +21471,6 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
21506
21471
  renderBody: renderBody,
21507
21472
  renderFooter: renderFooter,
21508
21473
  renderFixedBottom: renderFixedBottom,
21509
- getBodyHeight: getBodyHeight,
21510
21474
  setBodyHeight: setBodyHeight,
21511
21475
  setVirtualBodyHeight: setVirtualBodyHeight,
21512
21476
  setFootHeight: setFootHeight,
@@ -21909,11 +21873,20 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
21909
21873
  * 当表格中的字段或数据需要做解释说明时,可增加 [下划线] 提示,hover 可查看解释说明的 tooltips
21910
21874
  */
21911
21875
  if (props.column.explain) {
21912
- 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;
21913
21885
  mode = 'static';
21914
21886
  if (typeof_typeof(props.column.explain) === 'object') {
21887
+ // 这里需要处理content为空,提供defaultContent
21915
21888
  content = function content() {
21916
- return resolvePropVal(props.column.explain, 'content', [props.column, props.row]);
21889
+ return resolvePropVal(props.column.explain, 'content', [props.column, props.row]) || defaultContent;
21917
21890
  };
21918
21891
  }
21919
21892
  }
@@ -22436,7 +22409,6 @@ var ROW_HEIGHT = 32;
22436
22409
  },
22437
22410
  emits: ['change', 'filterSave', 'reset'],
22438
22411
  setup: function setup(props, _ref) {
22439
- var _state$checked;
22440
22412
  var emit = _ref.emit;
22441
22413
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
22442
22414
  resolveClassName = _usePrefix.resolveClassName;
@@ -22452,16 +22424,16 @@ var ROW_HEIGHT = 32;
22452
22424
  var searchValue = (0,external_vue_namespaceObject.ref)('');
22453
22425
  var state = (0,external_vue_namespaceObject.reactive)({
22454
22426
  isOpen: false,
22455
- checked: []
22427
+ checked: checked.value
22456
22428
  });
22457
- (_state$checked = state.checked).push.apply(_state$checked, _toConsumableArray(checked.value));
22458
22429
  (0,external_vue_namespaceObject.watch)(function () {
22459
22430
  return checked;
22460
22431
  }, function () {
22461
- var _state$checked2;
22432
+ var _state$checked;
22462
22433
  state.checked.length = 0;
22463
22434
  state.checked = [];
22464
- (_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();
22465
22437
  }, {
22466
22438
  deep: true
22467
22439
  });
@@ -22485,7 +22457,7 @@ var ROW_HEIGHT = 32;
22485
22457
  list = _filter$value$list === void 0 ? [] : _filter$value$list;
22486
22458
  var filterList = list.filter(function (l) {
22487
22459
  var reg = getRegExp(searchValue.value);
22488
- return reg.test(l.label) || reg.test(l.value);
22460
+ return reg.test(l.label) || reg.test(l.text) || reg.test(l.value);
22489
22461
  });
22490
22462
  return filterList;
22491
22463
  });
@@ -22495,8 +22467,11 @@ var ROW_HEIGHT = 32;
22495
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;
22496
22468
  });
22497
22469
  var height = (0,external_vue_namespaceObject.computed)(function () {
22498
- var _filter$value3;
22499
- 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;
22500
22475
  });
22501
22476
  var minHeight = (0,external_vue_namespaceObject.computed)(function () {
22502
22477
  var defaultMin = ROW_HEIGHT * 2;
@@ -22585,7 +22560,7 @@ var ROW_HEIGHT = 32;
22585
22560
  });
22586
22561
  };
22587
22562
  var handleValueChange = function handleValueChange(val, item) {
22588
- var _state$checked3;
22563
+ var _state$checked2;
22589
22564
  var setValue = new Set(state.checked);
22590
22565
  if (val) {
22591
22566
  setValue.add(item.value);
@@ -22593,7 +22568,7 @@ var ROW_HEIGHT = 32;
22593
22568
  setValue["delete"](item.value);
22594
22569
  }
22595
22570
  state.checked.length = 0;
22596
- (_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)));
22597
22572
  handleFilterChange();
22598
22573
  };
22599
22574
  var renderFilterList = function renderFilterList(scope) {
@@ -24010,11 +23985,6 @@ var useRows = function useRows(props) {
24010
23985
  (_tableRowList$value = tableRowList.value).push.apply(_tableRowList$value, _toConsumableArray(data));
24011
23986
  formatDataSchema();
24012
23987
  };
24013
- var getCurrentPageRowsHeight = function getCurrentPageRowsHeight() {
24014
- return pageRowList.reduce(function (out, row) {
24015
- return out + getRowHeight(row);
24016
- }, 0);
24017
- };
24018
23988
  return {
24019
23989
  setRowIndex: setRowIndex,
24020
23990
  setRowExpand: setRowExpand,
@@ -24033,7 +24003,6 @@ var useRows = function useRows(props) {
24033
24003
  getRowSelection: getRowSelection,
24034
24004
  getRowIndeterminate: getRowIndeterminate,
24035
24005
  getRowCheckedAllValue: getRowCheckedAllValue,
24036
- getCurrentPageRowsHeight: getCurrentPageRowsHeight,
24037
24006
  changePageRowIndex: changePageRowIndex,
24038
24007
  toggleAllSelection: toggleAllSelection,
24039
24008
  getRowHeight: getRowHeight,
@@ -24446,7 +24415,6 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24446
24415
  setOffsetRight = _useLayout.setOffsetRight,
24447
24416
  setHeaderRowCount = _useLayout.setHeaderRowCount,
24448
24417
  setLineHeight = _useLayout.setLineHeight,
24449
- getBodyHeight = _useLayout.getBodyHeight,
24450
24418
  refBody = _useLayout.refBody,
24451
24419
  refRoot = _useLayout.refRoot;
24452
24420
  var scrollTo = function scrollTo() {
@@ -24567,7 +24535,6 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24567
24535
  setBodyHeight(Number("".concat(props.height).replace('px', '')));
24568
24536
  }
24569
24537
  };
24570
- var scrollTo00 = (0,external_vue_namespaceObject.ref)(false);
24571
24538
  var setTableData = (0,lodash.debounce)(function () {
24572
24539
  var resetScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
24573
24540
  var filterOrderList = getFilterAndSortList();
@@ -24578,15 +24545,10 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24578
24545
  }
24579
24546
  var renderList = getRenderRowList(filterOrderList);
24580
24547
  rows.setPageRowList(renderList);
24581
- if (resetScroll) {
24582
- scrollTo00.value = true;
24583
- }
24584
24548
  (0,external_vue_namespaceObject.nextTick)(function () {
24585
24549
  setOffsetRight();
24586
- setRowsBodyHeight();
24587
- if (scrollTo00.value) {
24550
+ if (resetScroll) {
24588
24551
  scrollTo(0, 0);
24589
- scrollTo00.value = false;
24590
24552
  }
24591
24553
  });
24592
24554
  }, 64);
@@ -24617,20 +24579,6 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24617
24579
  observerResizing.value = false;
24618
24580
  });
24619
24581
  });
24620
- var setRowsBodyHeight = function setRowsBodyHeight() {
24621
- if (props.height === '100%' || props.height === 'auto') {
24622
- var rowsHeight = rows.getCurrentPageRowsHeight();
24623
- var bodyHeight = rowsHeight;
24624
- if (/^\d+\.?\d*(px)?$/.test("".concat(props.maxHeight))) {
24625
- var maxHeight = getBodyHeight(Number("".concat(props.maxHeight).replace('px', '')));
24626
- if (bodyHeight > maxHeight) {
24627
- setBodyHeight(maxHeight, false);
24628
- return;
24629
- }
24630
- }
24631
- setBodyHeight(bodyHeight, false);
24632
- }
24633
- };
24634
24582
  (0,external_vue_namespaceObject.watch)(function () {
24635
24583
  return [props.columns];
24636
24584
  }, function () {
@@ -24656,19 +24604,12 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24656
24604
  deep: true
24657
24605
  });
24658
24606
  (0,external_vue_namespaceObject.watch)(function () {
24659
- return [columns.filterColumns];
24607
+ return [columns.sortColumns, columns.filterColumns];
24660
24608
  }, function () {
24661
24609
  setTableData();
24662
24610
  }, {
24663
24611
  deep: true
24664
24612
  });
24665
- (0,external_vue_namespaceObject.watch)(function () {
24666
- return [columns.sortColumns];
24667
- }, function () {
24668
- setTableData(false);
24669
- }, {
24670
- deep: true
24671
- });
24672
24613
  (0,external_vue_namespaceObject.watch)(function () {
24673
24614
  return [pagination.isShowPagination.value];
24674
24615
  }, function () {
@@ -24688,20 +24629,10 @@ var useSettings = function useSettings(props, ctx, columns, afterSetting) {
24688
24629
  (0,external_vue_namespaceObject.watch)(function () {
24689
24630
  return [pagination.options.count, pagination.options.limit, pagination.options.current];
24690
24631
  }, function () {
24691
- setTableData(false);
24632
+ setTableData();
24692
24633
  }, {
24693
24634
  immediate: true
24694
24635
  });
24695
- var pageListLength = (0,external_vue_namespaceObject.computed)(function () {
24696
- return rows.pageRowList.length;
24697
- });
24698
- (0,external_vue_namespaceObject.watch)(pageListLength, function (val, old) {
24699
- if (val < old) {
24700
- var _refBody$value2, _refBody$value2$updat;
24701
- 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);
24702
- scrollTo(undefined, 0);
24703
- }
24704
- });
24705
24636
  ctx.expose({
24706
24637
  setRowExpand: rows.setRowExpand,
24707
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;