bkui-vue 2.0.1-beta.52 → 2.0.1-beta.54

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.
@@ -154,7 +154,7 @@ const icon_namespaceObject = icon_x({ ["CloseLine"]: () => __WEBPACK_EXTERNAL_MO
154
154
  };
155
155
  },
156
156
  render: function render() {
157
- var _this$$slots$default, _this$$slots;
157
+ var _this$$slots$icon, _this$$slots$icon2, _this$$slots, _this$$slots$default, _this$$slots2;
158
158
  if (!this.state.visible) {
159
159
  return null;
160
160
  }
@@ -163,19 +163,20 @@ const icon_namespaceObject = icon_x({ ["CloseLine"]: () => __WEBPACK_EXTERNAL_MO
163
163
  var renderCloseText = Boolean(this.closeText);
164
164
  var closeButtonClasses = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty({}, resolveClassName('alert-close'), true), 'close-text', renderCloseText), resolveClassName('alert-close-icon'), !renderCloseText));
165
165
  var typeClass = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty({}, resolveClassName('alert'), true), resolveClassName("alert-".concat(this.theme)), true));
166
+ var defaultIcon = (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.InfoLine, {
167
+ "class": resolveClassName('alert-icon-info')
168
+ }, null);
166
169
  return (0,external_vue_namespaceObject.createVNode)("div", {
167
170
  "class": typeClass
168
171
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
169
172
  "class": resolveClassName('alert-wraper')
170
- }, [this.showIcon && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.InfoLine, {
171
- "class": resolveClassName('alert-icon-info')
172
- }, null), (0,external_vue_namespaceObject.createVNode)("div", {
173
+ }, [this.showIcon && ((_this$$slots$icon = (_this$$slots$icon2 = (_this$$slots = this.$slots).icon) === null || _this$$slots$icon2 === void 0 ? void 0 : _this$$slots$icon2.call(_this$$slots)) !== null && _this$$slots$icon !== void 0 ? _this$$slots$icon : defaultIcon), (0,external_vue_namespaceObject.createVNode)("div", {
173
174
  "class": resolveClassName('alert-content')
174
175
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
175
176
  "class": resolveClassName('alert-title')
176
177
  }, [this.$slots.title ? this.$slots.title() : this.title]), (0,external_vue_namespaceObject.createVNode)("div", {
177
178
  "class": resolveClassName('alert-description')
178
- }, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)])]), this.closable && (0,external_vue_namespaceObject.createVNode)("span", {
179
+ }, [(_this$$slots$default = (_this$$slots2 = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots2)])]), this.closable && (0,external_vue_namespaceObject.createVNode)("span", {
179
180
  "class": closeButtonClasses,
180
181
  "onClick": this.handleClose
181
182
  }, [this.closeText ? this.closeText : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.CloseLine, null, null)])])]);
@@ -5311,6 +5311,17 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
5311
5311
  });
5312
5312
  var pickerPanelRef = (0,external_vue_namespaceObject.ref)(null);
5313
5313
  var handleClose = function handleClose(e) {
5314
+ if (props.appendToBody) {
5315
+ var _pickerPanelRef$value;
5316
+ state.disableCloseUnderTransfer = true;
5317
+ var pickerPanel = pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value = pickerPanelRef.value) === null || _pickerPanelRef$value === void 0 ? void 0 : _pickerPanelRef$value.$el;
5318
+ if (e && pickerPanel !== null && pickerPanel !== void 0 && pickerPanel.contains(e.target)) {
5319
+ return;
5320
+ }
5321
+ state.visible = false;
5322
+ e === null || e === void 0 || e.preventDefault();
5323
+ e === null || e === void 0 || e.stopPropagation();
5324
+ }
5314
5325
  if (state.disableCloseUnderTransfer) {
5315
5326
  state.disableCloseUnderTransfer = false;
5316
5327
  return false;
@@ -5321,9 +5332,9 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
5321
5332
  return;
5322
5333
  }
