bkui-vue 2.0.2-beta.26 → 2.0.2-beta.28
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/index.cjs.js +15 -15
- package/dist/index.esm.js +2955 -2943
- package/dist/index.umd.js +15 -15
- package/lib/index.js +1 -1
- package/lib/search-select/index.js +22 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
@@ -3015,6 +3015,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
3015
3015
|
switch (event.code) {
|
3016
3016
|
case 'Enter':
|
3017
3017
|
case 'NumpadEnter':
|
3018
|
+
event.preventDefault();
|
3018
3019
|
if (props.valueBehavior === ValueBehavior.NEED_KEY && menuList.value.some(function (item) {
|
3019
3020
|
return item.id === menuHoverId.value;
|
3020
3021
|
})) {
|
@@ -3584,12 +3585,30 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
3584
3585
|
(0,external_vue_namespaceObject.nextTick)(clearInput);
|
3585
3586
|
}
|
3586
3587
|
}
|
3588
|
+
function clearInputBr() {
|
3589
|
+
if (!inputRef.value) return;
|
3590
|
+
var brs = inputRef.value.querySelectorAll('br');
|
3591
|
+
brs === null || brs === void 0 || brs.forEach(function (br) {
|
3592
|
+
return br.remove();
|
3593
|
+
});
|
3594
|
+
}
|
3587
3595
|
function clearInput() {
|
3588
3596
|
if (!inputRef.value) return;
|
3589
|
-
|
3590
|
-
|
3597
|
+
// magic code 判断是否是 windows 系统
|
3598
|
+
var isWindows = navigator.userAgent.includes('Windows');
|
3599
|
+
if (isWindows) {
|
3600
|
+
setTimeout(function () {
|
3601
|
+
keyword.value = '';
|
3602
|
+
inputRef.value.innerText = '';
|
3603
|
+
clearInputBr();
|
3604
|
+
}, 32);
|
3605
|
+
return;
|
3606
|
+
}
|
3607
|
+
keyword.value = '';
|
3608
|
+
(0,external_vue_namespaceObject.nextTick)(function () {
|
3591
3609
|
inputRef.value.innerText = '';
|
3592
|
-
|
3610
|
+
clearInputBr();
|
3611
|
+
});
|
3593
3612
|
}
|
3594
3613
|
function str2SelectedItem(str) {
|
3595
3614
|
var _str$split = str.split(':'),
|