bkui-vue 2.0.2-beta.2 → 2.0.2-beta.20
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/{style.css → cli.css} +1 -1
- package/dist/index.cjs.js +159 -133
- package/dist/index.esm.js +23728 -18774
- package/dist/index.umd.js +164 -138
- package/dist/style.variable.css +1 -1
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/index.d.ts +3 -0
- package/lib/cascader/index.js +97 -54
- package/lib/checkbox/index.js +1 -1
- package/lib/color-picker/index.js +20 -16
- package/lib/components.d.ts +1 -2
- package/lib/components.js +1 -2
- package/lib/date-picker/date-picker.css +220 -4
- package/lib/date-picker/date-picker.less +5 -5
- package/lib/date-picker/date-picker.variable.css +237 -21
- package/lib/date-picker/index.js +20 -16
- package/lib/directives/index.js +17 -13
- package/lib/form/form-item.d.ts +16 -0
- package/lib/form/index.d.ts +11 -0
- package/lib/form/index.js +26 -18
- package/lib/image/index.js +7 -10
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -2
- package/lib/input/index.d.ts +19 -0
- package/lib/input/index.js +18 -15
- package/lib/input/input.d.ts +15 -1
- package/lib/message/index.js +1 -1
- package/lib/modal/index.js +2 -1
- package/lib/pop-confirm/index.d.ts +600 -2
- package/lib/pop-confirm/index.js +20 -8
- package/lib/pop-confirm/pop-confirm.d.ts +297 -1
- package/lib/pop-confirm/props.d.ts +146 -0
- package/lib/popover/index.js +8 -10
- package/lib/search-select/index.js +7 -15
- package/lib/select/index.d.ts +19 -0
- package/lib/select/index.js +15 -16
- package/lib/select/select.d.ts +10 -0
- package/lib/slider/index.js +2 -1
- package/lib/tab/index.js +7 -10
- package/lib/table/index.js +7 -15
- package/lib/tag-input/index.js +7 -15
- package/lib/tree/index.d.ts +4 -0
- package/lib/tree/index.js +17396 -57
- package/lib/tree/props.d.ts +1 -0
- package/lib/tree/tree.css +46 -0
- package/lib/tree/tree.d.ts +2 -0
- package/lib/tree/tree.less +57 -2
- package/lib/tree/tree.variable.css +46 -0
- package/lib/tree/use-node-action.d.ts +2 -2
- package/package.json +1 -1
- package/lib/plugin-popover/index.d.ts +0 -27
- package/lib/plugin-popover/index.js +0 -65
- package/lib/plugins/index.d.ts +0 -1
- package/lib/plugins/index.js +0 -64
@@ -123,6 +123,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
123
123
|
overflowTagIndex: import("vue").Ref<number>;
|
124
124
|
isCollapse: import("vue").ComputedRef<boolean>;
|
125
125
|
isFocus: import("vue").Ref<boolean>;
|
126
|
+
isAlways: import("vue").Ref<boolean>;
|
126
127
|
store: import("vue").Ref<{
|
127
128
|
data: {
|
128
129
|
id: string;
|
package/lib/cascader/index.d.ts
CHANGED
@@ -126,6 +126,7 @@ declare const BkCascader: {
|
|
126
126
|
overflowTagIndex: import("vue").Ref<number>;
|
127
127
|
isCollapse: import("vue").ComputedRef<boolean>;
|
128
128
|
isFocus: import("vue").Ref<boolean>;
|
129
|
+
isAlways: import("vue").Ref<boolean>;
|
129
130
|
store: import("vue").Ref<{
|
130
131
|
data: {
|
131
132
|
id: string;
|
@@ -504,6 +505,7 @@ declare const BkCascader: {
|
|
504
505
|
overflowTagIndex: import("vue").Ref<number>;
|
505
506
|
isCollapse: import("vue").ComputedRef<boolean>;
|
506
507
|
isFocus: import("vue").Ref<boolean>;
|
508
|
+
isAlways: import("vue").Ref<boolean>;
|
507
509
|
store: import("vue").Ref<{
|
508
510
|
data: {
|
509
511
|
id: string;
|
@@ -760,6 +762,7 @@ declare const BkCascader: {
|
|
760
762
|
overflowTagIndex: import("vue").Ref<number>;
|
761
763
|
isCollapse: import("vue").ComputedRef<boolean>;
|
762
764
|
isFocus: import("vue").Ref<boolean>;
|
765
|
+
isAlways: import("vue").Ref<boolean>;
|
763
766
|
store: import("vue").Ref<{
|
764
767
|
data: {
|
765
768
|
id: string;
|
package/lib/cascader/index.js
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
import "../styles/reset.css";
|
2
2
|
import "./cascader.less";
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__ from "../plugin-popover";
|
4
3
|
import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
|
5
4
|
import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
|
6
5
|
import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
11
11
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
12
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
13
12
|
import "../popover/popover.less";
|
14
13
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_select_1a0d1ad7__ from "../select";
|
15
14
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_d74826be__ from "../tag";
|
@@ -19,7 +18,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../
|
|
19
18
|
import "../checkbox/checkbox.less";
|
20
19
|
/******/ var __webpack_modules__ = ({
|
21
20
|
|
22
|
-
/***/
|
21
|
+
/***/ 668:
|
23
22
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
24
23
|
|
25
24
|
|
@@ -158,10 +157,8 @@ ClickOutside.install = function (app) {
|
|
158
157
|
/* harmony default export */ const clickoutside = ((/* unused pure expression or super */ null && (ClickOutside)));
|
159
158
|
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
160
159
|
var esm_typeof = __webpack_require__(6522);
|
161
|
-
|
162
|
-
var
|
163
|
-
var y = x => () => x
|
164
|
-
const plugin_popover_namespaceObject = x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"] });
|
160
|
+
// EXTERNAL MODULE: external "../popover"
|
161
|
+
var popover_ = __webpack_require__(563);
|
165
162
|
;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
|
166
163
|
|
167
164
|
/*
|
@@ -239,7 +236,7 @@ var createInstance = function createInstance(el, binding) {
|
|
239
236
|
onContentMouseenter: handleContentEnter,
|
240
237
|
onContentMouseleave: handleContentLeave
|
241
238
|
});
|
242
|
-
instance = (0,
|
239
|
+
instance = (0,popover_.$bkPopover)(targetOptions);
|
243
240
|
}, 300);
|
244
241
|
};
|
245
242
|
var handleMouseLeave = function handleMouseLeave() {
|
@@ -326,9 +323,9 @@ var external_vue_ = __webpack_require__(6609);
|
|
326
323
|
// EXTERNAL MODULE: external "../shared"
|
327
324
|
var shared_ = __webpack_require__(9253);
|
328
325
|
;// CONCATENATED MODULE: external "@popperjs/core"
|
329
|
-
var
|
330
|
-
var
|
331
|
-
const core_namespaceObject =
|
326
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
327
|
+
var y = x => () => x
|
328
|
+
const core_namespaceObject = x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
|
332
329
|
;// CONCATENATED MODULE: ../../packages/directives/src/tooltips.ts
|
333
330
|
|
334
331
|
|
@@ -394,9 +391,6 @@ var tooltips = {
|
|
394
391
|
hide(el);
|
395
392
|
}, 100);
|
396
393
|
});
|
397
|
-
el.addEventListener('click', function () {
|
398
|
-
hide(el);
|
399
|
-
});
|
400
394
|
popper.addEventListener('mouseleave', function () {
|
401
395
|
clearTimeout(delayTimeout);
|
402
396
|
hideTimeout = setTimeout(function () {
|
@@ -410,7 +404,7 @@ var tooltips = {
|
|
410
404
|
show(el);
|
411
405
|
clearTimeout(delayTimeout);
|
412
406
|
}, opts.delay);
|
413
|
-
} else if (popper.hasAttribute('data-show')) {
|
407
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
414
408
|
hide(el);
|
415
409
|
}
|
416
410
|
});
|
@@ -1268,6 +1262,15 @@ normalizeWheel.getEventType = function() /*string*/ {
|
|
1268
1262
|
module.exports = normalizeWheel;
|
1269
1263
|
|
1270
1264
|
|
1265
|
+
/***/ }),
|
1266
|
+
|
1267
|
+
/***/ 563:
|
1268
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1269
|
+
|
1270
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1271
|
+
var y = x => () => x
|
1272
|
+
module.exports = x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
|
1273
|
+
|
1271
1274
|
/***/ }),
|
1272
1275
|
|
1273
1276
|
/***/ 9253:
|
@@ -1540,16 +1543,14 @@ const external_vue_types_namespaceObject = x({ ["array"]: () => __WEBPACK_EXTERN
|
|
1540
1543
|
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1541
1544
|
var config_provider_y = x => () => x
|
1542
1545
|
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
1543
|
-
// EXTERNAL MODULE: ../../packages/directives/src/index.ts +
|
1544
|
-
var src = __webpack_require__(
|
1546
|
+
// EXTERNAL MODULE: ../../packages/directives/src/index.ts + 7 modules
|
1547
|
+
var src = __webpack_require__(668);
|
1545
1548
|
;// CONCATENATED MODULE: external "../icon"
|
1546
1549
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1547
1550
|
var icon_y = x => () => x
|
1548
1551
|
const icon_namespaceObject = icon_x({ ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleRight, ["AngleUp"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleUp, ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error, ["Spinner"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Spinner });
|
1549
|
-
|
1550
|
-
var
|
1551
|
-
var popover_y = x => () => x
|
1552
|
-
const popover_namespaceObject = popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
|
1552
|
+
// EXTERNAL MODULE: external "../popover"
|
1553
|
+
var popover_ = __webpack_require__(563);
|
1553
1554
|
;// CONCATENATED MODULE: external "../popover/popover.less"
|
1554
1555
|
var popover_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1555
1556
|
var popover_less_y = x => () => x
|
@@ -1637,7 +1638,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1637
1638
|
var t = (0,config_provider_namespaceObject.useLocale)('cascader');
|
1638
1639
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1639
1640
|
resolveClassName = _usePrefix.resolveClassName;
|
1640
|
-
var
|
1641
|
+
var _toRefs = (0,external_vue_.toRefs)(props),
|
1642
|
+
store = _toRefs.store;
|
1641
1643
|
var menus = (0,external_vue_.reactive)({
|
1642
1644
|
list: [props.store.getNodes()]
|
1643
1645
|
});
|
@@ -1661,7 +1663,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1661
1663
|
* @param value - 选中的值数组
|
1662
1664
|
*/
|
1663
1665
|
var updateCheckValue = function updateCheckValue(value) {
|
1664
|
-
if (value.length === 0) {
|
1666
|
+
if (!value || value.length === 0) {
|
1665
1667
|
menus.list = menus.list.slice(0, 1);
|
1666
1668
|
activePath.value = [];
|
1667
1669
|
}
|
@@ -1673,31 +1675,63 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1673
1675
|
* @param value - 节点ID数组
|
1674
1676
|
*/
|
1675
1677
|
var expandByNodeList = function expandByNodeList(value) {
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1678
|
+
// 判断是否为初始加载
|
1679
|
+
var isInitialLoad = checkValue.value.length === 0;
|
1680
|
+
// 如果是初始加载或单选情况,按原来的逻辑处理
|
1681
|
+
if (isInitialLoad || !store.value.config.multiple) {
|
1682
|
+
var targetList = [];
|
1683
|
+
// 处理多选情况
|
1684
|
+
if (store.value.config.multiple) {
|
1685
|
+
var _iterator = _createForOfIteratorHelper(value),
|
1686
|
+
_step;
|
1687
|
+
try {
|
1688
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
1689
|
+
var subArray = _step.value;
|
1690
|
+
if (subArray.length > targetList.length) {
|
1691
|
+
targetList = subArray;
|
1692
|
+
}
|
1686
1693
|
}
|
1694
|
+
} catch (err) {
|
1695
|
+
_iterator.e(err);
|
1696
|
+
} finally {
|
1697
|
+
_iterator.f();
|
1687
1698
|
}
|
1688
|
-
}
|
1689
|
-
|
1690
|
-
|
1691
|
-
_iterator.f();
|
1699
|
+
} else {
|
1700
|
+
// 单选情况
|
1701
|
+
targetList = value;
|
1692
1702
|
}
|
1693
|
-
|
1694
|
-
targetList
|
1703
|
+
// 执行展开操作
|
1704
|
+
targetList.forEach(function (id) {
|
1705
|
+
var node = store.value.getNodeById(id);
|
1706
|
+
if (node) {
|
1707
|
+
// 只展开,不需要重复触发
|
1708
|
+
var expandNode = function expandNode(node) {
|
1709
|
+
var _node$children;
|
1710
|
+
if (!node || node !== null && node !== void 0 && node.isDisabled) return;
|
1711
|
+
var level = node.level;
|
1712
|
+
// 确保面板只更新到当前节点层级
|
1713
|
+
menus.list = menus.list.slice(0, level);
|
1714
|
+
activePath.value = activePath.value.slice(0, level - 1);
|
1715
|
+
// 如果节点有子节点,直接添加到面板
|
1716
|
+
if ((_node$children = node.children) !== null && _node$children !== void 0 && _node$children.length) {
|
1717
|
+
if (menus.list.length === level) {
|
1718
|
+
menus.list.push(node.children);
|
1719
|
+
activePath.value.push(node);
|
1720
|
+
}
|
1721
|
+
}
|
1722
|
+
};
|
1723
|
+
// 展开节点的所有父节点
|
1724
|
+
var expandParents = function expandParents(node) {
|
1725
|
+
if (node.parent) {
|
1726
|
+
expandParents(node.parent);
|
1727
|
+
}
|
1728
|
+
expandNode(node);
|
1729
|
+
};
|
1730
|
+
expandParents(node);
|
1731
|
+
}
|
1732
|
+
});
|
1695
1733
|
}
|
1696
|
-
//
|
1697
|
-
targetList.forEach(function (id) {
|
1698
|
-
var node = store.getNodeById(id);
|
1699
|
-
nodeExpandHandler(node);
|
1700
|
-
});
|
1734
|
+
// 用户交互过程中的选择由nodeExpandHandler单独处理,这里不干预
|
1701
1735
|
};
|
1702
1736
|
/** 节点选中回调
|
1703
1737
|
* 根据单选、多选配置checkValue
|
@@ -1709,7 +1743,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1709
1743
|
}
|
1710
1744
|
if (node.config.multiple) {
|
1711
1745
|
// 如果checkAnyLevel,返回所有check的节点; 否则只check 叶子节点
|
1712
|
-
var targets = store.config.checkAnyLevel ? store.getCheckedNodes() : store.getCheckedLeafNodes();
|
1746
|
+
var targets = store.value.config.checkAnyLevel ? store.value.getCheckedNodes() : store.value.getCheckedLeafNodes();
|
1713
1747
|
checkValue.value = targets.map(function (node) {
|
1714
1748
|
return node.path;
|
1715
1749
|
}); // 如果任意级别可选,当前节点即为所选内容
|
@@ -1720,27 +1754,27 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1720
1754
|
};
|
1721
1755
|
/** node点击展开回调 */
|
1722
1756
|
var nodeExpandHandler = function nodeExpandHandler(node) {
|
1723
|
-
var _node$
|
1757
|
+
var _node$children2;
|
1724
1758
|
if (!node || node !== null && node !== void 0 && node.isDisabled) return;
|
1725
1759
|
menus.list = menus.list.slice(0, node.level);
|
1726
1760
|
activePath.value = activePath.value.slice(0, node.level - 1);
|
1727
1761
|
/** 如果所点击的node具有children元素,则直接展开
|
1728
1762
|
* 否则判断是否开启了远程加载,进行远程加载列表
|
1729
1763
|
*/
|
1730
|
-
if ((_node$
|
1764
|
+
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length) {
|
1731
1765
|
menus.list.push(node.children);
|
1732
1766
|
activePath.value.push(node);
|
1733
1767
|
return;
|
1734
1768
|
}
|
1735
|
-
if (store.config.isRemote && !node.isLeaf) {
|
1769
|
+
if (store.value.config.isRemote && !node.isLeaf) {
|
1736
1770
|
node.loading = true;
|
1737
1771
|
var updateNodes = function updateNodes(nodeData) {
|
1738
|
-
store.appendNodes(nodeData, node || null);
|
1772
|
+
store.value.appendNodes(nodeData, node || null);
|
1739
1773
|
menus.list.push(node.children);
|
1740
1774
|
activePath.value.push(node);
|
1741
1775
|
node.loading = false;
|
1742
1776
|
};
|
1743
|
-
store.config.remoteMethod(node, updateNodes);
|
1777
|
+
store.value.config.remoteMethod(node, updateNodes);
|
1744
1778
|
}
|
1745
1779
|
};
|
1746
1780
|
/**
|
@@ -2421,6 +2455,8 @@ var Store = /*#__PURE__*/function () {
|
|
2421
2455
|
setHover = _useHover.setHover,
|
2422
2456
|
cancelHover = _useHover.cancelHover;
|
2423
2457
|
var store = (0,external_vue_.ref)(new src_store(props));
|
2458
|
+
// 用于处理在 removeTag 时, popOver panel 触发 clickOutside 消失的问题
|
2459
|
+
var isAlways = (0,external_vue_.ref)(false);
|
2424
2460
|
// 定义selectedText变量用于记录当前选择的值的文本
|
2425
2461
|
var selectedText = (0,external_vue_.ref)('');
|
2426
2462
|
// 定义selectedTags变量用于记录多选模式下已选的tag
|
@@ -2457,7 +2493,8 @@ var Store = /*#__PURE__*/function () {
|
|
2457
2493
|
var inputRef = (0,external_vue_.ref)(null);
|
2458
2494
|
// 用computed定义placeholder变量,用于处理props中的placeholder属性
|
2459
2495
|
var placeholder = (0,external_vue_.computed)(function () {
|
2460
|
-
|
2496
|
+
var placeholder = props.placeholder ? props.placeholder : t.value.pleaseSelect;
|
2497
|
+
return modelValue.value.length === 0 ? placeholder : '';
|
2461
2498
|
});
|
2462
2499
|
var displayText = (0,external_vue_.computed)(function () {
|
2463
2500
|
if (props.customTextFillback) {
|
@@ -2522,6 +2559,7 @@ var Store = /*#__PURE__*/function () {
|
|
2522
2559
|
};
|
2523
2560
|
// 移除tag
|
2524
2561
|
var removeTag = function removeTag(value, index, e) {
|
2562
|
+
isAlways.value = true;
|
2525
2563
|
e.stopPropagation();
|
2526
2564
|
var current = JSON.parse(JSON.stringify(value));
|
2527
2565
|
var tag = current.splice(index, 1)[0];
|
@@ -2534,6 +2572,7 @@ var Store = /*#__PURE__*/function () {
|
|
2534
2572
|
// 计算过后,关闭编辑状态
|
2535
2573
|
setTimeout(function () {
|
2536
2574
|
isEdit.value = isFocus.value;
|
2575
|
+
isAlways.value = false;
|
2537
2576
|
});
|
2538
2577
|
};
|
2539
2578
|
// modelValue的监听函数
|
@@ -2647,6 +2686,7 @@ var Store = /*#__PURE__*/function () {
|
|
2647
2686
|
overflowTagIndex: overflowTagIndex,
|
2648
2687
|
isCollapse: isCollapse,
|
2649
2688
|
isFocus: isFocus,
|
2689
|
+
isAlways: isAlways,
|
2650
2690
|
store: store,
|
2651
2691
|
updateValue: updateValue,
|
2652
2692
|
selectedText: selectedText,
|
@@ -2677,7 +2717,8 @@ var Store = /*#__PURE__*/function () {
|
|
2677
2717
|
var _this = this;
|
2678
2718
|
// 定义suffixIcon函数,用于根据不同情况渲染后缀图标
|
2679
2719
|
var suffixIcon = function suffixIcon() {
|
2680
|
-
|
2720
|
+
var _this$modelValue;
|
2721
|
+
if (_this.clearable && _this.isHover && !_this.disabled && ((_this$modelValue = _this.modelValue) === null || _this$modelValue === void 0 ? void 0 : _this$modelValue.length) > 0) {
|
2681
2722
|
// 当可清空、鼠标悬浮且未禁用时,渲染清空图标
|
2682
2723
|
return (0,external_vue_.createVNode)(icon_namespaceObject.Close, {
|
2683
2724
|
"class": _this.resolveClassName('icon-clear-icon'),
|
@@ -2742,12 +2783,14 @@ var Store = /*#__PURE__*/function () {
|
|
2742
2783
|
};
|
2743
2784
|
// 定义popoverRender函数,用于渲染弹出框
|
2744
2785
|
var popoverRender = function popoverRender() {
|
2745
|
-
return (0,external_vue_.createVNode)(
|
2786
|
+
return (0,external_vue_.createVNode)(popover_["default"], {
|
2746
2787
|
"ref": "popover",
|
2747
2788
|
"class": _this.resolveClassName('cascader-popover-wrapper'),
|
2789
|
+
"always": _this.isAlways,
|
2748
2790
|
"arrow": false,
|
2749
2791
|
"boundary": "body",
|
2750
2792
|
"disabled": _this.disabled,
|
2793
|
+
"hideIgnoreReference": true,
|
2751
2794
|
"offset": 4,
|
2752
2795
|
"placement": "bottom-start",
|
2753
2796
|
"referenceCls": _this.resolveClassName('cascader-popover-reference'),
|
@@ -2806,7 +2849,7 @@ var Store = /*#__PURE__*/function () {
|
|
2806
2849
|
}, [this.$slots.trigger ? popoverRender() : (0,external_vue_.createVNode)("div", {
|
2807
2850
|
"ref": "bkCascaderRef",
|
2808
2851
|
"class": [this.resolveClassName('cascader'), this.extCls, {
|
2809
|
-
'is-unselected': this.modelValue.length === 0,
|
2852
|
+
'is-unselected': !this.modelValue || this.modelValue.length === 0,
|
2810
2853
|
'is-hover': this.isHover,
|
2811
2854
|
'is-filterable': this.filterable,
|
2812
2855
|
'is-focus': this.isFocus,
|
package/lib/checkbox/index.js
CHANGED
@@ -232,7 +232,7 @@ var useCheckbox = function useCheckbox() {
|
|
232
232
|
}
|
233
233
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
234
234
|
// 选中状态保持同步
|
235
|
-
if (inputRef.value.checked !== isChecked.value) {
|
235
|
+
if (inputRef.value && inputRef.value.checked !== isChecked.value) {
|
236
236
|
inputRef.value.checked = isChecked.value;
|
237
237
|
}
|
238
238
|
});
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import "../styles/reset.css";
|
2
2
|
import "./color-picker.less";
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__ from "../plugin-popover";
|
4
3
|
import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
|
5
4
|
import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
|
6
5
|
import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
@@ -12,7 +12,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_date_picker_d04526d6__ from "
|
|
12
12
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
13
13
|
/******/ var __webpack_modules__ = ({
|
14
14
|
|
15
|
-
/***/
|
15
|
+
/***/ 668:
|
16
16
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
17
17
|
|
18
18
|
|
@@ -151,10 +151,8 @@ ClickOutside.install = function (app) {
|
|
151
151
|
/* harmony default export */ const clickoutside = (ClickOutside);
|
152
152
|
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
153
153
|
var esm_typeof = __webpack_require__(6522);
|
154
|
-
|
155
|
-
var
|
156
|
-
var y = x => () => x
|
157
|
-
const plugin_popover_namespaceObject = x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"] });
|
154
|
+
// EXTERNAL MODULE: external "../popover"
|
155
|
+
var popover_ = __webpack_require__(563);
|
158
156
|
;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
|
159
157
|
|
160
158
|
/*
|
@@ -232,7 +230,7 @@ var createInstance = function createInstance(el, binding) {
|
|
232
230
|
onContentMouseenter: handleContentEnter,
|
233
231
|
onContentMouseleave: handleContentLeave
|
234
232
|
});
|
235
|
-
instance = (0,
|
233
|
+
instance = (0,popover_.$bkPopover)(targetOptions);
|
236
234
|
}, 300);
|
237
235
|
};
|
238
236
|
var handleMouseLeave = function handleMouseLeave() {
|
@@ -319,9 +317,9 @@ var external_vue_ = __webpack_require__(6609);
|
|
319
317
|
// EXTERNAL MODULE: external "../shared"
|
320
318
|
var shared_ = __webpack_require__(9253);
|
321
319
|
;// CONCATENATED MODULE: external "@popperjs/core"
|
322
|
-
var
|
323
|
-
var
|
324
|
-
const core_namespaceObject =
|
320
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
321
|
+
var y = x => () => x
|
322
|
+
const core_namespaceObject = x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
|
325
323
|
;// CONCATENATED MODULE: ../../packages/directives/src/tooltips.ts
|
326
324
|
|
327
325
|
|
@@ -387,9 +385,6 @@ var tooltips = {
|
|
387
385
|
hide(el);
|
388
386
|
}, 100);
|
389
387
|
});
|
390
|
-
el.addEventListener('click', function () {
|
391
|
-
hide(el);
|
392
|
-
});
|
393
388
|
popper.addEventListener('mouseleave', function () {
|
394
389
|
clearTimeout(delayTimeout);
|
395
390
|
hideTimeout = setTimeout(function () {
|
@@ -403,7 +398,7 @@ var tooltips = {
|
|
403
398
|
show(el);
|
404
399
|
clearTimeout(delayTimeout);
|
405
400
|
}, opts.delay);
|
406
|
-
} else if (popper.hasAttribute('data-show')) {
|
401
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
407
402
|
hide(el);
|
408
403
|
}
|
409
404
|
});
|
@@ -1261,6 +1256,15 @@ normalizeWheel.getEventType = function() /*string*/ {
|
|
1261
1256
|
module.exports = normalizeWheel;
|
1262
1257
|
|
1263
1258
|
|
1259
|
+
/***/ }),
|
1260
|
+
|
1261
|
+
/***/ 563:
|
1262
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1263
|
+
|
1264
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1265
|
+
var y = x => () => x
|
1266
|
+
module.exports = x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover });
|
1267
|
+
|
1264
1268
|
/***/ }),
|
1265
1269
|
|
1266
1270
|
/***/ 9253:
|
@@ -1537,8 +1541,8 @@ const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () =>
|
|
1537
1541
|
var date_picker_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1538
1542
|
var date_picker_y = x => () => x
|
1539
1543
|
const date_picker_namespaceObject = date_picker_x({ ["PickerDropdown"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_date_picker_d04526d6__.PickerDropdown });
|
1540
|
-
// EXTERNAL MODULE: ../../packages/directives/src/index.ts +
|
1541
|
-
var src = __webpack_require__(
|
1544
|
+
// EXTERNAL MODULE: ../../packages/directives/src/index.ts + 7 modules
|
1545
|
+
var src = __webpack_require__(668);
|
1542
1546
|
;// CONCATENATED MODULE: external "../icon"
|
1543
1547
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1544
1548
|
var icon_y = x => () => x
|
package/lib/components.d.ts
CHANGED
@@ -32,9 +32,8 @@ export { default as Navigation } from './navigation';
|
|
32
32
|
export { default as Notify } from './notify';
|
33
33
|
export { default as OverflowTitle } from './overflow-title';
|
34
34
|
export { default as Pagination } from './pagination';
|
35
|
-
export { default as $bkPopover } from './plugin-popover';
|
36
35
|
export { default as PopConfirm } from './pop-confirm';
|
37
|
-
export { default as Popover } from './popover';
|
36
|
+
export { default as Popover, $bkPopover } from './popover';
|
38
37
|
export { default as Popover2 } from './popover2';
|
39
38
|
export { default as Process } from './process';
|
40
39
|
export { default as Progress } from './progress';
|
package/lib/components.js
CHANGED
@@ -56,9 +56,8 @@ export { default as Navigation } from './navigation';
|
|
56
56
|
export { default as Notify } from './notify';
|
57
57
|
export { default as OverflowTitle } from './overflow-title';
|
58
58
|
export { default as Pagination } from './pagination';
|
59
|
-
export { default as $bkPopover } from './plugin-popover';
|
60
59
|
export { default as PopConfirm } from './pop-confirm';
|
61
|
-
export { default as Popover } from './popover';
|
60
|
+
export { default as Popover, $bkPopover } from './popover';
|
62
61
|
export { default as Popover2 } from './popover2';
|
63
62
|
export { default as Process } from './process';
|
64
63
|
export { default as Progress } from './progress';
|