5323
5334
  if (state.visible) {
5324
- var _pickerPanelRef$value;
5325
- var pickerPanel = pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value = pickerPanelRef.value) === null || _pickerPanelRef$value === void 0 ? void 0 : _pickerPanelRef$value.$el;
5326
- if (e && pickerPanel !== null && pickerPanel !== void 0 && pickerPanel.contains(e.target)) {
5335
+ var _pickerPanelRef$value2;
5336
+ var _pickerPanel = pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value2 = pickerPanelRef.value) === null || _pickerPanelRef$value2 === void 0 ? void 0 : _pickerPanelRef$value2.$el;
5337
+ if (e && _pickerPanel !== null && _pickerPanel !== void 0 && _pickerPanel.contains(e.target)) {
5327
5338
  return;
5328
5339
  }
5329
5340
  state.visible = false;
@@ -5416,11 +5427,11 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
5416
5427
  }
5417
5428
  };
5418
5429
  var reset = function reset() {
5419
- var _pickerPanelRef$value2, _pickerPanelRef$value3;
5420
- pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value2 = pickerPanelRef.value) === null || _pickerPanelRef$value2 === void 0 || (_pickerPanelRef$value3 = _pickerPanelRef$value2.reset) === null || _pickerPanelRef$value3 === void 0 || _pickerPanelRef$value3.call(_pickerPanelRef$value2);
5430
+ var _pickerPanelRef$value3, _pickerPanelRef$value4;
5431
+ pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value3 = pickerPanelRef.value) === null || _pickerPanelRef$value3 === void 0 || (_pickerPanelRef$value4 = _pickerPanelRef$value3.reset) === null || _pickerPanelRef$value4 === void 0 || _pickerPanelRef$value4.call(_pickerPanelRef$value3);
5421
5432
  };
5422
5433
  var handleBlur = function handleBlur(e) {
5423
- var _pickerPanelRef$value4, _formItem$validate2;
5434
+ var _pickerPanelRef$value5, _formItem$validate2;
5424
5435
  if (state.internalFocus) {
5425
5436
  state.internalFocus = false;
5426
5437
  return;
@@ -5433,7 +5444,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
5433
5444
  onSelectionModeChange(props.type);
5434
5445
  state.internalValue = state.internalValue.slice();
5435
5446
  reset();
5436
- pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value4 = pickerPanelRef.value) === null || _pickerPanelRef$value4 === void 0 || _pickerPanelRef$value4.onToggleVisibility(false);
5447
+ pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value5 = pickerPanelRef.value) === null || _pickerPanelRef$value5 === void 0 || _pickerPanelRef$value5.onToggleVisibility(false);
5437
5448
  formItem === null || formItem === void 0 || (_formItem$validate2 = formItem.validate) === null || _formItem$validate2 === void 0 || _formItem$validate2.call(formItem, 'blur');
5438
5449
  };
5439
5450
  var handleKeydown = function handleKeydown(e) {
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.52";
7
+ export const version = "2.0.1-beta.54";
8
8
  window.__bkui_vue_version__ = version;
@@ -216,12 +216,13 @@
216
216
  display: flex;
217
217
  }
218
218
  .bk-message-content.multi .overview .left-content .describe {
219
- display: box;
219
+ display: -webkit-box;
220
220
  max-width: 560px;
221
221
  max-height: 60px;
222
222
  overflow: hidden;
223
223
  text-overflow: ellipsis;
224
224
  -webkit-box-orient: vertical;
225
+ line-clamp: 3;
225
226
  -webkit-line-clamp: 3;
226
227
  }
227
228
  .bk-message-content.multi .overview .tools {
@@ -98,12 +98,13 @@
98
98
  display: flex;
99
99
 
100
100
  .describe {
101
- display: box;
101
+ display: -webkit-box;
102
102
  max-width: 560px;
103
103
  max-height: 60px;
104
104
  overflow: hidden;
105
105
  text-overflow: ellipsis;
106
106
  -webkit-box-orient: vertical;
107
+ line-clamp: 3;
107
108
  -webkit-line-clamp: 3;
108
109
  }
109
110
  }
