bkui-vue 2.0.2-beta.42 → 2.0.2-beta.43

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.
@@ -9,6 +9,13 @@
9
9
  .bk-infobox .bk-modal-wrapper .bk-modal-body {
10
10
  min-height: 176px;
11
11
  }
12
+ .bk-infobox .bk-modal-wrapper .bk-modal-body .bk-modal-content {
13
+ color: #63656e;
14
+ font-size: 14px;
15
+ }
16
+ .bk-infobox.no-content-infobox .bk-modal-content {
17
+ display: none;
18
+ }
12
19
  .bk-infobox-header {
13
20
  padding-top: 24px;
14
21
  }
@@ -140,6 +140,13 @@
140
140
  .bk-infobox .bk-modal-wrapper .bk-modal-body {
141
141
  min-height: 176px;
142
142
  }
143
+ .bk-infobox .bk-modal-wrapper .bk-modal-body .bk-modal-content {
144
+ color: #63656e;
145
+ font-size: 14px;
146
+ }
147
+ .bk-infobox.no-content-infobox .bk-modal-content {
148
+ display: none;
149
+ }
143
150
  .bk-infobox-header {
144
151
  padding-top: 24px;
145
152
  }
package/lib/index.js CHANGED
@@ -3,5 +3,5 @@ export * from './hooks';
3
3
  export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
- export const version = "2.0.2-beta.42";
6
+ export const version = "2.0.2-beta.43";
7
7
  window.__bkui_vue_version__ = version;
@@ -782,7 +782,11 @@ var genDefaultState = function genDefaultState() {
782
782
  };
