bkui-vue 2.0.1-beta.72 → 2.0.1-beta.72.fix.1
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 +42 -42
- package/dist/index.esm.js +12900 -13004
- package/dist/index.umd.js +42 -42
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +5 -7
- package/lib/color-picker/color-picker.d.ts +0 -16
- package/lib/color-picker/index.d.ts +0 -23
- package/lib/color-picker/index.js +1 -8
- package/lib/dialog/dialog.d.ts +6 -6
- package/lib/dialog/index.d.ts +12 -12
- package/lib/dialog/index.js +1 -3
- package/lib/dialog/props.d.ts +3 -3
- package/lib/index.js +1 -1
- package/lib/input/index.js +521 -42
- package/lib/input/input.css +1 -23
- package/lib/input/input.less +1 -30
- package/lib/input/input.variable.css +1 -23
- package/lib/modal/index.js +21 -54
- package/lib/plugin-popover/index.js +1 -2
- package/lib/popover/index.js +1 -2
- package/lib/resize-layout/index.js +0 -4
- package/lib/search-select/index.d.ts +6 -60
- package/lib/search-select/index.js +89 -201
- package/lib/search-select/input.d.ts +2 -12
- package/lib/search-select/menu.d.ts +0 -12
- package/lib/search-select/search-select.css +1 -0
- package/lib/search-select/search-select.d.ts +4 -18
- package/lib/search-select/search-select.less +1 -1
- package/lib/search-select/search-select.variable.css +1 -0
- package/lib/search-select/selected.d.ts +0 -23
- package/lib/select/common.d.ts +1 -1
- package/lib/select/index.d.ts +0 -6
- package/lib/select/index.js +12 -35
- package/lib/select/select.d.ts +0 -2
- package/lib/select/selectTagInput.d.ts +0 -1
- package/lib/select/type.d.ts +2 -2
- package/lib/tab/index.d.ts +0 -22
- package/lib/tab/index.js +10 -32
- package/lib/tab/props.d.ts +0 -10
- package/lib/tab/tab-nav.d.ts +2 -12
- package/lib/tab/tab-panel.d.ts +0 -22
- package/lib/tab/tab.css +0 -64
- package/lib/tab/tab.less +4 -91
- package/lib/tab/tab.variable.css +0 -64
- package/lib/table/hooks/use-settings.d.ts +0 -2
- package/lib/table/index.js +7 -66
- package/lib/table/props.d.ts +4 -5
- package/lib/table/table.css +0 -6
- package/lib/table/table.less +0 -14
- package/lib/table/table.variable.css +0 -6
- package/lib/table/utils.d.ts +0 -1
- package/lib/tag-input/index.js +1 -3
- package/lib/upload/index.js +9 -31
- package/package.json +1 -1
@@ -493,7 +493,7 @@ const directives_namespaceObject = directives_x({ ["clickoutside"]: () => __WEBP
|
|
493
493
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
494
494
|
var icon_y = x => () => x
|
495
495
|
const icon_namespaceObject = icon_x({ ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error, ["ExclamationCircleShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ExclamationCircleShape, ["Search"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Search });
|
496
|
-
;// CONCATENATED MODULE: ../../node_modules
|
496
|
+
;// CONCATENATED MODULE: ../../node_modules/resize-detector/esm/index.js
|
497
497
|
var raf = null;
|
498
498
|
function requestAnimationFrame (callback) {
|
499
499
|
if (!raf) {
|
@@ -559,7 +559,7 @@ function getComputedStyle (elem, prop, pseudo) {
|
|
559
559
|
}
|
560
560
|
|
561
561
|
function getRenderInfo (elem) {
|
562
|
-
if (!
|
562
|
+
if (!document.documentElement.contains(elem)) {
|
563
563
|
return {
|
564
564
|
detached: true,
|
565
565
|
rendered: false
|
@@ -567,7 +567,7 @@ function getRenderInfo (elem) {
|
|
567
567
|
}
|
568
568
|
|
569
569
|
var current = elem;
|
570
|
-
while (current
|
570
|
+
while (current !== document) {
|
571
571
|
if (getComputedStyle(current, 'display') === 'none') {
|
572
572
|
return {
|
573
573
|
detached: false,
|
@@ -1308,12 +1308,6 @@ var SelectedItem = /*#__PURE__*/function () {
|
|
1308
1308
|
logical: {
|
1309
1309
|
type: String,
|
1310
1310
|
"default": SearchLogical.OR
|
1311
|
-
},
|
1312
|
-
maxHeight: {
|
1313
|
-
type: Number,
|
1314
|
-
"default": function _default() {
|
1315
|
-
return 392;
|
1316
|
-
}
|
1317
1311
|
}
|
1318
1312
|
},
|
1319
1313
|
emits: ['selectItem', 'selectCondition', 'footerClick', 'update:logical'],
|
@@ -1335,11 +1329,6 @@ var SelectedItem = /*#__PURE__*/function () {
|
|
1335
1329
|
}
|
1336
1330
|
return props.footerBtns;
|
1337
1331
|
});
|
1338
|
-
var resolveContentStyles = (0,external_vue_namespaceObject.computed)(function () {
|
1339
|
-
return {
|
1340
|
-
maxHeight: "".concat(props.maxHeight, "px")
|
1341
|
-
};
|
1342
|
-
});
|
1343
1332
|
// events
|
1344
1333
|
function handleClick(item) {
|
1345
1334
|
emit('selectItem', item);
|
@@ -1409,7 +1398,6 @@ var SelectedItem = /*#__PURE__*/function () {
|
|
1409
1398
|
getSearchNode: getSearchNode,
|
1410
1399
|
localFooterBtns: localFooterBtns,
|
1411
1400
|
resolveClassName: resolveClassName,
|
1412
|
-
resolveContentStyles: resolveContentStyles,
|
1413
1401
|
t: t
|
1414
1402
|
};
|
1415
1403
|
},
|
@@ -1464,7 +1452,6 @@ var SelectedItem = /*#__PURE__*/function () {
|
|
1464
1452
|
})])]);
|
1465
1453
|
};
|
1466
1454
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
1467
|
-
"style": this.resolveContentStyles,
|
1468
1455
|
"class": this.resolveClassName('search-select-menu')
|
1469
1456
|
}, [!!((_this$conditions = this.conditions) !== null && _this$conditions !== void 0 && _this$conditions.length) && (0,external_vue_namespaceObject.createVNode)("ul", {
|
1470
1457
|
"class": "menu-header"
|
@@ -1484,9 +1471,6 @@ var SelectedItem = /*#__PURE__*/function () {
|
|
1484
1471
|
|
1485
1472
|
|
1486
1473
|
|
1487
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = input_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
1488
|
-
function input_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return input_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return input_arrayLikeToArray(o, minLen); }
|
1489
|
-
function input_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
1490
1474
|
|
1491
1475
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
1492
1476
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -1548,12 +1532,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
1548
1532
|
type: String,
|
1549
1533
|
"default": SearchInputMode.DEFAULT
|
1550
1534
|
},
|
1551
|
-
maxHeight: {
|
1552
|
-
type: Number,
|
1553
|
-
"default": function _default() {
|
1554
|
-
return 392;
|
1555
|
-
}
|
1556
|
-
},
|
1557
1535
|
getMenuList: Function,
|
1558
1536
|
validateValues: Function,
|
1559
1537
|
valueBehavior: String
|
@@ -2077,7 +2055,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2077
2055
|
function _setMenuList() {
|
2078
2056
|
_setMenuList = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee5() {
|
2079
2057
|
var _props$data, _usingItem$value$sear, _usingItem$value$valu;
|
2080
|
-
var list, _usingItem$value14, _keyword$value3,
|
2058
|
+
var list, _usingItem$value14, _keyword$value3, hoverItem;
|
2081
2059
|
return regenerator_default().wrap(function _callee5$(_context5) {
|
2082
2060
|
while (1) switch (_context5.prev = _context5.next) {
|
2083
2061
|
case 0:
|
@@ -2102,79 +2080,51 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2102
2080
|
list = props.data.filter(function (item) {
|
2103
2081
|
return !item.isSelected;
|
2104
2082
|
}).slice();
|
2105
|
-
} else {
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2142
|
-
|
2143
|
-
|
2144
|
-
|
2145
|
-
try {
|
2146
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
2147
|
-
_child = _step3.value;
|
2148
|
-
if (_child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
|
2149
|
-
_filterList.push(_objectSpread(_objectSpread({}, item), {}, {
|
2150
|
-
realId: item.id,
|
2151
|
-
id: (0,shared_namespaceObject.random)(10),
|
2152
|
-
value: _child
|
2153
|
-
}));
|
2154
|
-
}
|
2155
|
-
}
|
2156
|
-
} catch (err) {
|
2157
|
-
_iterator3.e(err);
|
2158
|
-
} finally {
|
2159
|
-
_iterator3.f();
|
2160
|
-
}
|
2161
|
-
if (!_filterList.length && !item.onlyRecommendChildren) {
|
2162
|
-
_filterList.push(_objectSpread(_objectSpread({}, item), {}, {
|
2163
|
-
value: {
|
2164
|
-
id: keyword.value,
|
2165
|
-
name: keyword.value
|
2166
|
-
}
|
2167
|
-
}));
|
2168
|
-
}
|
2169
|
-
(_list2 = list).push.apply(_list2, _filterList);
|
2083
|
+
} else props.data.filter(function (item) {
|
2084
|
+
return !item.isSelected;
|
2085
|
+
}).forEach(function (item) {
|
2086
|
+
var isMatched = item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase());
|
2087
|
+
if (isMatched) {
|
2088
|
+
var _item$children, _list;
|
2089
|
+
list.push(item);
|
2090
|
+
var filterList = [];
|
2091
|
+
(_item$children = item.children) === null || _item$children === void 0 || _item$children.forEach(function (child) {
|
2092
|
+
filterList.push(_objectSpread(_objectSpread({}, item), {}, {
|
2093
|
+
realId: item.id,
|
2094
|
+
id: (0,shared_namespaceObject.random)(10),
|
2095
|
+
value: child
|
2096
|
+
}));
|
2097
|
+
});
|
2098
|
+
!filterList.length && !item.onlyRecommendChildren && filterList.push(_objectSpread(_objectSpread({}, item), {}, {
|
2099
|
+
realId: item.id,
|
2100
|
+
id: (0,shared_namespaceObject.random)(10),
|
2101
|
+
value: {
|
2102
|
+
id: keyword.value,
|
2103
|
+
name: keyword.value
|
2104
|
+
}
|
2105
|
+
}));
|
2106
|
+
(_list = list).push.apply(_list, filterList);
|
2107
|
+
} else {
|
2108
|
+
var _item$children2, _list2;
|
2109
|
+
var _filterList = [];
|
2110
|
+
(_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(function (child) {
|
2111
|
+
if (child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
|
2112
|
+
_filterList.push(_objectSpread(_objectSpread({}, item), {}, {
|
2113
|
+
realId: item.id,
|
2114
|
+
id: (0,shared_namespaceObject.random)(10),
|
2115
|
+
value: child
|
2116
|
+
}));
|
2117
|
+
}
|
2118
|
+
});
|
2119
|
+
!_filterList.length && !item.onlyRecommendChildren && _filterList.push(_objectSpread(_objectSpread({}, item), {}, {
|
2120
|
+
value: {
|
2121
|
+
id: keyword.value,
|
2122
|
+
name: keyword.value
|
2170
2123
|
}
|
2171
|
-
}
|
2172
|
-
|
2173
|
-
_iterator.e(err);
|
2174
|
-
} finally {
|
2175
|
-
_iterator.f();
|
2124
|
+
}));
|
2125
|
+
(_list2 = list).push.apply(_list2, _filterList);
|
2176
2126
|
}
|
2177
|
-
}
|
2127
|
+
});
|
2178
2128
|
} else if (usingItem.value.type === 'condition') {
|
2179
2129
|
list = props.conditions;
|
2180
2130
|
} else if (!((_usingItem$value$valu = usingItem.value.values) !== null && _usingItem$value$valu !== void 0 && _usingItem$value$valu.length) || usingItem.value.multiple || props.mode === SearchInputMode.EDIT) {
|
@@ -2529,7 +2479,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2529
2479
|
"keyword": _this.keyword,
|
2530
2480
|
"list": _this.menuList,
|
2531
2481
|
"logical": (_this$usingItem4 = _this.usingItem) === null || _this$usingItem4 === void 0 ? void 0 : _this$usingItem4.logical,
|
2532
|
-
"maxHeight": _this.maxHeight,
|
2533
2482
|
"multiple": !!multiple,
|
2534
2483
|
"selected": (values === null || values === void 0 ? void 0 : values.map(function (item) {
|
2535
2484
|
return item.id;
|
@@ -2603,12 +2552,6 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
|
|
2603
2552
|
type: Number,
|
2604
2553
|
"default": -1
|
2605
2554
|
},
|
2606
|
-
maxHeight: {
|
2607
|
-
type: Number,
|
2608
|
-
"default": function _default() {
|
2609
|
-
return 392;
|
2610
|
-
}
|
2611
|
-
},
|
2612
2555
|
conditions: {
|
2613
2556
|
type: Array,
|
2614
2557
|
"default": function _default() {
|
@@ -2690,7 +2633,6 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
|
|
2690
2633
|
"data": _this.data,
|
2691
2634
|
"defaultUsingItem": _this.copySelectedItem(item),
|
2692
2635
|
"getMenuList": _this.getMenuList,
|
2693
|
-
"maxHeight": _this.maxHeight,
|
2694
2636
|
"mode": SearchInputMode.EDIT,
|
2695
2637
|
"showCondition": false,
|
2696
2638
|
"validateValues": _this.validateValues,
|
@@ -2726,9 +2668,6 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
|
|
2726
2668
|
|
2727
2669
|
function search_select_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
2728
2670
|
function search_select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? search_select_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : search_select_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
2729
|
-
function search_select_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = search_select_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
2730
|
-
function search_select_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return search_select_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return search_select_arrayLikeToArray(o, minLen); }
|
2731
|
-
function search_select_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
2732
2671
|
/*
|
2733
2672
|
* Tencent is pleased to support the open source community by making
|
2734
2673
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -2766,7 +2705,6 @@ function search_select_arrayLikeToArray(arr, len) { if (len == null || len > arr
|
|
2766
2705
|
var INPUT_PADDING_WIDTH = 40;
|
2767
2706
|
var SELECTED_MARGIN_RIGHT = 6;
|
2768
2707
|
var INPUT_MIN_HEIGHT = 26;
|
2769
|
-
var MENU_ITEM_MIN_HEIGHT = 32;
|
2770
2708
|
var SearchSelectProps = {
|
2771
2709
|
data: {
|
2772
2710
|
type: Array,
|
@@ -2782,8 +2720,7 @@ var SearchSelectProps = {
|
|
2782
2720
|
},
|
2783
2721
|
maxHeight: {
|
2784
2722
|
type: Number,
|
2785
|
-
|
2786
|
-
"default": MENU_ITEM_MIN_HEIGHT * 12 + 8
|
2723
|
+
"default": 120
|
2787
2724
|
},
|
2788
2725
|
conditions: {
|
2789
2726
|
type: Array,
|
@@ -2856,24 +2793,13 @@ var SearchSelectProps = {
|
|
2856
2793
|
(0,external_vue_namespaceObject.watch)(function () {
|
2857
2794
|
return props.data;
|
2858
2795
|
}, function () {
|
2796
|
+
var _copyData$value;
|
2859
2797
|
copyData.value = JSON.parse(JSON.stringify(props.data));
|
2860
|
-
|
2861
|
-
|
2862
|
-
|
2863
|
-
|
2864
|
-
|
2865
|
-
item.isSelected = props.uniqueSelect && props.modelValue.some(function (set) {
|
2866
|
-
return set.id === item.id;
|
2867
|
-
});
|
2868
|
-
};
|
2869
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
2870
|
-
_loop();
|
2871
|
-
}
|
2872
|
-
} catch (err) {
|
2873
|
-
_iterator.e(err);
|
2874
|
-
} finally {
|
2875
|
-
_iterator.f();
|
2876
|
-
}
|
2798
|
+
(_copyData$value = copyData.value) === null || _copyData$value === void 0 || _copyData$value.forEach(function (item) {
|
2799
|
+
item.isSelected = props.uniqueSelect && !!props.modelValue.some(function (set) {
|
2800
|
+
return set.id === item.id;
|
2801
|
+
});
|
2802
|
+
});
|
2877
2803
|
}, {
|
2878
2804
|
immediate: true
|
2879
2805
|
});
|
@@ -2882,84 +2808,50 @@ var SearchSelectProps = {
|
|
2882
2808
|
return props.modelValue;
|
2883
2809
|
}, function (v) {
|
2884
2810
|
if (!(v !== null && v !== void 0 && v.length)) {
|
2811
|
+
var _copyData$value2;
|
2885
2812
|
selectedList.value = [];
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2889
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
2890
|
-
var item = _step2.value;
|
2891
|
-
item.isSelected = false;
|
2892
|
-
}
|
2893
|
-
} catch (err) {
|
2894
|
-
_iterator2.e(err);
|
2895
|
-
} finally {
|
2896
|
-
_iterator2.f();
|
2897
|
-
}
|
2813
|
+
(_copyData$value2 = copyData.value) === null || _copyData$value2 === void 0 || _copyData$value2.forEach(function (item) {
|
2814
|
+
item.isSelected = false;
|
2815
|
+
});
|
2898
2816
|
return;
|
2899
2817
|
}
|
2900
2818
|
var list = [];
|
2901
|
-
|
2902
|
-
|
2903
|
-
|
2904
|
-
|
2905
|
-
|
2906
|
-
|
2907
|
-
|
2819
|
+
v.forEach(function (item) {
|
2820
|
+
var selected = selectedList.value.find(function (set) {
|
2821
|
+
return set.id === item.id && set.name === item.name;
|
2822
|
+
});
|
2823
|
+
if ((selected === null || selected === void 0 ? void 0 : selected.toValueKey()) === JSON.stringify(item)) {
|
2824
|
+
selected.values = item.values || [];
|
2825
|
+
selected.logical = item.logical || SearchLogical.OR;
|
2826
|
+
list.push(selected);
|
2827
|
+
} else {
|
2828
|
+
var _item$values;
|
2829
|
+
var searchItem = props.data.find(function (set) {
|
2830
|
+
return set.id === item.id;
|
2908
2831
|
});
|
2909
|
-
|
2910
|
-
|
2911
|
-
|
2912
|
-
list.push(selected);
|
2913
|
-
} else {
|
2914
|
-
var _item$values;
|
2915
|
-
var searchItem = props.data.find(function (set) {
|
2832
|
+
var searchType = 'default';
|
2833
|
+
if (!searchItem) {
|
2834
|
+
searchItem = props.conditions.find(function (set) {
|
2916
2835
|
return set.id === item.id;
|
2917
2836
|
});
|
2918
|
-
|
2919
|
-
if (!searchItem) {
|
2920
|
-
searchItem = props.conditions.find(function (set) {
|
2921
|
-
return set.id === item.id;
|
2922
|
-
});
|
2923
|
-
if (searchItem) {
|
2924
|
-
searchType = 'condition';
|
2925
|
-
}
|
2926
|
-
}
|
2927
|
-
if (!searchItem && !((_item$values = item.values) !== null && _item$values !== void 0 && _item$values.length)) {
|
2928
|
-
searchType = 'text';
|
2929
|
-
}
|
2930
|
-
var newSelected = new SelectedItem(searchItem || item, searchType);
|
2931
|
-
newSelected.values = item.values || [];
|
2932
|
-
newSelected.logical = item.logical || SearchLogical.OR;
|
2933
|
-
list.push(newSelected);
|
2837
|
+
searchItem && (searchType = 'condition');
|
2934
2838
|
}
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2839
|
+
if (!searchItem && !((_item$values = item.values) !== null && _item$values !== void 0 && _item$values.length)) {
|
2840
|
+
searchType = 'text';
|
2841
|
+
}
|
2842
|
+
var newSelected = new SelectedItem(searchItem || item, searchType);
|
2843
|
+
newSelected.values = item.values || [];
|
2844
|
+
newSelected.logical = item.logical || SearchLogical.OR;
|
2845
|
+
list.push(newSelected);
|
2938
2846
|
}
|
2939
|
-
}
|
2940
|
-
_iterator3.e(err);
|
2941
|
-
} finally {
|
2942
|
-
_iterator3.f();
|
2943
|
-
}
|
2847
|
+
});
|
2944
2848
|
selectedList.value = list;
|
2945
2849
|
copyData.value = JSON.parse(JSON.stringify(props.data || []));
|
2946
|
-
|
2947
|
-
|
2948
|
-
|
2949
|
-
|
2950
|
-
|
2951
|
-
item.isSelected = props.uniqueSelect && !!list.some(function (set) {
|
2952
|
-
return set.id === item.id;
|
2953
|
-
});
|
2954
|
-
};
|
2955
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
2956
|
-
_loop3();
|
2957
|
-
}
|
2958
|
-
} catch (err) {
|
2959
|
-
_iterator4.e(err);
|
2960
|
-
} finally {
|
2961
|
-
_iterator4.f();
|
2962
|
-
}
|
2850
|
+
copyData.value.forEach(function (item) {
|
2851
|
+
item.isSelected = props.uniqueSelect && !!list.some(function (set) {
|
2852
|
+
return set.id === item.id;
|
2853
|
+
});
|
2854
|
+
});
|
2963
2855
|
}, {
|
2964
2856
|
immediate: true,
|
2965
2857
|
deep: true
|
@@ -3064,9 +2956,7 @@ var SearchSelectProps = {
|
|
3064
2956
|
}));
|
3065
2957
|
}
|
3066
2958
|
function handleInputFocus(v) {
|
3067
|
-
|
3068
|
-
overflowIndex.value = -1;
|
3069
|
-
}
|
2959
|
+
v && (overflowIndex.value = -1);
|
3070
2960
|
if (v === false) {
|
3071
2961
|
var _wrapRef$value$queryS;
|
3072
2962
|
(_wrapRef$value$queryS = wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container')))) === null || _wrapRef$value$queryS === void 0 || _wrapRef$value$queryS.scrollTo(0, 0);
|
@@ -3127,14 +3017,13 @@ var SearchSelectProps = {
|
|
3127
3017
|
"class": "search-prefix"
|
3128
3018
|
}, [(_this$$slots$prepend = (_this$$slots2 = this.$slots).prepend) === null || _this$$slots$prepend === void 0 ? void 0 : _this$$slots$prepend.call(_this$$slots2)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
3129
3019
|
"style": {
|
3130
|
-
|
3020
|
+
maxHeight: maxHeight
|
3131
3021
|
},
|
3132
3022
|
"class": "search-container"
|
3133
3023
|
}, [(0,external_vue_namespaceObject.createVNode)(selected, {
|
3134
3024
|
"conditions": this.localConditions,
|
3135
3025
|
"data": this.copyData,
|
3136
3026
|
"getMenuList": this.getMenuList,
|
3137
|
-
"maxHeight": this.maxHeight,
|
3138
3027
|
"overflowIndex": this.overflowIndex,
|
3139
3028
|
"selectedList": this.selectedList,
|
3140
3029
|
"validateValues": this.validateValues,
|
@@ -3149,7 +3038,6 @@ var SearchSelectProps = {
|
|
3149
3038
|
"conditions": this.localConditions,
|
3150
3039
|
"data": this.copyData,
|
3151
3040
|
"getMenuList": this.getMenuList,
|
3152
|
-
"maxHeight": this.maxHeight,
|
3153
3041
|
"placeholder": this.placeholder || this.t.pleaseSelect,
|
3154
3042
|
"showCondition": showCondition,
|
3155
3043
|
"showInputBefore": !this.selectedList.length,
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import type { PropType, Ref, SlotsType } from 'vue';
|
1
|
+
import { PropType, Ref, SlotsType } from 'vue';
|
2
|
+
import { GetMenuListFunc, ICommonItem, IMenuFooterItem, ISearchItem, MenuSlotParams, SearchInputMode, SearchItemType, SearchLogical, SelectedItem, ValidateValuesFunc, ValueBehavior } from './utils';
|
4
3
|
declare const _default: import("vue").DefineComponent<{
|
5
4
|
data: {
|
6
5
|
type: PropType<ISearchItem[]>;
|
@@ -19,10 +18,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
18
|
type: PropType<SearchInputMode>;
|
20
19
|
default: SearchInputMode;
|
21
20
|
};
|
22
|
-
maxHeight: {
|
23
|
-
type: NumberConstructor;
|
24
|
-
default: () => number;
|
25
|
-
};
|
26
21
|
getMenuList: PropType<GetMenuListFunc>;
|
27
22
|
validateValues: PropType<ValidateValuesFunc>;
|
28
23
|
valueBehavior: PropType<ValueBehavior>;
|
@@ -101,10 +96,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
101
96
|
type: PropType<SearchInputMode>;
|
102
97
|
default: SearchInputMode;
|
103
98
|
};
|
104
|
-
maxHeight: {
|
105
|
-
type: NumberConstructor;
|
106
|
-
default: () => number;
|
107
|
-
};
|
108
99
|
getMenuList: PropType<GetMenuListFunc>;
|
109
100
|
validateValues: PropType<ValidateValuesFunc>;
|
110
101
|
valueBehavior: PropType<ValueBehavior>;
|
@@ -114,7 +105,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
114
105
|
onAdd?: (...args: any[]) => any;
|
115
106
|
onSelectKey?: (...args: any[]) => any;
|
116
107
|
}, {
|
117
|
-
maxHeight: number;
|
118
108
|
mode: SearchInputMode;
|
119
109
|
conditions: ICommonItem[];
|
120
110
|
showInputBefore: boolean;
|
@@ -32,10 +32,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
32
32
|
type: PropType<SearchLogical>;
|
33
33
|
default: SearchLogical;
|
34
34
|
};
|
35
|
-
maxHeight: {
|
36
|
-
type: NumberConstructor;
|
37
|
-
default: () => number;
|
38
|
-
};
|
39
35
|
}, {
|
40
36
|
handleClick: (item: ICommonItem) => void;
|
41
37
|
handleClickCondition: (item: ICommonItem) => void;
|
@@ -54,9 +50,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
54
50
|
disabled: boolean;
|
55
51
|
})[]>;
|
56
52
|
resolveClassName: (cls: string) => string;
|
57
|
-
resolveContentStyles: import("vue").ComputedRef<{
|
58
|
-
maxHeight: string;
|
59
|
-
}>;
|
60
53
|
t: import("vue").ComputedRef<{
|
61
54
|
pleaseSelect: string;
|
62
55
|
loading: string;
|
@@ -99,17 +92,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
92
|
type: PropType<SearchLogical>;
|
100
93
|
default: SearchLogical;
|
101
94
|
};
|
102
|
-
maxHeight: {
|
103
|
-
type: NumberConstructor;
|
104
|
-
default: () => number;
|
105
|
-
};
|
106
95
|
}>> & {
|
107
96
|
onSelectItem?: (...args: any[]) => any;
|
108
97
|
onSelectCondition?: (...args: any[]) => any;
|
109
98
|
onFooterClick?: (...args: any[]) => any;
|
110
99
|
"onUpdate:logical"?: (...args: any[]) => any;
|
111
100
|
}, {
|
112
|
-
maxHeight: number;
|
113
101
|
multiple: boolean;
|
114
102
|
selected: string[];
|
115
103
|
logical: SearchLogical;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropType, ShallowRef
|
1
|
+
import { PropType, ShallowRef } from 'vue';
|
2
2
|
import { type SlotsType } from 'vue';
|
3
3
|
import { GetMenuListFunc, ICommonItem, ISearchItem, ISearchValue, MenuSlotParams, SearchItemType, SearchLogical, SelectedItem, ValidateValuesFunc, ValueBehavior } from './utils';
|
4
4
|
export declare const SearchSelectProps: {
|
@@ -87,10 +87,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
87
87
|
type: PropType<import("./utils").SearchInputMode>;
|
88
88
|
default: import("./utils").SearchInputMode;
|
89
89
|
};
|
90
|
-
maxHeight: {
|
91
|
-
type: NumberConstructor;
|
92
|
-
default: () => number;
|
93
|
-
};
|
94
90
|
getMenuList: PropType<GetMenuListFunc>;
|
95
91
|
validateValues: PropType<ValidateValuesFunc>;
|
96
92
|
valueBehavior: PropType<ValueBehavior>;
|
@@ -174,10 +170,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
174
170
|
type: PropType<import("./utils").SearchInputMode>;
|
175
171
|
default: import("./utils").SearchInputMode;
|
176
172
|
};
|
177
|
-
maxHeight: {
|
178
|
-
type: NumberConstructor;
|
179
|
-
default: () => number;
|
180
|
-
};
|
181
173
|
getMenuList: PropType<GetMenuListFunc>;
|
182
174
|
validateValues: PropType<ValidateValuesFunc>;
|
183
175
|
valueBehavior: PropType<ValueBehavior>;
|
@@ -187,7 +179,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
187
179
|
onAdd?: (...args: any[]) => any;
|
188
180
|
onSelectKey?: (...args: any[]) => any;
|
189
181
|
}, {
|
190
|
-
maxHeight: number;
|
191
182
|
mode: import("./utils").SearchInputMode;
|
192
183
|
conditions: ICommonItem[];
|
193
184
|
showInputBefore: boolean;
|
@@ -219,10 +210,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
219
210
|
type: PropType<import("./utils").SearchInputMode>;
|
220
211
|
default: import("./utils").SearchInputMode;
|
221
212
|
};
|
222
|
-
maxHeight: {
|
223
|
-
type: NumberConstructor;
|
224
|
-
default: () => number;
|
225
|
-
};
|
226
213
|
getMenuList: PropType<GetMenuListFunc>;
|
227
214
|
validateValues: PropType<ValidateValuesFunc>;
|
228
215
|
valueBehavior: PropType<ValueBehavior>;
|
@@ -289,7 +276,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
289
276
|
logical: string;
|
290
277
|
}>;
|
291
278
|
}, {}, {}, {}, {
|
292
|
-
maxHeight: number;
|
293
279
|
mode: import("./utils").SearchInputMode;
|
294
280
|
conditions: ICommonItem[];
|
295
281
|
showInputBefore: boolean;
|
@@ -469,8 +455,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
469
455
|
uniqueSelect: boolean;
|
470
456
|
}, SlotsType<{
|
471
457
|
menu: MenuSlotParams;
|
472
|
-
prepend:
|
473
|
-
append:
|
474
|
-
validate:
|
458
|
+
prepend: void;
|
459
|
+
append: void;
|
460
|
+
validate: void;
|
475
461
|
}>>;
|
476
462
|
export default _default;
|