@@ -204,7 +205,7 @@
204
205
 
205
206
  .copy-value {
206
207
  padding-left: 4px;
207
-
208
+
208
209
  &:hover {
209
210
  background: rgba(186, 188, 192, 0.2);
210
211
  cursor: pointer;
@@ -476,12 +476,13 @@
476
476
  display: flex;
477
477
  }
478
478
  .bk-message-content.multi .overview .left-content .describe {
479
- display: box;
479
+ display: -webkit-box;
480
480
  max-width: 560px;
481
481
  max-height: 60px;
482
482
  overflow: hidden;
483
483
  text-overflow: ellipsis;
484
484
  -webkit-box-orient: vertical;
485
+ line-clamp: 3;
485
486
  -webkit-line-clamp: 3;
486
487
  }
487
488
  .bk-message-content.multi .overview .tools {
@@ -655,6 +655,7 @@ const popover_less_namespaceObject = popover_less_x({ });
655
655
  "ref": inputRef,
656
656
  "class": "".concat(resolveClassName('pagination-editor')),
657
657
  "contenteditable": !proxy.disabled,
658
+ "innerHTML": String(localCurrent.value),
658
659
  "spellcheck": "false",
659
660
  "onBlur": handlePageEditorBlur,
660
661
  "onFocus": handlePageEditorFocus,
@@ -315,6 +315,10 @@ declare const BkSelect: {
315
315
  } & {
316
316
  default: boolean;
317
317
  };
318
+ trigger: {
319
+ type: import("vue").PropType<"default" | "manual">;
320
+ default: string;
321
+ };
318
322
  }>> & {
319
323
  onFocus?: (...args: any[]) => any;
320
324
  onBlur?: (...args: any[]) => any;
@@ -1025,6 +1029,10 @@ declare const BkSelect: {
1025
1029
  } & {
1026
1030
  default: boolean;
1027
1031
  };
1032
+ trigger: {
1033
+ type: import("vue").PropType<"default" | "manual">;
1034
+ default: string;
1035
+ };
1028
1036
  }>> & {
1029
1037
  onFocus?: (...args: any[]) => any;
1030
1038
  onBlur?: (...args: any[]) => any;
@@ -1041,6 +1049,7 @@ declare const BkSelect: {
1041
1049
  prefix: string;
1042
1050
  size: "default" | "small" | "large" | "huge";
1043
1051
  disabled: boolean;
1052
+ trigger: "default" | "manual";
1044
1053
  showOnInit: boolean;
1045
1054
  multiple: boolean;
1046
1055
  placeholder: string;
@@ -1401,6 +1410,10 @@ declare const BkSelect: {
1401
1410
  } & {
1402
1411
  default: boolean;
1403
1412
  };
1413
+ trigger: {
1414
+ type: import("vue").PropType<"default" | "manual">;
1415
+ default: string;
1416
+ };
1404
1417
  }>> & {
1405
1418
  onFocus?: (...args: any[]) => any;
1406
1419
  onBlur?: (...args: any[]) => any;
@@ -1801,6 +1814,7 @@ declare const BkSelect: {
1801
1814
  prefix: string;
1802
1815
  size: "default" | "small" | "large" | "huge";
1803
1816
  disabled: boolean;
1817
+ trigger: "default" | "manual";
1804
1818
  showOnInit: boolean;
1805
1819
  multiple: boolean;
1806
1820
  placeholder: string;
@@ -2158,6 +2172,10 @@ declare const BkSelect: {
2158
2172
  } & {
2159
2173
  default: boolean;
2160
2174
  };
2175
+ trigger: {
2176
+ type: import("vue").PropType<"default" | "manual">;
2177
+ default: string;
2178
+ };
2161
2179
  }>> & {
2162
2180
  onFocus?: (...args: any[]) => any;
2163
2181
  onBlur?: (...args: any[]) => any;
@@ -2558,6 +2576,7 @@ declare const BkSelect: {
2558
2576
  prefix: string;
2559
2577
  size: "default" | "small" | "large" | "huge";
2560
2578
  disabled: boolean;
2579
+ trigger: "default" | "manual";
2561
2580
  showOnInit: boolean;
2562
2581
  multiple: boolean;
2563
2582
  placeholder: string;
@@ -2662,7 +2662,11 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
2662
2662
  type: Function
2663
2663
  },
2664
2664
  searchWithPinyin: shared_namespaceObject.PropTypes.bool.def(true),
2665
- highlightKeyword: shared_namespaceObject.PropTypes.bool.def(false) // 搜索高亮
2665
+ highlightKeyword: shared_namespaceObject.PropTypes.bool.def(false),
2666
+ trigger: {
2667
+ type: String,
2668
+ "default": 'default'
2669
+ } // content显示和隐藏方式
2666
2670
  },
2667
2671
  emits: ['update:modelValue', 'change', 'toggle', 'clear', 'scroll-end', 'focus', 'blur', 'tag-remove', 'select', 'deselect', 'search-change'],
2668
2672
  setup: function setup(props, _ref) {
@@ -2702,7 +2706,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
2702
2706
  filterOption = _toRefs.filterOption,
2703
2707
  searchWithPinyin = _toRefs.searchWithPinyin,
2704
2708
  highlightKeyword = _toRefs.highlightKeyword,
2705
- disableFocusBehavior = _toRefs.disableFocusBehavior;
2709
+ disableFocusBehavior = _toRefs.disableFocusBehavior,
2710
+ trigger = _toRefs.trigger;
2706
2711
  var virtualRenderRef = (0,external_vue_namespaceObject.ref)(null);
2707
2712
  var localNoDataText = (0,external_vue_namespaceObject.computed)(function () {
2708
2713
  if (props.noDataText === undefined) {
@@ -2930,6 +2935,14 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
2930
2935
  hidePopover = _usePopover.hidePopover,
2931
2936
  showPopover = _usePopover.showPopover,
2932
2937
  togglePopover = _usePopover.togglePopover;
2938
+ var handleHidePopover = function handleHidePopover() {
2939
+ if (trigger.value === 'manual') return;
2940
+ hidePopover();
2941
+ };
2942
+ var handleShowPopover = function handleShowPopover() {
2943
+ if (trigger.value === 'manual') return;
2944
+ showPopover();
2945
+ };
2933
2946
  // 输入框是否可以输入内容
2934
2947
  var isInput = (0,external_vue_namespaceObject.computed)(function () {
2935
2948
  return (filterable.value && inputSearch.value || allowCreate.value) && isPopoverShow.value;
@@ -3028,7 +3041,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3028
3041
  };
3029
3042
  // 派发toggle事件
3030
3043
  var handleTogglePopover = function handleTogglePopover() {
3031
- if (isDisabled.value) return;
3044
+ if (isDisabled.value || trigger.value === 'manual') return;
3032
3045
  handleFocus();
3033
3046
  togglePopover();
3034
3047
  };
@@ -3069,7 +3082,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3069
3082
  label: value
3070
3083
  }];
3071
3084
  emitChange(value);
3072
- hidePopover();
3085
+ handleHidePopover();
3073
3086
  }
3074
3087
  customOptionName.value = '';
3075
3088
  };
@@ -3113,7 +3126,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3113
3126
  }];
3114
3127
  emitChange(option.optionID);
3115
3128
  emit('select', option.optionID);
3116
- hidePopover();
3129
+ handleHidePopover();
3117
3130
  handleBlur();
3118
3131
  }
3119
3132
  };
