bkui-vue 2.0.2-beta.11 → 2.0.2-beta.13
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/cli.css +1 -0
- package/dist/index.cjs.js +159 -133
- package/dist/index.esm.js +23773 -18863
- package/dist/index.umd.js +164 -138
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +10 -12
- package/lib/checkbox/index.js +1 -1
- package/lib/color-picker/index.js +1 -4
- package/lib/date-picker/index.js +1 -4
- package/lib/directives/index.js +1 -4
- package/lib/form/index.js +1 -4
- package/lib/image/index.js +1 -4
- package/lib/index.js +1 -1
- package/lib/input/index.d.ts +19 -0
- package/lib/input/index.js +12 -9
- package/lib/input/input.d.ts +15 -1
- package/lib/message/index.js +1 -1
- package/lib/pop-confirm/index.d.ts +584 -0
- package/lib/pop-confirm/index.js +7 -3
- package/lib/pop-confirm/pop-confirm.d.ts +292 -0
- package/lib/pop-confirm/props.d.ts +146 -0
- package/lib/popover/index.js +1 -4
- package/lib/search-select/index.js +1 -4
- package/lib/select/index.d.ts +19 -0
- package/lib/select/index.js +9 -5
- package/lib/select/select.d.ts +10 -0
- package/lib/tab/index.js +1 -4
- package/lib/table/index.js +1 -4
- package/lib/tag-input/index.js +1 -4
- package/lib/tree/index.js +17335 -15
- package/lib/tree/tree.css +28 -0
- package/lib/tree/tree.less +33 -2
- package/lib/tree/tree.variable.css +28 -0
- package/package.json +1 -1
- package/dist/style.css +0 -1
package/lib/cascader/index.js
CHANGED
@@ -391,9 +391,6 @@ var tooltips = {
|
|
391
391
|
hide(el);
|
392
392
|
}, 100);
|
393
393
|
});
|
394
|
-
el.addEventListener('click', function () {
|
395
|
-
hide(el);
|
396
|
-
});
|
397
394
|
popper.addEventListener('mouseleave', function () {
|
398
395
|
clearTimeout(delayTimeout);
|
399
396
|
hideTimeout = setTimeout(function () {
|
@@ -407,7 +404,7 @@ var tooltips = {
|
|
407
404
|
show(el);
|
408
405
|
clearTimeout(delayTimeout);
|
409
406
|
}, opts.delay);
|
410
|
-
} else if (popper.hasAttribute('data-show')) {
|
407
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
411
408
|
hide(el);
|
412
409
|
}
|
413
410
|
});
|
@@ -1641,7 +1638,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1641
1638
|
var t = (0,config_provider_namespaceObject.useLocale)('cascader');
|
1642
1639
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1643
1640
|
resolveClassName = _usePrefix.resolveClassName;
|
1644
|
-
var
|
1641
|
+
var _toRefs = (0,external_vue_.toRefs)(props),
|
1642
|
+
store = _toRefs.store;
|
1645
1643
|
var menus = (0,external_vue_.reactive)({
|
1646
1644
|
list: [props.store.getNodes()]
|
1647
1645
|
});
|
@@ -1680,10 +1678,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1680
1678
|
// 判断是否为初始加载
|
1681
1679
|
var isInitialLoad = checkValue.value.length === 0;
|
1682
1680
|
// 如果是初始加载或单选情况,按原来的逻辑处理
|
1683
|
-
if (isInitialLoad || !store.config.multiple) {
|
1681
|
+
if (isInitialLoad || !store.value.config.multiple) {
|
1684
1682
|
var targetList = [];
|
1685
1683
|
// 处理多选情况
|
1686
|
-
if (store.config.multiple) {
|
1684
|
+
if (store.value.config.multiple) {
|
1687
1685
|
var _iterator = _createForOfIteratorHelper(value),
|
1688
1686
|
_step;
|
1689
1687
|
try {
|
@@ -1704,7 +1702,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1704
1702
|
}
|
1705
1703
|
// 执行展开操作
|
1706
1704
|
targetList.forEach(function (id) {
|
1707
|
-
var node = store.getNodeById(id);
|
1705
|
+
var node = store.value.getNodeById(id);
|
1708
1706
|
if (node) {
|
1709
1707
|
// 只展开,不需要重复触发
|
1710
1708
|
var expandNode = function expandNode(node) {
|
@@ -1745,7 +1743,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1745
1743
|
}
|
1746
1744
|
if (node.config.multiple) {
|
1747
1745
|
// 如果checkAnyLevel,返回所有check的节点; 否则只check 叶子节点
|
1748
|
-
var targets = store.config.checkAnyLevel ? store.getCheckedNodes() : store.getCheckedLeafNodes();
|
1746
|
+
var targets = store.value.config.checkAnyLevel ? store.value.getCheckedNodes() : store.value.getCheckedLeafNodes();
|
1749
1747
|
checkValue.value = targets.map(function (node) {
|
1750
1748
|
return node.path;
|
1751
1749
|
}); // 如果任意级别可选,当前节点即为所选内容
|
@@ -1768,15 +1766,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1768
1766
|
activePath.value.push(node);
|
1769
1767
|
return;
|
1770
1768
|
}
|
1771
|
-
if (store.config.isRemote && !node.isLeaf) {
|
1769
|
+
if (store.value.config.isRemote && !node.isLeaf) {
|
1772
1770
|
node.loading = true;
|
1773
1771
|
var updateNodes = function updateNodes(nodeData) {
|
1774
|
-
store.appendNodes(nodeData, node || null);
|
1772
|
+
store.value.appendNodes(nodeData, node || null);
|
1775
1773
|
menus.list.push(node.children);
|
1776
1774
|
activePath.value.push(node);
|
1777
1775
|
node.loading = false;
|
1778
1776
|
};
|
1779
|
-
store.config.remoteMethod(node, updateNodes);
|
1777
|
+
store.value.config.remoteMethod(node, updateNodes);
|
1780
1778
|
}
|
1781
1779
|
};
|
1782
1780
|
/**
|
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
|
});
|
@@ -385,9 +385,6 @@ var tooltips = {
|
|
385
385
|
hide(el);
|
386
386
|
}, 100);
|
387
387
|
});
|
388
|
-
el.addEventListener('click', function () {
|
389
|
-
hide(el);
|
390
|
-
});
|
391
388
|
popper.addEventListener('mouseleave', function () {
|
392
389
|
clearTimeout(delayTimeout);
|
393
390
|
hideTimeout = setTimeout(function () {
|
@@ -401,7 +398,7 @@ var tooltips = {
|
|
401
398
|
show(el);
|
402
399
|
clearTimeout(delayTimeout);
|
403
400
|
}, opts.delay);
|
404
|
-
} else if (popper.hasAttribute('data-show')) {
|
401
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
405
402
|
hide(el);
|
406
403
|
}
|
407
404
|
});
|
package/lib/date-picker/index.js
CHANGED
@@ -388,9 +388,6 @@ var tooltips = {
|
|
388
388
|
hide(el);
|
389
389
|
}, 100);
|
390
390
|
});
|
391
|
-
el.addEventListener('click', function () {
|
392
|
-
hide(el);
|
393
|
-
});
|
394
391
|
popper.addEventListener('mouseleave', function () {
|
395
392
|
clearTimeout(delayTimeout);
|
396
393
|
hideTimeout = setTimeout(function () {
|
@@ -404,7 +401,7 @@ var tooltips = {
|
|
404
401
|
show(el);
|
405
402
|
clearTimeout(delayTimeout);
|
406
403
|
}, opts.delay);
|
407
|
-
} else if (popper.hasAttribute('data-show')) {
|
404
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
408
405
|
hide(el);
|
409
406
|
}
|
410
407
|
});
|
package/lib/directives/index.js
CHANGED
@@ -1245,9 +1245,6 @@ var tooltips = {
|
|
1245
1245
|
hide(el);
|
1246
1246
|
}, 100);
|
1247
1247
|
});
|
1248
|
-
el.addEventListener('click', function () {
|
1249
|
-
hide(el);
|
1250
|
-
});
|
1251
1248
|
popper.addEventListener('mouseleave', function () {
|
1252
1249
|
clearTimeout(delayTimeout);
|
1253
1250
|
hideTimeout = setTimeout(function () {
|
@@ -1261,7 +1258,7 @@ var tooltips = {
|
|
1261
1258
|
show(el);
|
1262
1259
|
clearTimeout(delayTimeout);
|
1263
1260
|
}, opts.delay);
|
1264
|
-
} else if (popper.hasAttribute('data-show')) {
|
1261
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
1265
1262
|
hide(el);
|
1266
1263
|
}
|
1267
1264
|
});
|
package/lib/form/index.js
CHANGED
@@ -389,9 +389,6 @@ var tooltips = {
|
|
389
389
|
hide(el);
|
390
390
|
}, 100);
|
391
391
|
});
|
392
|
-
el.addEventListener('click', function () {
|
393
|
-
hide(el);
|
394
|
-
});
|
395
392
|
popper.addEventListener('mouseleave', function () {
|
396
393
|
clearTimeout(delayTimeout);
|
397
394
|
hideTimeout = setTimeout(function () {
|
@@ -405,7 +402,7 @@ var tooltips = {
|
|
405
402
|
show(el);
|
406
403
|
clearTimeout(delayTimeout);
|
407
404
|
}, opts.delay);
|
408
|
-
} else if (popper.hasAttribute('data-show')) {
|
405
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
409
406
|
hide(el);
|
410
407
|
}
|
411
408
|
});
|
package/lib/image/index.js
CHANGED
@@ -1136,9 +1136,6 @@ var tooltips = {
|
|
1136
1136
|
hide(el);
|
1137
1137
|
}, 100);
|
1138
1138
|
});
|
1139
|
-
el.addEventListener('click', function () {
|
1140
|
-
hide(el);
|
1141
|
-
});
|
1142
1139
|
popper.addEventListener('mouseleave', function () {
|
1143
1140
|
clearTimeout(delayTimeout);
|
1144
1141
|
hideTimeout = setTimeout(function () {
|
@@ -1152,7 +1149,7 @@ var tooltips = {
|
|
1152
1149
|
show(el);
|
1153
1150
|
clearTimeout(delayTimeout);
|
1154
1151
|
}, opts.delay);
|
1155
|
-
} else if (popper.hasAttribute('data-show')) {
|
1152
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
1156
1153
|
hide(el);
|
1157
1154
|
}
|
1158
1155
|
});
|
package/lib/index.js
CHANGED
package/lib/input/index.d.ts
CHANGED
@@ -94,6 +94,10 @@ declare const BkInput: {
|
|
94
94
|
} & {
|
95
95
|
default: boolean;
|
96
96
|
};
|
97
|
+
tooltipsOptions: {
|
98
|
+
type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
|
99
|
+
default: () => {};
|
100
|
+
};
|
97
101
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
98
102
|
default: boolean;
|
99
103
|
} & {
|
@@ -232,6 +236,10 @@ declare const BkInput: {
|
|
232
236
|
} & {
|
233
237
|
default: boolean;
|
234
238
|
};
|
239
|
+
tooltipsOptions: {
|
240
|
+
type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
|
241
|
+
default: () => {};
|
242
|
+
};
|
235
243
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
236
244
|
default: boolean;
|
237
245
|
} & {
|
@@ -286,6 +294,7 @@ declare const BkInput: {
|
|
286
294
|
withValidate: boolean;
|
287
295
|
overMaxLengthLimit: boolean;
|
288
296
|
showOverflowTooltips: boolean;
|
297
|
+
tooltipsOptions: {};
|
289
298
|
autosize: boolean | import("./input").InputAutoSize;
|
290
299
|
stopPropagation: boolean;
|
291
300
|
}, true, {}, {}, {
|
@@ -390,6 +399,10 @@ declare const BkInput: {
|
|
390
399
|
} & {
|
391
400
|
default: boolean;
|
392
401
|
};
|
402
|
+
tooltipsOptions: {
|
403
|
+
type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
|
404
|
+
default: () => {};
|
405
|
+
};
|
393
406
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
394
407
|
default: boolean;
|
395
408
|
} & {
|
@@ -444,6 +457,7 @@ declare const BkInput: {
|
|
444
457
|
withValidate: boolean;
|
445
458
|
overMaxLengthLimit: boolean;
|
446
459
|
showOverflowTooltips: boolean;
|
460
|
+
tooltipsOptions: {};
|
447
461
|
autosize: boolean | import("./input").InputAutoSize;
|
448
462
|
stopPropagation: boolean;
|
449
463
|
}>;
|
@@ -545,6 +559,10 @@ declare const BkInput: {
|
|
545
559
|
} & {
|
546
560
|
default: boolean;
|
547
561
|
};
|
562
|
+
tooltipsOptions: {
|
563
|
+
type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
|
564
|
+
default: () => {};
|
565
|
+
};
|
548
566
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
549
567
|
default: boolean;
|
550
568
|
} & {
|
@@ -614,6 +632,7 @@ declare const BkInput: {
|
|
614
632
|
withValidate: boolean;
|
615
633
|
overMaxLengthLimit: boolean;
|
616
634
|
showOverflowTooltips: boolean;
|
635
|
+
tooltipsOptions: {};
|
617
636
|
autosize: boolean | import("./input").InputAutoSize;
|
618
637
|
stopPropagation: boolean;
|
619
638
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]>;
|
package/lib/input/index.js
CHANGED
@@ -1203,9 +1203,6 @@ var tooltips = {
|
|
1203
1203
|
hide(el);
|
1204
1204
|
}, 100);
|
1205
1205
|
});
|
1206
|
-
el.addEventListener('click', function () {
|
1207
|
-
hide(el);
|
1208
|
-
});
|
1209
1206
|
popper.addEventListener('mouseleave', function () {
|
1210
1207
|
clearTimeout(delayTimeout);
|
1211
1208
|
hideTimeout = setTimeout(function () {
|
@@ -1219,7 +1216,7 @@ var tooltips = {
|
|
1219
1216
|
show(el);
|
1220
1217
|
clearTimeout(delayTimeout);
|
1221
1218
|
}, opts.delay);
|
1222
|
-
} else if (popper.hasAttribute('data-show')) {
|
1219
|
+
} else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
|
1223
1220
|
hide(el);
|
1224
1221
|
}
|
1225
1222
|
});
|
@@ -1633,6 +1630,12 @@ var inputType = {
|
|
1633
1630
|
withValidate: shared_namespaceObject.PropTypes.bool.def(true),
|
1634
1631
|
overMaxLengthLimit: shared_namespaceObject.PropTypes.bool.def(false),
|
1635
1632
|
showOverflowTooltips: shared_namespaceObject.PropTypes.bool.def(true),
|
1633
|
+
tooltipsOptions: {
|
1634
|
+
type: Object,
|
1635
|
+
"default": function _default() {
|
1636
|
+
return {};
|
1637
|
+
}
|
1638
|
+
},
|
1636
1639
|
resize: shared_namespaceObject.PropTypes.bool.def(true),
|
1637
1640
|
autosize: shared_namespaceObject.PropTypes.oneOfType([Boolean, Object]).def(false),
|
1638
1641
|
stopPropagation: shared_namespaceObject.PropTypes.bool.def(true)
|
@@ -1782,16 +1785,16 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
|
|
1782
1785
|
var tooltips = (0,external_vue_namespaceObject.computed)(function () {
|
1783
1786
|
var _props$modelValue2;
|
1784
1787
|
if (showMaxLimit.value && ceilMaxLength.value - modelValueLength.value === 0) {
|
1785
|
-
return {
|
1788
|
+
return input_objectSpread({
|
1786
1789
|
content: t.value.maxlengthLimitTips
|
1787
|
-
};
|
1790
|
+
}, props.tooltipsOptions || {});
|
1788
1791
|
}
|
1789
|
-
return props.showOverflowTooltips && isOverflow.value && props.modelValue ? {
|
1792
|
+
return props.showOverflowTooltips && isOverflow.value && props.modelValue ? input_objectSpread({
|
1790
1793
|
content: (_props$modelValue2 = props.modelValue) === null || _props$modelValue2 === void 0 ? void 0 : _props$modelValue2.toString(),
|
1791
1794
|
sameWidth: true
|
1792
|
-
} : {
|
1795
|
+
}, props.tooltipsOptions || {}) : input_objectSpread({
|
1793
1796
|
disabled: true
|
1794
|
-
};
|
1797
|
+
}, props.tooltipsOptions || {});
|
1795
1798
|
});
|
1796
1799
|
var showMaxLimit = (0,external_vue_namespaceObject.computed)(function () {
|
1797
1800
|
return typeof props.maxlength === 'number' || typeof props.maxcharacter === 'number';
|
package/lib/input/input.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
2
|
+
import { IOptions } from '../directives';
|
2
3
|
export type InputAutoSize = {
|
3
4
|
minRows?: number;
|
4
5
|
maxRows?: number;
|
@@ -98,6 +99,10 @@ export declare const inputType: {
|
|
98
99
|
} & {
|
99
100
|
default: boolean;
|
100
101
|
};
|
102
|
+
tooltipsOptions: {
|
103
|
+
type: PropType<Partial<IOptions>>;
|
104
|
+
default: () => {};
|
105
|
+
};
|
101
106
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
102
107
|
default: boolean;
|
103
108
|
} & {
|
@@ -243,6 +248,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
243
248
|
} & {
|
244
249
|
default: boolean;
|
245
250
|
};
|
251
|
+
tooltipsOptions: {
|
252
|
+
type: PropType<Partial<IOptions>>;
|
253
|
+
default: () => {};
|
254
|
+
};
|
246
255
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
247
256
|
default: boolean;
|
248
257
|
} & {
|
@@ -366,6 +375,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
366
375
|
} & {
|
367
376
|
default: boolean;
|
368
377
|
};
|
378
|
+
tooltipsOptions: {
|
379
|
+
type: PropType<Partial<IOptions>>;
|
380
|
+
default: () => {};
|
381
|
+
};
|
369
382
|
resize: import("vue-types").VueTypeValidableDef<boolean> & {
|
370
383
|
default: boolean;
|
371
384
|
} & {
|
@@ -420,6 +433,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
420
433
|
withValidate: boolean;
|
421
434
|
overMaxLengthLimit: boolean;
|
422
435
|
showOverflowTooltips: boolean;
|
436
|
+
tooltipsOptions: {};
|
423
437
|
autosize: boolean | InputAutoSize;
|
424
438
|
stopPropagation: boolean;
|
425
439
|
}, {}>;
|
package/lib/message/index.js
CHANGED
@@ -1717,7 +1717,7 @@ var messageProps = {
|
|
1717
1717
|
"class": "".concat(_this2.resolveClassName('message-icon'))
|
1718
1718
|
}, [renderIcon()]), (0,external_vue_namespaceObject.createVNode)("div", {
|
1719
1719
|
"class": "describe"
|
1720
|
-
}, [(_this2$$slots$title = (_this2$$slots$title2 = (_this2$$slots = _this2.$slots).title) === null || _this2$$slots$title2 === void 0 ? void 0 : _this2$$slots$title2.call(_this2$$slots)) !== null && _this2$$slots$title !== void 0 ? _this2$$slots$title : "\u3010".concat(_this2.message.code, "\u3011").concat(_this2.message.overview, " ").concat(_this2.message.suggestion)])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
1720
|
+
}, [(_this2$$slots$title = (_this2$$slots$title2 = (_this2$$slots = _this2.$slots).title) === null || _this2$$slots$title2 === void 0 ? void 0 : _this2$$slots$title2.call(_this2$$slots)) !== null && _this2$$slots$title !== void 0 ? _this2$$slots$title : "".concat(_this2.message.code ? "\u3010".concat(_this2.message.code, "\u3011") : '').concat(_this2.message.overview, " ").concat(_this2.message.suggestion)])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
1721
1721
|
"class": "tools"
|
1722
1722
|
}, [_this2.renderMessageActions()])]), _this2.toolOperation.isDetailShow && (0,external_vue_namespaceObject.createVNode)("div", {
|
1723
1723
|
"class": "message-detail"
|