bk-magic-vue 2.5.9-beta.2 → 2.5.9-beta.21
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.
- package/dist/bk-magic-vue.css +893 -959
- package/dist/bk-magic-vue.js +860 -625
- package/dist/bk-magic-vue.min.css +1 -1
- package/dist/bk-magic-vue.min.css.gz +0 -0
- package/dist/bk-magic-vue.min.css.map +1 -1
- package/dist/bk-magic-vue.min.js +1 -1
- package/dist/bk-magic-vue.min.js.gz +0 -0
- package/dist/bk-magic-vue.min.js.map +1 -1
- package/lib/card.js +2981 -203
- package/lib/cascade.js +6447 -6411
- package/lib/date-picker.js +1 -1
- package/lib/dialog.js +484 -9
- package/lib/info-box.js +484 -9
- package/lib/input.js +2942 -164
- package/lib/loading.js +7 -4
- package/lib/pagination.js +214 -17
- package/lib/rate.js +14 -3
- package/lib/resize-layout.js +3 -1
- package/lib/select.js +40 -9
- package/lib/sideslider.js +802 -336
- package/lib/slider.js +3270 -3202
- package/lib/star.js +13 -2
- package/lib/table.js +214 -17
- package/lib/tag-input.js +122 -102
- package/lib/time-picker.js +1 -1
- package/lib/timeline.js +26 -17
- package/lib/transfer.js +1886 -1710
- package/lib/ui/badge.css +127 -119
- package/lib/ui/badge.min.css +1 -1
- package/lib/ui/badge.min.css.map +1 -1
- package/lib/ui/bk-magic-vue.css +893 -959
- package/lib/ui/bk-magic-vue.min.css +1 -1
- package/lib/ui/bk-magic-vue.min.css.gz +0 -0
- package/lib/ui/bk-magic-vue.min.css.map +1 -1
- package/lib/ui/button.css +4 -4
- package/lib/ui/button.min.css +1 -1
- package/lib/ui/button.min.css.map +1 -1
- package/lib/ui/card.css +2 -2
- package/lib/ui/card.min.css +1 -1
- package/lib/ui/card.min.css.map +1 -1
- package/lib/ui/cascade.css +19 -1
- package/lib/ui/cascade.min.css +1 -1
- package/lib/ui/cascade.min.css.map +1 -1
- package/lib/ui/checkbox.css +67 -67
- package/lib/ui/checkbox.min.css.map +1 -1
- package/lib/ui/dialog.css +4 -4
- package/lib/ui/dialog.min.css +1 -1
- package/lib/ui/dialog.min.css.map +1 -1
- package/lib/ui/exception.css +1 -0
- package/lib/ui/exception.min.css +1 -1
- package/lib/ui/exception.min.css.map +1 -1
- package/lib/ui/form.css +2 -2
- package/lib/ui/form.min.css +1 -1
- package/lib/ui/form.min.css.map +1 -1
- package/lib/ui/info-box.css +4 -4
- package/lib/ui/info-box.min.css +1 -1
- package/lib/ui/info-box.min.css.map +1 -1
- package/lib/ui/input.css +1 -1
- package/lib/ui/input.min.css +1 -1
- package/lib/ui/input.min.css.map +1 -1
- package/lib/ui/link.css +27 -3
- package/lib/ui/link.min.css +1 -1
- package/lib/ui/link.min.css.map +1 -1
- package/lib/ui/loading.css +43 -280
- package/lib/ui/loading.min.css +1 -1
- package/lib/ui/loading.min.css.map +1 -1
- package/lib/ui/notify.css +5 -5
- package/lib/ui/notify.min.css +1 -1
- package/lib/ui/notify.min.css.map +1 -1
- package/lib/ui/overflow-tips.css +3 -2
- package/lib/ui/overflow-tips.min.css +1 -1
- package/lib/ui/overflow-tips.min.css.map +1 -1
- package/lib/ui/pagination.css +1 -1
- package/lib/ui/pagination.min.css +1 -1
- package/lib/ui/pagination.min.css.map +1 -1
- package/lib/ui/popconfirm.css +2 -2
- package/lib/ui/popconfirm.min.css +1 -1
- package/lib/ui/popconfirm.min.css.map +1 -1
- package/lib/ui/popover.css +3 -2
- package/lib/ui/popover.min.css +1 -1
- package/lib/ui/popover.min.css.map +1 -1
- package/lib/ui/process.css +51 -282
- package/lib/ui/process.min.css +1 -1
- package/lib/ui/process.min.css.map +1 -1
- package/lib/ui/progress.css +2 -2
- package/lib/ui/progress.min.css +1 -1
- package/lib/ui/progress.min.css.map +1 -1
- package/lib/ui/radio.css +64 -64
- package/lib/ui/radio.min.css +1 -1
- package/lib/ui/radio.min.css.map +1 -1
- package/lib/ui/resize-layout.css +13 -5
- package/lib/ui/resize-layout.min.css +1 -1
- package/lib/ui/resize-layout.min.css.map +1 -1
- package/lib/ui/sideslider.css +8 -7
- package/lib/ui/sideslider.min.css +1 -1
- package/lib/ui/sideslider.min.css.map +1 -1
- package/lib/ui/star.css +22 -17
- package/lib/ui/star.min.css +1 -1
- package/lib/ui/star.min.css.map +1 -1
- package/lib/ui/steps.css +372 -274
- package/lib/ui/steps.min.css +1 -1
- package/lib/ui/steps.min.css.map +1 -1
- package/lib/ui/tooltips.css +3 -2
- package/lib/ui/tooltips.min.css +1 -1
- package/lib/ui/tooltips.min.css.map +1 -1
- package/lib/ui/transfer.css +122 -121
- package/lib/ui/transfer.min.css +1 -1
- package/lib/ui/transfer.min.css.map +1 -1
- package/lib/ui/tree.css +45 -282
- package/lib/ui/tree.min.css +1 -1
- package/lib/ui/tree.min.css.map +1 -1
- package/lib/version-detail.js +453 -13
- package/package.json +3 -4
package/lib/loading.js
CHANGED
|
@@ -691,11 +691,11 @@
|
|
|
691
691
|
staticClass: "point point3"
|
|
692
692
|
}), _c('div', {
|
|
693
693
|
staticClass: "point point4"
|
|
694
|
-
})]], 2), _c('div', {
|
|
694
|
+
})]], 2), _vm.title ? _c('div', {
|
|
695
695
|
staticClass: "bk-loading-title"
|
|
696
696
|
}, [_vm._t("title", function () {
|
|
697
697
|
return [_vm._v(_vm._s(_vm.title))];
|
|
698
|
-
})], 2)])])], 1) : _c('transition', {
|
|
698
|
+
})], 2) : _vm._e()])])], 1) : _c('transition', {
|
|
699
699
|
attrs: {
|
|
700
700
|
"name": "fade",
|
|
701
701
|
"duration": {
|
|
@@ -747,11 +747,11 @@
|
|
|
747
747
|
staticClass: "point point3"
|
|
748
748
|
}), _c('div', {
|
|
749
749
|
staticClass: "point point4"
|
|
750
|
-
})]], 2), _c('div', {
|
|
750
|
+
})]], 2), _vm.title ? _c('div', {
|
|
751
751
|
staticClass: "bk-loading-title"
|
|
752
752
|
}, [_vm._t("title", function () {
|
|
753
753
|
return [_vm._v(_vm._s(_vm.title))];
|
|
754
|
-
})], 2)])])]);
|
|
754
|
+
})], 2) : _vm._e()])])]);
|
|
755
755
|
};
|
|
756
756
|
var __vue_staticRenderFns__ = [];
|
|
757
757
|
|
|
@@ -842,6 +842,9 @@
|
|
|
842
842
|
if (options.title) {
|
|
843
843
|
el.$vm.title = options.title;
|
|
844
844
|
}
|
|
845
|
+
if (options.size) {
|
|
846
|
+
el.$vm.size = options.size;
|
|
847
|
+
}
|
|
845
848
|
}
|
|
846
849
|
var bkLoading = {
|
|
847
850
|
inserted: function inserted(el, binding) {
|
package/lib/pagination.js
CHANGED
|
@@ -4065,9 +4065,7 @@
|
|
|
4065
4065
|
return !this.enabledOptions.length;
|
|
4066
4066
|
},
|
|
4067
4067
|
isAllSelected: function isAllSelected() {
|
|
4068
|
-
return
|
|
4069
|
-
return !option.isSelected;
|
|
4070
|
-
});
|
|
4068
|
+
return this.select.selected.length === this.enabledOptions.length;
|
|
4071
4069
|
}
|
|
4072
4070
|
},
|
|
4073
4071
|
watch: {
|
|
@@ -4353,11 +4351,11 @@
|
|
|
4353
4351
|
staticClass: "point point3"
|
|
4354
4352
|
}), _c('div', {
|
|
4355
4353
|
staticClass: "point point4"
|
|
4356
|
-
})]], 2), _c('div', {
|
|
4354
|
+
})]], 2), _vm.title ? _c('div', {
|
|
4357
4355
|
staticClass: "bk-loading-title"
|
|
4358
4356
|
}, [_vm._t("title", function () {
|
|
4359
4357
|
return [_vm._v(_vm._s(_vm.title))];
|
|
4360
|
-
})], 2)])])], 1) : _c('transition', {
|
|
4358
|
+
})], 2) : _vm._e()])])], 1) : _c('transition', {
|
|
4361
4359
|
attrs: {
|
|
4362
4360
|
"name": "fade",
|
|
4363
4361
|
"duration": {
|
|
@@ -4409,11 +4407,11 @@
|
|
|
4409
4407
|
staticClass: "point point3"
|
|
4410
4408
|
}), _c('div', {
|
|
4411
4409
|
staticClass: "point point4"
|
|
4412
|
-
})]], 2), _c('div', {
|
|
4410
|
+
})]], 2), _vm.title ? _c('div', {
|
|
4413
4411
|
staticClass: "bk-loading-title"
|
|
4414
4412
|
}, [_vm._t("title", function () {
|
|
4415
4413
|
return [_vm._v(_vm._s(_vm.title))];
|
|
4416
|
-
})], 2)])])]);
|
|
4414
|
+
})], 2) : _vm._e()])])]);
|
|
4417
4415
|
};
|
|
4418
4416
|
var __vue_staticRenderFns__$2 = [];
|
|
4419
4417
|
|
|
@@ -4472,6 +4470,9 @@
|
|
|
4472
4470
|
if (options.title) {
|
|
4473
4471
|
el.$vm.title = options.title;
|
|
4474
4472
|
}
|
|
4473
|
+
if (options.size) {
|
|
4474
|
+
el.$vm.size = options.size;
|
|
4475
|
+
}
|
|
4475
4476
|
}
|
|
4476
4477
|
var bkLoading = {
|
|
4477
4478
|
inserted: function inserted(el, binding) {
|
|
@@ -4600,6 +4601,7 @@
|
|
|
4600
4601
|
data: function data() {
|
|
4601
4602
|
return {
|
|
4602
4603
|
overflowTagNode: null,
|
|
4604
|
+
overflowTagTips: null,
|
|
4603
4605
|
overflowTagIndex: null,
|
|
4604
4606
|
newOptionName: ''
|
|
4605
4607
|
};
|
|
@@ -4686,6 +4688,25 @@
|
|
|
4686
4688
|
},
|
|
4687
4689
|
setOverflowTagContent: function setOverflowTagContent() {
|
|
4688
4690
|
this.overflowTagNode.textContent = "+".concat(this.select.selected.length - this.overflowTagIndex);
|
|
4691
|
+
this.destroyTippy();
|
|
4692
|
+
this.overflowTagTips = tippy(this.overflowTagNode, {
|
|
4693
|
+
duration: 0,
|
|
4694
|
+
arrow: true,
|
|
4695
|
+
size: 'small',
|
|
4696
|
+
trigger: 'mouseenter focus',
|
|
4697
|
+
theme: 'dark',
|
|
4698
|
+
interactive: true,
|
|
4699
|
+
boundary: 'window',
|
|
4700
|
+
content: this.getOverflowTagTips(),
|
|
4701
|
+
allowHTML: true,
|
|
4702
|
+
extCls: ''
|
|
4703
|
+
});
|
|
4704
|
+
},
|
|
4705
|
+
getOverflowTagTips: function getOverflowTagTips() {
|
|
4706
|
+
var data = this.select.selectedOptions.slice(this.overflowTagIndex, this.select.selectedOptions.length) || [];
|
|
4707
|
+
return data.map(function (option) {
|
|
4708
|
+
return option.name;
|
|
4709
|
+
}).join(',');
|
|
4689
4710
|
},
|
|
4690
4711
|
getOverflowTagNode: function getOverflowTagNode() {
|
|
4691
4712
|
if (this.overflowTagNode) {
|
|
@@ -4700,6 +4721,12 @@
|
|
|
4700
4721
|
if (this.overflowTagNode && this.overflowTagNode.parentNode === this.$el) {
|
|
4701
4722
|
this.$el.removeChild(this.overflowTagNode);
|
|
4702
4723
|
}
|
|
4724
|
+
this.destroyTippy();
|
|
4725
|
+
},
|
|
4726
|
+
destroyTippy: function destroyTippy() {
|
|
4727
|
+
if (!this.overflowTagTips) return;
|
|
4728
|
+
this.overflowTagTips.destroy();
|
|
4729
|
+
this.overflowTagTips = null;
|
|
4703
4730
|
},
|
|
4704
4731
|
handleCreateTag: function handleCreateTag(e) {
|
|
4705
4732
|
this.$emit('create-tag', e.target.value);
|
|
@@ -6232,6 +6259,10 @@
|
|
|
6232
6259
|
};
|
|
6233
6260
|
},
|
|
6234
6261
|
computed: {
|
|
6262
|
+
virtualScrollHeight: function virtualScrollHeight() {
|
|
6263
|
+
var selectAllOptionHeight = 39;
|
|
6264
|
+
return this.showSelectAll ? this.scrollHeight - selectAllOptionHeight : this.scrollHeight;
|
|
6265
|
+
},
|
|
6235
6266
|
selectedName: function selectedName() {
|
|
6236
6267
|
if (this.selectedOptions) {
|
|
6237
6268
|
if (this.multiple) {
|
|
@@ -6803,7 +6834,7 @@
|
|
|
6803
6834
|
"placement": "bottom-start",
|
|
6804
6835
|
"theme": "light bk-select-dropdown",
|
|
6805
6836
|
"animation": "slide-toggle",
|
|
6806
|
-
"offset":
|
|
6837
|
+
"offset": 0,
|
|
6807
6838
|
"distance": _vm.popoverDistance,
|
|
6808
6839
|
"z-index": _vm.zIndex,
|
|
6809
6840
|
"on-show": _vm.handleDropdownShow,
|
|
@@ -6940,7 +6971,7 @@
|
|
|
6940
6971
|
ref: "virtualScroll",
|
|
6941
6972
|
staticClass: "bk-virtual-select",
|
|
6942
6973
|
style: {
|
|
6943
|
-
height: _vm.
|
|
6974
|
+
height: _vm.virtualScrollHeight + 'px',
|
|
6944
6975
|
width: '100%'
|
|
6945
6976
|
},
|
|
6946
6977
|
attrs: {
|
|
@@ -7053,8 +7084,109 @@
|
|
|
7053
7084
|
}
|
|
7054
7085
|
};
|
|
7055
7086
|
|
|
7087
|
+
var defaultOptions = {
|
|
7088
|
+
duration: 0,
|
|
7089
|
+
arrow: true,
|
|
7090
|
+
size: 'small',
|
|
7091
|
+
trigger: 'mouseenter focus',
|
|
7092
|
+
theme: 'dark',
|
|
7093
|
+
interactive: true,
|
|
7094
|
+
boundary: 'window',
|
|
7095
|
+
content: '',
|
|
7096
|
+
allowHTML: true,
|
|
7097
|
+
extCls: ''
|
|
7098
|
+
};
|
|
7099
|
+
var validPlacements$1 = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
|
|
7100
|
+
var createTippy$1 = function createTippy(el, binding) {
|
|
7101
|
+
var value = binding.value;
|
|
7102
|
+
var options = _objectSpread({}, defaultOptions);
|
|
7103
|
+
if (_typeof(value) === 'object') {
|
|
7104
|
+
if (value.allowHtml || value.allowHTML) {
|
|
7105
|
+
value.allowHTML = true;
|
|
7106
|
+
}
|
|
7107
|
+
_extends(options, value);
|
|
7108
|
+
} else {
|
|
7109
|
+
options.content = value;
|
|
7110
|
+
}
|
|
7111
|
+
var placement = validPlacements$1.find(function (placement) {
|
|
7112
|
+
return binding.modifiers[placement];
|
|
7113
|
+
});
|
|
7114
|
+
options.placement = options.placement || placement || (options.placements || ['top'])[0];
|
|
7115
|
+
var _binding$modifiers = binding.modifiers,
|
|
7116
|
+
click = _binding$modifiers.click,
|
|
7117
|
+
light = _binding$modifiers.light;
|
|
7118
|
+
if (click) {
|
|
7119
|
+
options.trigger = 'click';
|
|
7120
|
+
}
|
|
7121
|
+
if (light) {
|
|
7122
|
+
options.theme = 'light';
|
|
7123
|
+
}
|
|
7124
|
+
if (options.allowHTML) {
|
|
7125
|
+
var selector = options.content;
|
|
7126
|
+
if (selector instanceof Vue) {
|
|
7127
|
+
options.content = selector.$el;
|
|
7128
|
+
} else if (typeof selector === 'string') {
|
|
7129
|
+
try {
|
|
7130
|
+
var element = document.querySelector(selector);
|
|
7131
|
+
if (element) {
|
|
7132
|
+
options.content = element;
|
|
7133
|
+
}
|
|
7134
|
+
} catch (e) {
|
|
7135
|
+
var _element = document.createElement('div');
|
|
7136
|
+
_element.innerHTML = selector;
|
|
7137
|
+
}
|
|
7138
|
+
}
|
|
7139
|
+
}
|
|
7140
|
+
if (options.html) {
|
|
7141
|
+
options.content = options.html;
|
|
7142
|
+
}
|
|
7143
|
+
if (typeof options.onClose === 'function') {
|
|
7144
|
+
options.onHide = options.onClose;
|
|
7145
|
+
}
|
|
7146
|
+
var validOptions = getValidTippyProps(options);
|
|
7147
|
+
return tippy(el, validOptions);
|
|
7148
|
+
};
|
|
7149
|
+
var bkTooltips = {
|
|
7150
|
+
inserted: function inserted(el, binding) {
|
|
7151
|
+
var disabled = _typeof(binding.value) === 'object' ? binding.value.disabled : false;
|
|
7152
|
+
if (!disabled) {
|
|
7153
|
+
el.tippyInstance = createTippy$1(el, binding);
|
|
7154
|
+
}
|
|
7155
|
+
},
|
|
7156
|
+
unbind: function unbind(el) {
|
|
7157
|
+
el._tippy && el._tippy.destroy();
|
|
7158
|
+
el.tippyInstance = null;
|
|
7159
|
+
},
|
|
7160
|
+
update: function update(el, binding) {
|
|
7161
|
+
var value = binding.value;
|
|
7162
|
+
var isObject = _typeof(value) === 'object';
|
|
7163
|
+
var content = isObject ? value.content : value;
|
|
7164
|
+
var disabled = isObject ? value.disabled : false;
|
|
7165
|
+
if (disabled || !content) {
|
|
7166
|
+
el._tippy && el._tippy.destroy();
|
|
7167
|
+
el.tippyInstance = null;
|
|
7168
|
+
} else if (content) {
|
|
7169
|
+
if (!el._tippy) {
|
|
7170
|
+
el.tippyInstance = createTippy$1(el, binding);
|
|
7171
|
+
} else {
|
|
7172
|
+
if (_typeof(value) === 'object' && (binding.value.allowHtml || binding.value.allowHTML)) {
|
|
7173
|
+
el.tippyInstance = createTippy$1(el, binding);
|
|
7174
|
+
} else {
|
|
7175
|
+
el._tippy.setContent(content);
|
|
7176
|
+
}
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7179
|
+
}
|
|
7180
|
+
};
|
|
7181
|
+
bkTooltips.install = function (Vue) {
|
|
7182
|
+
Vue.directive('bkTooltips', bkTooltips);
|
|
7183
|
+
};
|
|
7184
|
+
|
|
7056
7185
|
var script$9 = {
|
|
7057
7186
|
name: 'bk-input',
|
|
7187
|
+
directives: {
|
|
7188
|
+
bkTooltips: bkTooltips
|
|
7189
|
+
},
|
|
7058
7190
|
mixins: [emitter, locale.mixin],
|
|
7059
7191
|
props: {
|
|
7060
7192
|
type: {
|
|
@@ -7164,7 +7296,12 @@
|
|
|
7164
7296
|
allowNumberPaste: {
|
|
7165
7297
|
type: Boolean,
|
|
7166
7298
|
default: false
|
|
7167
|
-
}
|
|
7299
|
+
},
|
|
7300
|
+
showOverflowTooltips: {
|
|
7301
|
+
type: Boolean,
|
|
7302
|
+
default: false
|
|
7303
|
+
},
|
|
7304
|
+
initialControlValue: Number
|
|
7168
7305
|
},
|
|
7169
7306
|
data: function data() {
|
|
7170
7307
|
return {
|
|
@@ -7185,6 +7322,9 @@
|
|
|
7185
7322
|
inputPasswordIcon: this.passwordIcon,
|
|
7186
7323
|
inputRightPadding: '10px',
|
|
7187
7324
|
iconAreaSizeObserver: null,
|
|
7325
|
+
inputResizeObserver: null,
|
|
7326
|
+
isInputOverflow: false,
|
|
7327
|
+
inputClientWidth: null,
|
|
7188
7328
|
validKeyCodeList: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
|
7189
7329
|
96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
|
|
7190
7330
|
8,
|
|
@@ -7256,6 +7396,13 @@
|
|
|
7256
7396
|
return "bk-input-".concat(this.inputSize);
|
|
7257
7397
|
}
|
|
7258
7398
|
return '';
|
|
7399
|
+
},
|
|
7400
|
+
inputTooltips: function inputTooltips() {
|
|
7401
|
+
return {
|
|
7402
|
+
content: this.curValue,
|
|
7403
|
+
disabled: !this.showOverflowTooltips || this.type === 'password' || !this.isInputOverflow,
|
|
7404
|
+
width: this.inputClientWidth && this.inputClientWidth
|
|
7405
|
+
};
|
|
7259
7406
|
}
|
|
7260
7407
|
},
|
|
7261
7408
|
watch: {
|
|
@@ -7263,6 +7410,7 @@
|
|
|
7263
7410
|
handler: function handler(val, old) {
|
|
7264
7411
|
this.setCurValue(val);
|
|
7265
7412
|
old === undefined && this.updateNumberValue(val);
|
|
7413
|
+
this.setOverflow();
|
|
7266
7414
|
},
|
|
7267
7415
|
immediate: true
|
|
7268
7416
|
},
|
|
@@ -7297,10 +7445,13 @@
|
|
|
7297
7445
|
};
|
|
7298
7446
|
}
|
|
7299
7447
|
this.observerIconSize();
|
|
7448
|
+
this.observerInputSize();
|
|
7300
7449
|
},
|
|
7301
7450
|
beforeDestroy: function beforeDestroy() {
|
|
7302
7451
|
this.iconAreaSizeObserver && typeof this.iconAreaSizeObserver.disconnect === 'function' && this.iconAreaSizeObserver.disconnect();
|
|
7303
7452
|
this.iconAreaSizeObserver = null;
|
|
7453
|
+
this.inputResizeObserver && this.inputResizeObserver.disconnect();
|
|
7454
|
+
this.inputResizeObserver = null;
|
|
7304
7455
|
},
|
|
7305
7456
|
methods: {
|
|
7306
7457
|
observerIconSize: function observerIconSize() {
|
|
@@ -7327,6 +7478,41 @@
|
|
|
7327
7478
|
this.iconAreaSizeObserver.observe(element);
|
|
7328
7479
|
}
|
|
7329
7480
|
},
|
|
7481
|
+
observerInputSize: function observerInputSize() {
|
|
7482
|
+
var _this3 = this;
|
|
7483
|
+
var element = this.$refs.input;
|
|
7484
|
+
if (!element) return;
|
|
7485
|
+
this.inputResizeObserver = new ResizeObserver(function (entries) {
|
|
7486
|
+
var _iterator2 = _createForOfIteratorHelper(entries),
|
|
7487
|
+
_step2;
|
|
7488
|
+
try {
|
|
7489
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
7490
|
+
var entry = _step2.value;
|
|
7491
|
+
if (entry.target === element) {
|
|
7492
|
+
_this3.setOverflow();
|
|
7493
|
+
}
|
|
7494
|
+
}
|
|
7495
|
+
} catch (err) {
|
|
7496
|
+
_iterator2.e(err);
|
|
7497
|
+
} finally {
|
|
7498
|
+
_iterator2.f();
|
|
7499
|
+
}
|
|
7500
|
+
});
|
|
7501
|
+
this.inputResizeObserver.observe(element);
|
|
7502
|
+
},
|
|
7503
|
+
setOverflow: function setOverflow() {
|
|
7504
|
+
var _this4 = this;
|
|
7505
|
+
setTimeout(function () {
|
|
7506
|
+
var inputEl = _this4.$refs.input;
|
|
7507
|
+
if (inputEl) {
|
|
7508
|
+
_this4.isInputOverflow = inputEl.scrollWidth > inputEl.clientWidth + 2;
|
|
7509
|
+
if (inputEl.clientWidth !== _this4.inputClientWidth) {
|
|
7510
|
+
_this4.$refs.inputWrapper._tippy && _this4.$refs.inputWrapper._tippy.destroy();
|
|
7511
|
+
}
|
|
7512
|
+
_this4.inputClientWidth = inputEl.clientWidth;
|
|
7513
|
+
}
|
|
7514
|
+
});
|
|
7515
|
+
},
|
|
7330
7516
|
getAttributeByType: function getAttributeByType() {
|
|
7331
7517
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7332
7518
|
var defaultAttr = {
|
|
@@ -7412,7 +7598,9 @@
|
|
|
7412
7598
|
}
|
|
7413
7599
|
},
|
|
7414
7600
|
handleNumberDelete: function handleNumberDelete(event) {
|
|
7415
|
-
this.curValue === ''
|
|
7601
|
+
if (this.curValue === '') {
|
|
7602
|
+
this.curValue = this.initialControlValue === undefined ? this.max : Math.min(this.initialControlValue, this.max);
|
|
7603
|
+
}
|
|
7416
7604
|
var curNumberValue = Number(this.curValue);
|
|
7417
7605
|
if (curNumberValue - 1 >= this.min) {
|
|
7418
7606
|
var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
|
|
@@ -7427,7 +7615,9 @@
|
|
|
7427
7615
|
}
|
|
7428
7616
|
},
|
|
7429
7617
|
handleNumberAdd: function handleNumberAdd(event) {
|
|
7430
|
-
this.curValue === ''
|
|
7618
|
+
if (this.curValue === '') {
|
|
7619
|
+
this.curValue = this.initialControlValue === undefined ? this.min : Math.max(this.initialControlValue, this.min);
|
|
7620
|
+
}
|
|
7431
7621
|
var curNumberValue = Number(this.curValue);
|
|
7432
7622
|
if (curNumberValue <= this.max - 1) {
|
|
7433
7623
|
var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
|
|
@@ -7581,16 +7771,16 @@
|
|
|
7581
7771
|
}
|
|
7582
7772
|
},
|
|
7583
7773
|
handlerInput: function handlerInput(event) {
|
|
7584
|
-
var
|
|
7774
|
+
var _this5 = this;
|
|
7585
7775
|
if (this.inputType === 'number' && this.isOnComposition) {
|
|
7586
7776
|
return;
|
|
7587
7777
|
}
|
|
7588
7778
|
this.$nextTick(function () {
|
|
7589
7779
|
var value = event.target.value;
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7780
|
+
_this5.setCurValue(value);
|
|
7781
|
+
_this5.$emit('input', value, event);
|
|
7782
|
+
_this5.$emit('change', value, event);
|
|
7783
|
+
_this5.dispatch('bk-form-item', 'form-change');
|
|
7594
7784
|
});
|
|
7595
7785
|
},
|
|
7596
7786
|
handlerClear: function handlerClear(event) {
|
|
@@ -7695,6 +7885,13 @@
|
|
|
7695
7885
|
}, [_c('span', {
|
|
7696
7886
|
staticClass: "strong"
|
|
7697
7887
|
}, [_vm._v(_vm._s(_vm.curValue && _vm.curValue.length || 0))]), _vm._v("/"), _c('span', [_vm._v(_vm._s(_vm.maxlength))])])] : _vm._e()], 2)] : [_c('div', {
|
|
7888
|
+
directives: [{
|
|
7889
|
+
name: "bk-tooltips",
|
|
7890
|
+
rawName: "v-bk-tooltips",
|
|
7891
|
+
value: _vm.inputTooltips,
|
|
7892
|
+
expression: "inputTooltips"
|
|
7893
|
+
}],
|
|
7894
|
+
ref: "inputWrapper",
|
|
7698
7895
|
class: ["bk-input-" + _vm.type]
|
|
7699
7896
|
}, [_c('input', _vm._b({
|
|
7700
7897
|
ref: "input",
|
package/lib/rate.js
CHANGED
|
@@ -49,10 +49,18 @@
|
|
|
49
49
|
var rate = index + 1;
|
|
50
50
|
this.$emit('chooseRate', rate);
|
|
51
51
|
},
|
|
52
|
-
changeHover: function changeHover(index) {
|
|
52
|
+
changeHover: function changeHover(e, index) {
|
|
53
53
|
if (!this.edit) return;
|
|
54
54
|
var rate = index + 1;
|
|
55
55
|
this.$emit('changeHover', rate);
|
|
56
|
+
this.$nextTick(function () {
|
|
57
|
+
e.target.classList.add('bk-rate-star-is-hover');
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
handleMouseLeave: function handleMouseLeave(e, index) {
|
|
61
|
+
this.$nextTick(function () {
|
|
62
|
+
e.target.classList.remove('bk-rate-star-is-hover');
|
|
63
|
+
});
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
};
|
|
@@ -157,7 +165,10 @@
|
|
|
157
165
|
return _vm.chooseRate(index);
|
|
158
166
|
},
|
|
159
167
|
"mouseenter": function mouseenter($event) {
|
|
160
|
-
return _vm.changeHover(index);
|
|
168
|
+
return _vm.changeHover($event, index);
|
|
169
|
+
},
|
|
170
|
+
"mouseleave": function mouseleave($event) {
|
|
171
|
+
return _vm.handleMouseLeave($event, index);
|
|
161
172
|
}
|
|
162
173
|
}
|
|
163
174
|
}, [_c('g', {
|
|
@@ -217,7 +228,7 @@
|
|
|
217
228
|
},
|
|
218
229
|
width: {
|
|
219
230
|
type: Number,
|
|
220
|
-
default:
|
|
231
|
+
default: 16
|
|
221
232
|
},
|
|
222
233
|
height: {
|
|
223
234
|
type: Number,
|
package/lib/resize-layout.js
CHANGED
|
@@ -685,6 +685,7 @@
|
|
|
685
685
|
return false;
|
|
686
686
|
}
|
|
687
687
|
aside.style[_this.computedStyleKey] = resizeProxy.style[placement];
|
|
688
|
+
console.error('mouseup', aside.style[_this.computedStyleKey]);
|
|
688
689
|
};
|
|
689
690
|
document.addEventListener('mousemove', handleMouseMove);
|
|
690
691
|
document.addEventListener('mouseup', handleMouseUp);
|
|
@@ -717,7 +718,7 @@
|
|
|
717
718
|
this.setupAsideListener(!this.collapsed);
|
|
718
719
|
if (this.collapsed) {
|
|
719
720
|
aside.setAttribute("data-".concat(this.computedStyleKey), asideRect[this.computedStyleKey] + 'px');
|
|
720
|
-
aside.style[this.computedStyleKey] = '5px';
|
|
721
|
+
aside.style[this.computedStyleKey] = this.collapsible ? '0' : '5px';
|
|
721
722
|
} else {
|
|
722
723
|
this.asideContentVisible = true;
|
|
723
724
|
aside.style[this.computedStyleKey] = aside.getAttribute("data-".concat(this.computedStyleKey));
|
|
@@ -805,6 +806,7 @@
|
|
|
805
806
|
var _c = _vm._self._c || _h;
|
|
806
807
|
return _c('div', {
|
|
807
808
|
class: [_vm.extCls, 'bk-resize-layout', "bk-resize-layout-" + _vm.placement, {
|
|
809
|
+
'bk-resize-layout-collapsible': _vm.collapsible,
|
|
808
810
|
'bk-resize-layout-collapsed': _vm.collapsed,
|
|
809
811
|
'bk-resize-layout-border': _vm.border
|
|
810
812
|
}]
|
package/lib/select.js
CHANGED
|
@@ -4014,9 +4014,7 @@
|
|
|
4014
4014
|
return !this.enabledOptions.length;
|
|
4015
4015
|
},
|
|
4016
4016
|
isAllSelected: function isAllSelected() {
|
|
4017
|
-
return
|
|
4018
|
-
return !option.isSelected;
|
|
4019
|
-
});
|
|
4017
|
+
return this.select.selected.length === this.enabledOptions.length;
|
|
4020
4018
|
}
|
|
4021
4019
|
},
|
|
4022
4020
|
watch: {
|
|
@@ -4302,11 +4300,11 @@
|
|
|
4302
4300
|
staticClass: "point point3"
|
|
4303
4301
|
}), _c('div', {
|
|
4304
4302
|
staticClass: "point point4"
|
|
4305
|
-
})]], 2), _c('div', {
|
|
4303
|
+
})]], 2), _vm.title ? _c('div', {
|
|
4306
4304
|
staticClass: "bk-loading-title"
|
|
4307
4305
|
}, [_vm._t("title", function () {
|
|
4308
4306
|
return [_vm._v(_vm._s(_vm.title))];
|
|
4309
|
-
})], 2)])])], 1) : _c('transition', {
|
|
4307
|
+
})], 2) : _vm._e()])])], 1) : _c('transition', {
|
|
4310
4308
|
attrs: {
|
|
4311
4309
|
"name": "fade",
|
|
4312
4310
|
"duration": {
|
|
@@ -4358,11 +4356,11 @@
|
|
|
4358
4356
|
staticClass: "point point3"
|
|
4359
4357
|
}), _c('div', {
|
|
4360
4358
|
staticClass: "point point4"
|
|
4361
|
-
})]], 2), _c('div', {
|
|
4359
|
+
})]], 2), _vm.title ? _c('div', {
|
|
4362
4360
|
staticClass: "bk-loading-title"
|
|
4363
4361
|
}, [_vm._t("title", function () {
|
|
4364
4362
|
return [_vm._v(_vm._s(_vm.title))];
|
|
4365
|
-
})], 2)])])]);
|
|
4363
|
+
})], 2) : _vm._e()])])]);
|
|
4366
4364
|
};
|
|
4367
4365
|
var __vue_staticRenderFns__$2 = [];
|
|
4368
4366
|
|
|
@@ -4421,6 +4419,9 @@
|
|
|
4421
4419
|
if (options.title) {
|
|
4422
4420
|
el.$vm.title = options.title;
|
|
4423
4421
|
}
|
|
4422
|
+
if (options.size) {
|
|
4423
|
+
el.$vm.size = options.size;
|
|
4424
|
+
}
|
|
4424
4425
|
}
|
|
4425
4426
|
var bkLoading = {
|
|
4426
4427
|
inserted: function inserted(el, binding) {
|
|
@@ -4549,6 +4550,7 @@
|
|
|
4549
4550
|
data: function data() {
|
|
4550
4551
|
return {
|
|
4551
4552
|
overflowTagNode: null,
|
|
4553
|
+
overflowTagTips: null,
|
|
4552
4554
|
overflowTagIndex: null,
|
|
4553
4555
|
newOptionName: ''
|
|
4554
4556
|
};
|
|
@@ -4635,6 +4637,25 @@
|
|
|
4635
4637
|
},
|
|
4636
4638
|
setOverflowTagContent: function setOverflowTagContent() {
|
|
4637
4639
|
this.overflowTagNode.textContent = "+".concat(this.select.selected.length - this.overflowTagIndex);
|
|
4640
|
+
this.destroyTippy();
|
|
4641
|
+
this.overflowTagTips = tippy(this.overflowTagNode, {
|
|
4642
|
+
duration: 0,
|
|
4643
|
+
arrow: true,
|
|
4644
|
+
size: 'small',
|
|
4645
|
+
trigger: 'mouseenter focus',
|
|
4646
|
+
theme: 'dark',
|
|
4647
|
+
interactive: true,
|
|
4648
|
+
boundary: 'window',
|
|
4649
|
+
content: this.getOverflowTagTips(),
|
|
4650
|
+
allowHTML: true,
|
|
4651
|
+
extCls: ''
|
|
4652
|
+
});
|
|
4653
|
+
},
|
|
4654
|
+
getOverflowTagTips: function getOverflowTagTips() {
|
|
4655
|
+
var data = this.select.selectedOptions.slice(this.overflowTagIndex, this.select.selectedOptions.length) || [];
|
|
4656
|
+
return data.map(function (option) {
|
|
4657
|
+
return option.name;
|
|
4658
|
+
}).join(',');
|
|
4638
4659
|
},
|
|
4639
4660
|
getOverflowTagNode: function getOverflowTagNode() {
|
|
4640
4661
|
if (this.overflowTagNode) {
|
|
@@ -4649,6 +4670,12 @@
|
|
|
4649
4670
|
if (this.overflowTagNode && this.overflowTagNode.parentNode === this.$el) {
|
|
4650
4671
|
this.$el.removeChild(this.overflowTagNode);
|
|
4651
4672
|
}
|
|
4673
|
+
this.destroyTippy();
|
|
4674
|
+
},
|
|
4675
|
+
destroyTippy: function destroyTippy() {
|
|
4676
|
+
if (!this.overflowTagTips) return;
|
|
4677
|
+
this.overflowTagTips.destroy();
|
|
4678
|
+
this.overflowTagTips = null;
|
|
4652
4679
|
},
|
|
4653
4680
|
handleCreateTag: function handleCreateTag(e) {
|
|
4654
4681
|
this.$emit('create-tag', e.target.value);
|
|
@@ -6181,6 +6208,10 @@
|
|
|
6181
6208
|
};
|
|
6182
6209
|
},
|
|
6183
6210
|
computed: {
|
|
6211
|
+
virtualScrollHeight: function virtualScrollHeight() {
|
|
6212
|
+
var selectAllOptionHeight = 39;
|
|
6213
|
+
return this.showSelectAll ? this.scrollHeight - selectAllOptionHeight : this.scrollHeight;
|
|
6214
|
+
},
|
|
6184
6215
|
selectedName: function selectedName() {
|
|
6185
6216
|
if (this.selectedOptions) {
|
|
6186
6217
|
if (this.multiple) {
|
|
@@ -6752,7 +6783,7 @@
|
|
|
6752
6783
|
"placement": "bottom-start",
|
|
6753
6784
|
"theme": "light bk-select-dropdown",
|
|
6754
6785
|
"animation": "slide-toggle",
|
|
6755
|
-
"offset":
|
|
6786
|
+
"offset": 0,
|
|
6756
6787
|
"distance": _vm.popoverDistance,
|
|
6757
6788
|
"z-index": _vm.zIndex,
|
|
6758
6789
|
"on-show": _vm.handleDropdownShow,
|
|
@@ -6889,7 +6920,7 @@
|
|
|
6889
6920
|
ref: "virtualScroll",
|
|
6890
6921
|
staticClass: "bk-virtual-select",
|
|
6891
6922
|
style: {
|
|
6892
|
-
height: _vm.
|
|
6923
|
+
height: _vm.virtualScrollHeight + 'px',
|
|
6893
6924
|
width: '100%'
|
|
6894
6925
|
},
|
|
6895
6926
|
attrs: {
|