783
783
  return (0,external_vue_namespaceObject.createVNode)(modal_namespaceObject["default"], {
784
784
  "width": renderWidth(),
785
- "class": [resolveClassName('infobox'), state["class"]],
785
+ "class": [_defineProperty({}, resolveClassName('infobox'), true),
786
+ // 处理无提示内容modal-content还会占位高度
787
+ {
788
+ 'no-content-infobox': !state.content
789
+ }, state["class"]],
786
790
  "animateType": "fadein",
787
791
  "closeIcon": state.closeIcon,
788
792
  "isShow": isShow.value,
@@ -9,6 +9,13 @@
9
9
  .bk-infobox .bk-modal-wrapper .bk-modal-body {
10
10
  min-height: 176px;
11
11
  }
12
+ .bk-infobox .bk-modal-wrapper .bk-modal-body .bk-modal-content {
13
+ color: #63656e;
14
+ font-size: 14px;
15
+ }
16
+ .bk-infobox.no-content-infobox .bk-modal-content {
17
+ display: none;
18
+ }
12
19
  .bk-infobox-header {
13
20
  padding-top: 24px;
14
21
  }
@@ -1,7 +1,7 @@
1
1
  @import '../styles/themes/themes.less';
2
2
 
3
3
  .@{bk-prefix}-infobox {
4
- font-size: 12px;
4
+ font-size: @font-size-base;
5
5
 
6
6
  .@{bk-prefix}-modal-wrapper {
7
7
  top: 50%;
@@ -10,9 +10,20 @@
10
10
 
11
11
  .@{bk-prefix}-modal-body {
12
12
  min-height: 176px;
13
+
14
+ .@{bk-prefix}-modal-content {
15
+ color: @default-color;
16
+ font-size: @font-size-medium;
17
+ }
13
18
  }
14
19
 
15
20
  }
21
+
22
+ &.no-content-infobox {
23
+ .@{bk-prefix}-modal-content {
24
+ display: none;
25
+ }
26
+ }
16
27
  }
17
28
 
18
29
  .@{bk-prefix}-infobox-header {
@@ -130,7 +130,7 @@
130
130
  --sub-title-bg-color: #f5f6fa;
131
131
  }
132
132
  .bk-infobox {
133
- font-size: 12px;
133
+ font-size: var(--font-size-base);
134
134
  }
135
135
  .bk-infobox .bk-modal-wrapper {
136
136
  top: 50%;
@@ -140,6 +140,13 @@
140
140
  .bk-infobox .bk-modal-wrapper .bk-modal-body {
141
141
  min-height: 176px;
142
142
  }
143
+ .bk-infobox .bk-modal-wrapper .bk-modal-body .bk-modal-content {
144
+ color: var(--default-color);
145
+ font-size: var(--font-size-medium);
146
+ }
147
+ .bk-infobox.no-content-infobox .bk-modal-content {
148
+ display: none;
149
+ }
143
150
  .bk-infobox-header {
144
151
  padding-top: 24px;
145
152
  }
@@ -9,6 +9,13 @@
9
9
  .bk-infobox .bk-modal-wrapper .bk-modal-body {
10
10
  min-height: 176px;
11
11
  }
12
+ .bk-infobox .bk-modal-wrapper .bk-modal-body .bk-modal-content {
13
+ color: #63656e;
14
+ font-size: 14px;
15
+ }
16
+ .bk-infobox.no-content-infobox .bk-modal-content {
17
+ display: none;
18
+ }
12
19
  .bk-infobox-header {
13
20
  padding-top: 24px;
14
21
  }
@@ -140,6 +140,13 @@
140
140
  .bk-infobox .bk-modal-wrapper .bk-modal-body {
141
141
  min-height: 176px;
142
142
  }
143
+ .bk-infobox .bk-modal-wrapper .bk-modal-body .bk-modal-content {
144
+ color: #63656e;
145
+ font-size: 14px;
146
+ }
147
+ .bk-infobox.no-content-infobox .bk-modal-content {
148
+ display: none;
149
+ }
143
150
  .bk-infobox-header {
144
151
  padding-top: 24px;
145
152
  }
@@ -388,7 +388,7 @@ declare const BkSelect: {
388
388
  inputRef: import("vue").Ref<HTMLElement>;
389
389
  triggerRef: import("vue").Ref<HTMLElement>;
390
390
  contentRef: import("vue").Ref<HTMLElement>;
391
- searchRef: import("vue").Ref<HTMLElement>;
391
+ searchRef: import("vue").Ref<HTMLInputElement>;
392
392
  scrollContainerRef: import("vue").Ref<HTMLElement>;
393
393
  selectTagInputRef: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
394
394
  selected: {
@@ -1572,7 +1572,7 @@ declare const BkSelect: {
1572
1572
  inputRef: import("vue").Ref<HTMLElement>;
1573
1573
  triggerRef: import("vue").Ref<HTMLElement>;
1574
1574
  contentRef: import("vue").Ref<HTMLElement>;
1575
- searchRef: import("vue").Ref<HTMLElement>;
1575
+ searchRef: import("vue").Ref<HTMLInputElement>;
1576
1576
  scrollContainerRef: import("vue").Ref<HTMLElement>;
1577
1577
  selectTagInputRef: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
1578
1578
  selected: {
@@ -2391,7 +2391,7 @@ declare const BkSelect: {
2391
2391
  inputRef: import("vue").Ref<HTMLElement>;
2392
2392
  triggerRef: import("vue").Ref<HTMLElement>;
2393
2393
  contentRef: import("vue").Ref<HTMLElement>;
2394
- searchRef: import("vue").Ref<HTMLElement>;
2394
+ searchRef: import("vue").Ref<HTMLInputElement>;
2395
2395
  scrollContainerRef: import("vue").Ref<HTMLElement>;
2396
2396
  selectTagInputRef: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
2397
2397
  selected: {
@@ -4292,6 +4292,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4292
4292
  emit('change', val, modelValue.value);
4293
4293
  // 重置Selected 以model-value为主
4294
4294
  handleSetSelectedData();
4295
+ if (multiple.value) {
4296
+ // 多选时enter之后变成tag不需要保存当前值
4297
+ customOptionName.value = '';
4298
+ }
4295
4299
  };
4296
4300
  // 派发toggle事件
4297
4301
  var handleTogglePopover = function handleTogglePopover() {
@@ -4317,7 +4321,6 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4317
4321
  if (filterable.value && matchedOption) {
4318
4322
  // 开启搜索后,正好匹配到自定义选项,则不进行创建操作
4319
4323
  handleOptionSelected(matchedOption);
4320
- customOptionName.value = '';
4321
4324
  return;
4322
4325
  }
4323
4326
  var data = optionsMap.value.get(value);
@@ -4338,7 +4341,6 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4338
4341
  emitChange(value);
4339
4342
  handleHidePopover();
4340
4343
  }
4341
- customOptionName.value = '';
4342
4344
  };
4343
4345
  // Option点击事件
4344
4346
  var handleOptionSelected = function handleOptionSelected(option) {
@@ -4379,9 +4381,6 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4379
4381
  label: option.optionName || option.optionID,
4380
4382
  value: option.optionID
4381
4383
  }];
4382
- if (filterable.value && allowCreate.value) {
4383
- customOptionName.value = '';
4384
- }
4385
4384
  emitChange(option.optionID);
4386
4385
  emit('select', option.optionID);
4387
4386
  handleHidePopover();
@@ -4429,6 +4428,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4429
4428
  var handleClear = function handleClear(e) {
4430
4429
  e.stopPropagation();
4431
4430
  selected.value = [];
4431
+ customOptionName.value = '';
4432
4432
  clearMultipleInputValue();
4433
4433
  emitChange(multiple.value ? [] : '');
4434
4434
  emit('clear', multiple.value ? [] : '');
@@ -4605,9 +4605,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4605
4605
  case 'NumpadEnter':
4606
4606
  case 'Enter':
4607
4607
  {
4608
+ var _searchRef$value2;
4608
4609
  var value = e.target.value;
4609
4610
  // 搜索和创建的时候不触发enter事件
4610
- if (allowCreate.value && value || e.target === searchRef.value) return;
4611
+ if (allowCreate.value && value || e.target === searchRef.value && (_searchRef$value2 = searchRef.value) !== null && _searchRef$value2 !== void 0 && _searchRef$value2.value) return;
4611
4612
  var option = optionsMap.value.get(activeOptionValue.value);
4612
4613
  handleOptionSelected(option);
4613
4614
  break;
@@ -4730,7 +4731,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4730
4731
  "theme": "primary"
4731
4732
  }, null);
4732
4733
  }
4733
- if (_this.clearable && _this.isHover && _this.selected.length && !_this.isDisabled) {
4734
+ if (_this.clearable && _this.isHover && _this.selected.length && !_this.isDisabled || _this.allowCreate && _this.isHover && _this.customOptionName && !_this.isDisabled) {
4734
4735
  return (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, {
4735
4736
  "class": "clear-icon",
4736
4737
  "onClick": _this.handleClear
@@ -4832,7 +4833,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4832
4833
  "ref": "inputRef",
4833
4834
  "behavior": _this.behavior,
4834
4835
  "disabled": _this.isDisabled,
4835
- "modelValue": _this.isInput ? _this.customOptionName : _this.selectedLabel.join(','),
4836
+ "modelValue": _this.isInput && _this.customOptionName ? _this.customOptionName : _this.selectedLabel.join(','),
4836
4837
  "placeholder": _this.isInput ? _this.selectedLabel.join(',') || _this.localPlaceholder : _this.localPlaceholder,
4837
4838
  "readonly": !_this.isInput,
4838
4839
  "selectReadonly": true,
@@ -375,7 +375,7 @@ declare const _default: import("vue").DefineComponent<{
375
375
  inputRef: import("vue").Ref<HTMLElement>;
376
376
  triggerRef: import("vue").Ref<HTMLElement>;
377
377
  contentRef: import("vue").Ref<HTMLElement>;
378
- searchRef: import("vue").Ref<HTMLElement>;
378
+ searchRef: import("vue").Ref<HTMLInputElement>;
379
379
  scrollContainerRef: import("vue").Ref<HTMLElement>;
380
380
  selectTagInputRef: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
381
381
  selected: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.2-beta.42",
3
+ "version": "2.0.2-beta.43",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",