@@ -3153,7 +3166,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3153
3166
  selected.value = [];
3154
3167
  emitChange(multiple.value ? [] : '');
3155
3168
  emit('clear', multiple.value ? [] : '');
3156
- hidePopover();
3169
+ handleHidePopover();
3157
3170
  };
3158
3171
  var handleSelectedAllOptionMouseEnter = function handleSelectedAllOptionMouseEnter() {
3159
3172
  activeOptionValue.value = '';
@@ -3339,7 +3352,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3339
3352
  var event = _ref2.event;
3340
3353
  var target = event.target;
3341
3354
  if ((_triggerRef$value = triggerRef.value) !== null && _triggerRef$value !== void 0 && _triggerRef$value.contains(target) || triggerRef.value === target) return;
3342
- hidePopover();
3355
+ handleHidePopover();
3343
3356
  handleBlur();
3344
3357
  };
3345
3358
  (0,external_vue_namespaceObject.provide)(selectKey, (0,external_vue_namespaceObject.reactive)({
@@ -3360,7 +3373,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3360
3373
  (0,external_vue_namespaceObject.onMounted)(function () {
3361
3374
  handleSetSelectedData();
3362
3375
  setTimeout(function () {
3363
- showOnInit.value && showPopover();
3376
+ showOnInit.value && handleShowPopover();
3364
3377
  autoFocus.value && focusInput();
3365
3378
  });
3366
3379
  });
@@ -314,6 +314,10 @@ declare const _default: import("vue").DefineComponent<{
314
314
  } & {
315
315
  default: boolean;
316
316
  };
317
+ trigger: {
318
+ type: PropType<"default" | "manual">;
319
+ default: string;
320
+ };
317
321
  }, {
318
322
  t: import("vue").ComputedRef<{
319
323
  noData: string;
@@ -1012,6 +1016,10 @@ declare const _default: import("vue").DefineComponent<{
1012
1016
  } & {
1013
1017
  default: boolean;
1014
1018
  };
1019
+ trigger: {
1020
+ type: PropType<"default" | "manual">;
1021
+ default: string;
1022
+ };
1015
1023
  }>> & {
1016
1024
  onFocus?: (...args: any[]) => any;
1017
1025
  onBlur?: (...args: any[]) => any;
@@ -1028,6 +1036,7 @@ declare const _default: import("vue").DefineComponent<{
1028
1036
  prefix: string;
1029
1037
  size: "default" | "small" | "large" | "huge";
1030
1038
  disabled: boolean;
1039
+ trigger: "default" | "manual";
1031
1040
  showOnInit: boolean;
1032
1041
  multiple: boolean;
1033
1042
  placeholder: string;
@@ -17752,7 +17752,7 @@ function computedVirtualIndex(lineHeight, callback, pagination, wrapper, event)
17752
17752
  targetStartIndex = startValue.startIndex > 0 ? startValue.startIndex : 0;
17753
17753
  translateY = startValue.diffHeight;
17754
17754
  var endValue = getMatchedIndex(count, elOffsetHeight, groupItemCount, lineHeight);
17755
- targetEndIndex = endValue.startIndex + targetStartIndex;
17755
+ targetEndIndex = endValue.startIndex + targetStartIndex + 1;
17756
17756
  }
17757
17757
  var bottom = elScrollHeight - elOffsetHeight - elScrollTop;
17758
17758
  typeof callback === 'function' && callback(event, targetStartIndex, targetEndIndex, elScrollTop, elScrollTop, elScrollLeft, {
@@ -18155,10 +18155,6 @@ function virtual_render_objectSpread(e) { for (var r = 1; r < arguments.length;
18155
18155
  start = start < 0 ? 0 : start;
18156
18156
  }
18157
18157
  }
18158
- // if (end > total) {
18159
- // end = total;
18160
- // start = end - Math.floor(refRoot.value.offsetHeight / props.lineHeight);
18161
- // }
18162
18158
  var value = localList.value.slice(start, end);
18163
18159
  calcList.value = value;
18164
18160
  if (event) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.1-beta.52",
3
+ "version": "2.0.1-beta.54",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",