bkui-vue 1.0.3-beta.56 → 1.0.3-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.
- package/dist/index.cjs.js +36 -36
- package/dist/index.esm.js +4894 -4889
- package/dist/index.umd.js +36 -36
- package/lib/search-select/index.js +7 -4
- package/lib/search-select/selected.d.ts +1 -0
- package/lib/select/index.d.ts +23 -0
- package/lib/select/index.js +4 -1
- package/lib/select/select.d.ts +11 -0
- package/package.json +1 -1
@@ -2410,12 +2410,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2410
2410
|
setup: function setup(_props, _ref) {
|
2411
2411
|
var emit = _ref.emit;
|
2412
2412
|
var inputRef = (0,external_vue_namespaceObject.ref)(null);
|
2413
|
+
var selectedInputRef = (0,external_vue_namespaceObject.ref)(null);
|
2413
2414
|
var _useSearchSelectInjec = useSearchSelectInject(),
|
2414
2415
|
onEditClick = _useSearchSelectInjec.onEditClick,
|
2415
2416
|
onEditEnter = _useSearchSelectInjec.onEditEnter,
|
2416
2417
|
onEditBlur = _useSearchSelectInjec.onEditBlur,
|
2417
|
-
editKey = _useSearchSelectInjec.editKey
|
2418
|
-
isClickOutside = _useSearchSelectInjec.isClickOutside;
|
2418
|
+
editKey = _useSearchSelectInjec.editKey;
|
2419
2419
|
function handleDeleteSelected(index) {
|
2420
2420
|
emit('delete', index);
|
2421
2421
|
}
|
@@ -2436,7 +2436,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2436
2436
|
onEditBlur();
|
2437
2437
|
}
|
2438
2438
|
function handleInputOutside(target) {
|
2439
|
-
|
2439
|
+
var _selectedInputRef$val;
|
2440
|
+
return !((_selectedInputRef$val = selectedInputRef.value) !== null && _selectedInputRef$val !== void 0 && _selectedInputRef$val.contains(target));
|
2440
2441
|
}
|
2441
2442
|
function copySeletedItem(item) {
|
2442
2443
|
var newItem = new SelectedItem(item.searchItem, item.type);
|
@@ -2446,6 +2447,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2446
2447
|
}
|
2447
2448
|
return {
|
2448
2449
|
inputRef: inputRef,
|
2450
|
+
selectedInputRef: selectedInputRef,
|
2449
2451
|
editKey: editKey,
|
2450
2452
|
copySeletedItem: copySeletedItem,
|
2451
2453
|
handleDeleteSelected: handleDeleteSelected,
|
@@ -2460,7 +2462,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2460
2462
|
var contentComponent = function contentComponent(item, index) {
|
2461
2463
|
return _this.editKey === "".concat(item.id, "_").concat(index) ? (0,external_vue_namespaceObject.createVNode)("div", {
|
2462
2464
|
"class": "selected-input",
|
2463
|
-
"key": _this.editKey.toString()
|
2465
|
+
"key": _this.editKey.toString(),
|
2466
|
+
"ref": "selectedInputRef"
|
2464
2467
|
}, [(0,external_vue_namespaceObject.createVNode)(input, {
|
2465
2468
|
"ref": "inputRef",
|
2466
2469
|
"key": _this.editKey.toString(),
|
@@ -220,6 +220,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
220
220
|
showInputBefore: boolean;
|
221
221
|
showCondition: boolean;
|
222
222
|
}>>;
|
223
|
+
selectedInputRef: import("vue").Ref<HTMLDivElement>;
|
223
224
|
editKey: import("vue").Ref<String>;
|
224
225
|
copySeletedItem: (item: SelectedItem) => SelectedItem;
|
225
226
|
handleDeleteSelected: (index: number) => void;
|
package/lib/select/index.d.ts
CHANGED
@@ -283,6 +283,11 @@ declare const BkSelect: {
|
|
283
283
|
} & {
|
284
284
|
default: boolean;
|
285
285
|
};
|
286
|
+
disableFocusBehavior: import("vue-types").VueTypeValidableDef<boolean> & {
|
287
|
+
default: boolean;
|
288
|
+
} & {
|
289
|
+
default: boolean;
|
290
|
+
};
|
286
291
|
keepSearchValue: import("vue-types").VueTypeValidableDef<boolean> & {
|
287
292
|
default: boolean;
|
288
293
|
} & {
|
@@ -970,6 +975,11 @@ declare const BkSelect: {
|
|
970
975
|
} & {
|
971
976
|
default: boolean;
|
972
977
|
};
|
978
|
+
disableFocusBehavior: import("vue-types").VueTypeValidableDef<boolean> & {
|
979
|
+
default: boolean;
|
980
|
+
} & {
|
981
|
+
default: boolean;
|
982
|
+
};
|
973
983
|
keepSearchValue: import("vue-types").VueTypeValidableDef<boolean> & {
|
974
984
|
default: boolean;
|
975
985
|
} & {
|
@@ -1045,6 +1055,7 @@ declare const BkSelect: {
|
|
1045
1055
|
enableVirtualRender: boolean;
|
1046
1056
|
allowEmptyValues: unknown[];
|
1047
1057
|
autoFocus: boolean;
|
1058
|
+
disableFocusBehavior: boolean;
|
1048
1059
|
keepSearchValue: boolean;
|
1049
1060
|
searchWithPinyin: boolean;
|
1050
1061
|
}, true, {}, {}, {
|
@@ -1336,6 +1347,11 @@ declare const BkSelect: {
|
|
1336
1347
|
} & {
|
1337
1348
|
default: boolean;
|
1338
1349
|
};
|
1350
|
+
disableFocusBehavior: import("vue-types").VueTypeValidableDef<boolean> & {
|
1351
|
+
default: boolean;
|
1352
|
+
} & {
|
1353
|
+
default: boolean;
|
1354
|
+
};
|
1339
1355
|
keepSearchValue: import("vue-types").VueTypeValidableDef<boolean> & {
|
1340
1356
|
default: boolean;
|
1341
1357
|
} & {
|
@@ -1780,6 +1796,7 @@ declare const BkSelect: {
|
|
1780
1796
|
enableVirtualRender: boolean;
|
1781
1797
|
allowEmptyValues: unknown[];
|
1782
1798
|
autoFocus: boolean;
|
1799
|
+
disableFocusBehavior: boolean;
|
1783
1800
|
keepSearchValue: boolean;
|
1784
1801
|
searchWithPinyin: boolean;
|
1785
1802
|
}>;
|
@@ -2068,6 +2085,11 @@ declare const BkSelect: {
|
|
2068
2085
|
} & {
|
2069
2086
|
default: boolean;
|
2070
2087
|
};
|
2088
|
+
disableFocusBehavior: import("vue-types").VueTypeValidableDef<boolean> & {
|
2089
|
+
default: boolean;
|
2090
|
+
} & {
|
2091
|
+
default: boolean;
|
2092
|
+
};
|
2071
2093
|
keepSearchValue: import("vue-types").VueTypeValidableDef<boolean> & {
|
2072
2094
|
default: boolean;
|
2073
2095
|
} & {
|
@@ -2512,6 +2534,7 @@ declare const BkSelect: {
|
|
2512
2534
|
enableVirtualRender: boolean;
|
2513
2535
|
allowEmptyValues: unknown[];
|
2514
2536
|
autoFocus: boolean;
|
2537
|
+
disableFocusBehavior: boolean;
|
2515
2538
|
keepSearchValue: boolean;
|
2516
2539
|
searchWithPinyin: boolean;
|
2517
2540
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]> & Readonly<{
|
package/lib/select/index.js
CHANGED
@@ -2644,6 +2644,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2644
2644
|
enableVirtualRender: shared_namespaceObject.PropTypes.bool.def(false),
|
2645
2645
|
allowEmptyValues: shared_namespaceObject.PropTypes.array.def([]),
|
2646
2646
|
autoFocus: shared_namespaceObject.PropTypes.bool.def(false),
|
2647
|
+
disableFocusBehavior: shared_namespaceObject.PropTypes.bool.def(false),
|
2647
2648
|
keepSearchValue: shared_namespaceObject.PropTypes.bool.def(false),
|
2648
2649
|
prefix: shared_namespaceObject.PropTypes.string,
|
2649
2650
|
selectedStyle: (0,shared_namespaceObject.SelectedType)(),
|
@@ -2690,7 +2691,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2690
2691
|
selectedStyle = _toRefs.selectedStyle,
|
2691
2692
|
filterOption = _toRefs.filterOption,
|
2692
2693
|
searchWithPinyin = _toRefs.searchWithPinyin,
|
2693
|
-
highlightKeyword = _toRefs.highlightKeyword
|
2694
|
+
highlightKeyword = _toRefs.highlightKeyword,
|
2695
|
+
disableFocusBehavior = _toRefs.disableFocusBehavior;
|
2694
2696
|
var localNoDataText = (0,external_vue_namespaceObject.computed)(function () {
|
2695
2697
|
if (props.noDataText === undefined) {
|
2696
2698
|
return t.value.noData;
|
@@ -3092,6 +3094,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3092
3094
|
};
|
3093
3095
|
// 聚焦输入框
|
3094
3096
|
var focusInput = function focusInput() {
|
3097
|
+
if (disableFocusBehavior.value) return;
|
3095
3098
|
setTimeout(function () {
|
3096
3099
|
if (!inputSearch.value && !allowCreate.value) {
|
3097
3100
|
var _searchRef$value;
|
package/lib/select/select.d.ts
CHANGED
@@ -282,6 +282,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
282
282
|
} & {
|
283
283
|
default: boolean;
|
284
284
|
};
|
285
|
+
disableFocusBehavior: import("vue-types").VueTypeValidableDef<boolean> & {
|
286
|
+
default: boolean;
|
287
|
+
} & {
|
288
|
+
default: boolean;
|
289
|
+
};
|
285
290
|
keepSearchValue: import("vue-types").VueTypeValidableDef<boolean> & {
|
286
291
|
default: boolean;
|
287
292
|
} & {
|
@@ -957,6 +962,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
957
962
|
} & {
|
958
963
|
default: boolean;
|
959
964
|
};
|
965
|
+
disableFocusBehavior: import("vue-types").VueTypeValidableDef<boolean> & {
|
966
|
+
default: boolean;
|
967
|
+
} & {
|
968
|
+
default: boolean;
|
969
|
+
};
|
960
970
|
keepSearchValue: import("vue-types").VueTypeValidableDef<boolean> & {
|
961
971
|
default: boolean;
|
962
972
|
} & {
|
@@ -1032,6 +1042,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1032
1042
|
enableVirtualRender: boolean;
|
1033
1043
|
allowEmptyValues: unknown[];
|
1034
1044
|
autoFocus: boolean;
|
1045
|
+
disableFocusBehavior: boolean;
|
1035
1046
|
keepSearchValue: boolean;
|
1036
1047
|
searchWithPinyin: boolean;
|
1037
1048
|
}, {}>;
|