bkui-vue 0.0.1-beta.116 → 0.0.1-beta.119
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 +28 -28
- package/dist/index.esm.js +88 -43
- package/dist/index.umd.js +23 -23
- package/dist/style.css +1 -1
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/index.d.ts +4 -4
- package/lib/badge/badge.d.ts +1 -1
- package/lib/badge/index.d.ts +4 -4
- package/lib/cascader/cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +4 -4
- package/lib/components.d.ts +0 -51
- package/lib/dialog/dialog.d.ts +1 -1
- package/lib/dialog/index.d.ts +4 -4
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +1 -0
- package/lib/fixed-navbar/fixed-navbar.d.ts +1 -1
- package/lib/fixed-navbar/index.d.ts +4 -4
- package/lib/form/form-item.d.ts +1 -0
- package/lib/form/index.d.ts +1 -0
- package/lib/form/index.js +1 -1
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/menu/index.d.ts +4 -0
- package/lib/menu/index.js +1 -1
- package/lib/message/messageConstructor.d.ts +1 -1
- package/lib/modal/index.d.ts +32 -4
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +12 -1
- package/lib/modal/props.mixin.d.ts +5 -0
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/process/index.d.ts +4 -4
- package/lib/process/process.d.ts +1 -1
- package/lib/progress/index.d.ts +4 -4
- package/lib/progress/progress.d.ts +1 -1
- package/lib/select/index.d.ts +62 -515
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +11 -2
- package/lib/select/select.css +14 -2
- package/lib/select/select.d.ts +17 -92
- package/lib/select/select.less +22 -8
- package/lib/select/select.variable.css +14 -2
- package/lib/select/selectTagInput.d.ts +5 -4
- package/lib/select/type.d.ts +9 -3
- package/lib/sideslider/index.d.ts +20 -24
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +9 -11
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/slider.d.ts +1 -1
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/switcher.d.ts +1 -1
- package/lib/tab/index.d.ts +4 -4
- package/lib/tab/tab.d.ts +1 -1
- package/lib/tag/index.d.ts +4 -4
- package/lib/tag/tag.d.ts +1 -1
- package/lib/tag-input/index.js +1 -1
- package/lib/timeline/index.d.ts +4 -4
- package/lib/timeline/timeline.d.ts +1 -1
- package/lib/upload/upload.d.ts +1 -1
- package/lib/volar.components.d.ts +28 -0
- package/package.json +1 -1
- package/lib/icon/folder.js +0 -1
package/dist/index.esm.js
CHANGED
@@ -9925,6 +9925,7 @@ const propsMixin$1 = {
|
|
9925
9925
|
transfer: PropTypes.bool.def(false),
|
9926
9926
|
maxHeight: PropTypes.string,
|
9927
9927
|
direction: PropTypes.string,
|
9928
|
+
title: PropTypes.string.def(""),
|
9928
9929
|
animateType: PropTypes.string.def("slide"),
|
9929
9930
|
renderDirective: PropTypes.commonType(["show", "if"], "renderDirective").def("show"),
|
9930
9931
|
beforeClose: PropTypes.custom(() => true),
|
@@ -10881,11 +10882,11 @@ const tooltips = {
|
|
10881
10882
|
} else {
|
10882
10883
|
opts.content = binding.value;
|
10883
10884
|
}
|
10884
|
-
const { disabled, arrow: arrow2, theme } = opts;
|
10885
|
+
const { disabled, arrow: arrow2, theme, extCls } = opts;
|
10885
10886
|
if (disabled) {
|
10886
10887
|
return;
|
10887
10888
|
}
|
10888
|
-
const popper2 = renderContent(opts.content, arrow2, theme === "light");
|
10889
|
+
const popper2 = renderContent(opts.content, arrow2, theme === "light", extCls);
|
10889
10890
|
createPopperInstance(el, popper2, opts);
|
10890
10891
|
}
|
10891
10892
|
};
|
@@ -10899,6 +10900,7 @@ function initOptions() {
|
|
10899
10900
|
showOnInit: false,
|
10900
10901
|
placement: "top",
|
10901
10902
|
distance: 8,
|
10903
|
+
extCls: "",
|
10902
10904
|
onShow: () => {
|
10903
10905
|
},
|
10904
10906
|
onHide: () => {
|
@@ -10906,10 +10908,10 @@ function initOptions() {
|
|
10906
10908
|
};
|
10907
10909
|
return defaultOpts;
|
10908
10910
|
}
|
10909
|
-
function renderContent(value, hasArrow, isLight) {
|
10911
|
+
function renderContent(value, hasArrow, isLight, extCls) {
|
10910
10912
|
const zIndex = bkZIndexManager.getPopperIndex();
|
10911
10913
|
const content = document.createElement("div");
|
10912
|
-
content.className = `bk-popper ${isLight ? "light" : "dark"}`;
|
10914
|
+
content.className = `bk-popper ${isLight ? "light" : "dark"} ${extCls}`;
|
10913
10915
|
content.innerText = value;
|
10914
10916
|
content.style.zIndex = String(zIndex);
|
10915
10917
|
if (hasArrow) {
|
@@ -13670,7 +13672,7 @@ var BkOption = defineComponent({
|
|
13670
13672
|
name: "Option",
|
13671
13673
|
props: {
|
13672
13674
|
value: PropTypes.any,
|
13673
|
-
label: PropTypes.
|
13675
|
+
label: PropTypes.string.def(""),
|
13674
13676
|
disabled: PropTypes.bool.def(false)
|
13675
13677
|
},
|
13676
13678
|
setup(props) {
|
@@ -13688,7 +13690,7 @@ var BkOption = defineComponent({
|
|
13688
13690
|
const group = inject(optionGroupKey, null);
|
13689
13691
|
const selected = computed(() => {
|
13690
13692
|
var _a;
|
13691
|
-
return (_a = select2 == null ? void 0 : select2.selected) == null ? void 0 : _a.some((
|
13693
|
+
return (_a = select2 == null ? void 0 : select2.selected) == null ? void 0 : _a.some((item) => item.value === value.value);
|
13692
13694
|
});
|
13693
13695
|
const multiple = computed(() => select2 == null ? void 0 : select2.multiple);
|
13694
13696
|
const isHover = computed(() => (select2 == null ? void 0 : select2.activeOptionValue) === value.value);
|
@@ -13945,13 +13947,13 @@ var SelectTagInput = defineComponent({
|
|
13945
13947
|
var _a, _b, _c, _d;
|
13946
13948
|
return createVNode("div", {
|
13947
13949
|
"class": "bk-select-tag"
|
13948
|
-
}, [(_b = (_a = this.$slots) == null ? void 0 : _a.prefix) == null ? void 0 : _b.call(_a), this.selected.map((
|
13950
|
+
}, [(_b = (_a = this.$slots) == null ? void 0 : _a.prefix) == null ? void 0 : _b.call(_a), this.selected.map((item) => {
|
13949
13951
|
let _slot;
|
13950
13952
|
return createVNode(BkTag, {
|
13951
13953
|
"closable": true,
|
13952
13954
|
"theme": this.tagTheme,
|
13953
|
-
"onClose": () => this.handleRemoveTag(
|
13954
|
-
}, _isSlot$5(_slot = this.handleGetLabelByValue(
|
13955
|
+
"onClose": () => this.handleRemoveTag(item.value)
|
13956
|
+
}, _isSlot$5(_slot = this.handleGetLabelByValue(item)) ? _slot : {
|
13955
13957
|
default: () => [_slot]
|
13956
13958
|
});
|
13957
13959
|
}), withDirectives(createVNode("input", {
|
@@ -14034,7 +14036,7 @@ var Component$h = defineComponent({
|
|
14034
14036
|
deep: true
|
14035
14037
|
});
|
14036
14038
|
const isDisabled = computed(() => disabled.value || loading2.value);
|
14037
|
-
const selectedLabel = computed(() => selected.value.map((
|
14039
|
+
const selectedLabel = computed(() => selected.value.map((item) => handleGetLabelByValue(item)));
|
14038
14040
|
const isAllSelected = computed(() => {
|
14039
14041
|
const normalSelectedValues = options.value.reduce((pre, option) => {
|
14040
14042
|
if (!option.disabled) {
|
@@ -14042,7 +14044,7 @@ var Component$h = defineComponent({
|
|
14042
14044
|
}
|
14043
14045
|
return pre;
|
14044
14046
|
}, []);
|
14045
|
-
return normalSelectedValues.length <= selected.value.length && normalSelectedValues.every((val) => selected.value.some((
|
14047
|
+
return normalSelectedValues.length <= selected.value.length && normalSelectedValues.every((val) => selected.value.some((item) => item.value === val));
|
14046
14048
|
});
|
14047
14049
|
const isGroup = computed(() => !!groupsMap.value.size);
|
14048
14050
|
const isOptionsEmpty = computed(() => !options.value.length);
|
@@ -14103,10 +14105,10 @@ var Component$h = defineComponent({
|
|
14103
14105
|
});
|
14104
14106
|
const initActiveOptionValue = () => {
|
14105
14107
|
var _a;
|
14106
|
-
const
|
14107
|
-
const option = optionsMap.value.get(
|
14108
|
+
const firstSelected = selected.value[0];
|
14109
|
+
const option = optionsMap.value.get(firstSelected == null ? void 0 : firstSelected.value);
|
14108
14110
|
if (option && !option.disabled && option.visible) {
|
14109
|
-
activeOptionValue.value =
|
14111
|
+
activeOptionValue.value = firstSelected == null ? void 0 : firstSelected.value;
|
14110
14112
|
} else {
|
14111
14113
|
activeOptionValue.value = (_a = options.value.find((option2) => !option2.disabled && option2.visible)) == null ? void 0 : _a.value;
|
14112
14114
|
}
|
@@ -14142,7 +14144,8 @@ var Component$h = defineComponent({
|
|
14142
14144
|
return;
|
14143
14145
|
searchKey.value = value;
|
14144
14146
|
};
|
14145
|
-
const handleInputEnter = (
|
14147
|
+
const handleInputEnter = (val, e) => {
|
14148
|
+
const value = String(val);
|
14146
14149
|
if (!allowCreate.value || !value || filterable.value && options.value.find((data3) => toLowerCase(String(data3.label)) === toLowerCase(value)))
|
14147
14150
|
return;
|
14148
14151
|
const data2 = optionsMap.value.get(value);
|
@@ -14150,10 +14153,16 @@ var Component$h = defineComponent({
|
|
14150
14153
|
return;
|
14151
14154
|
e.stopPropagation();
|
14152
14155
|
if (multiple.value) {
|
14153
|
-
selected.value.push(
|
14154
|
-
|
14156
|
+
selected.value.push({
|
14157
|
+
value,
|
14158
|
+
label: value
|
14159
|
+
});
|
14160
|
+
emitChange(selected.value.map((item) => item.value));
|
14155
14161
|
} else {
|
14156
|
-
selected.value = [
|
14162
|
+
selected.value = [{
|
14163
|
+
value,
|
14164
|
+
label: value
|
14165
|
+
}];
|
14157
14166
|
emitChange(value);
|
14158
14167
|
hidePopover();
|
14159
14168
|
}
|
@@ -14163,15 +14172,21 @@ var Component$h = defineComponent({
|
|
14163
14172
|
if (isDisabled.value || !option)
|
14164
14173
|
return;
|
14165
14174
|
if (multiple.value) {
|
14166
|
-
const index = selected.value.findIndex((
|
14175
|
+
const index = selected.value.findIndex((item) => item.value === option.value);
|
14167
14176
|
if (index > -1) {
|
14168
14177
|
selected.value.splice(index, 1);
|
14169
14178
|
} else {
|
14170
|
-
selected.value.push(
|
14179
|
+
selected.value.push({
|
14180
|
+
value: option.value,
|
14181
|
+
label: option.label || option.value
|
14182
|
+
});
|
14171
14183
|
}
|
14172
|
-
emitChange(selected.value);
|
14184
|
+
emitChange(selected.value.map((item) => item.value));
|
14173
14185
|
} else {
|
14174
|
-
selected.value = [
|
14186
|
+
selected.value = [{
|
14187
|
+
label: option.label || option.value,
|
14188
|
+
value: option.value
|
14189
|
+
}];
|
14175
14190
|
emitChange(option.value);
|
14176
14191
|
hidePopover();
|
14177
14192
|
}
|
@@ -14192,17 +14207,23 @@ var Component$h = defineComponent({
|
|
14192
14207
|
emit("clear", multiple.value ? [] : "");
|
14193
14208
|
hidePopover();
|
14194
14209
|
};
|
14210
|
+
const handleSelectedAllOptionMouseEnter = () => {
|
14211
|
+
activeOptionValue.value = "";
|
14212
|
+
};
|
14195
14213
|
const handleToggleAll = () => {
|
14196
14214
|
if (isAllSelected.value) {
|
14197
14215
|
selected.value = [];
|
14198
14216
|
} else {
|
14199
14217
|
options.value.forEach((option) => {
|
14200
|
-
if (option.disabled || selected.value.find((
|
14218
|
+
if (option.disabled || selected.value.find((item) => item.value === option.value))
|
14201
14219
|
return;
|
14202
|
-
selected.value.push(
|
14220
|
+
selected.value.push({
|
14221
|
+
value: option.value,
|
14222
|
+
label: option.label || option.value
|
14223
|
+
});
|
14203
14224
|
});
|
14204
14225
|
}
|
14205
|
-
emitChange(selected.value);
|
14226
|
+
emitChange(selected.value.map((item) => item.value));
|
14206
14227
|
focus();
|
14207
14228
|
};
|
14208
14229
|
const handleScroll = (e) => {
|
@@ -14216,21 +14237,27 @@ var Component$h = defineComponent({
|
|
14216
14237
|
}
|
14217
14238
|
};
|
14218
14239
|
const handleDeleteTag = (val) => {
|
14219
|
-
const index = selected.value.findIndex((
|
14240
|
+
const index = selected.value.findIndex((item) => item.value === val);
|
14220
14241
|
if (index > -1) {
|
14221
14242
|
selected.value.splice(index, 1);
|
14222
|
-
emitChange(selected.value);
|
14243
|
+
emitChange(selected.value.map((item) => item.value));
|
14223
14244
|
}
|
14224
14245
|
};
|
14225
|
-
const handleGetLabelByValue = (
|
14246
|
+
const handleGetLabelByValue = (item) => {
|
14226
14247
|
var _a, _b;
|
14227
|
-
return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(
|
14248
|
+
return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(item.value)) == null ? void 0 : _b.label) || item.label || item.value;
|
14228
14249
|
};
|
14229
14250
|
const handleSetSelectedData = () => {
|
14230
14251
|
if (Array.isArray(modelValue.value)) {
|
14231
|
-
selected.value = [...modelValue.value
|
14252
|
+
selected.value = [...modelValue.value.map((value) => ({
|
14253
|
+
value,
|
14254
|
+
label: value
|
14255
|
+
}))];
|
14232
14256
|
} else if (modelValue.value !== void 0) {
|
14233
|
-
selected.value = [
|
14257
|
+
selected.value = [{
|
14258
|
+
value: modelValue.value,
|
14259
|
+
label: modelValue.value
|
14260
|
+
}];
|
14234
14261
|
}
|
14235
14262
|
};
|
14236
14263
|
const handleKeydown = (e) => {
|
@@ -14256,7 +14283,7 @@ var Component$h = defineComponent({
|
|
14256
14283
|
if (!multiple.value || !selected.value.length || searchKey.value.length)
|
14257
14284
|
return;
|
14258
14285
|
selected.value.pop();
|
14259
|
-
emitChange(selected.value);
|
14286
|
+
emitChange(selected.value.map((item) => item.value));
|
14260
14287
|
break;
|
14261
14288
|
}
|
14262
14289
|
case "Enter": {
|
@@ -14333,7 +14360,8 @@ var Component$h = defineComponent({
|
|
14333
14360
|
handleDeleteTag,
|
14334
14361
|
handleInputChange,
|
14335
14362
|
handleInputEnter,
|
14336
|
-
handleKeydown
|
14363
|
+
handleKeydown,
|
14364
|
+
handleSelectedAllOptionMouseEnter
|
14337
14365
|
};
|
14338
14366
|
},
|
14339
14367
|
render() {
|
@@ -14359,6 +14387,7 @@ var Component$h = defineComponent({
|
|
14359
14387
|
if (this.loading) {
|
14360
14388
|
return createVNode(BkLoading, {
|
14361
14389
|
"loading": true,
|
14390
|
+
"theme": "primary",
|
14362
14391
|
"class": "spinner",
|
14363
14392
|
"mode": "spin",
|
14364
14393
|
"size": "mini"
|
@@ -14431,10 +14460,11 @@ var Component$h = defineComponent({
|
|
14431
14460
|
"class": "bk-select-empty"
|
14432
14461
|
}, [this.searchLoading && createVNode(BkLoading, {
|
14433
14462
|
"class": "mr5",
|
14463
|
+
"theme": "primary",
|
14434
14464
|
"loading": true,
|
14435
14465
|
"mode": "spin",
|
14436
14466
|
"size": "mini"
|
14437
|
-
}, null), this.curContentText]), createVNode("div", {
|
14467
|
+
}, null), createVNode("span", null, [this.curContentText])]), createVNode("div", {
|
14438
14468
|
"class": "bk-select-content"
|
14439
14469
|
}, [createVNode("div", {
|
14440
14470
|
"class": "bk-select-dropdown",
|
@@ -14446,6 +14476,7 @@ var Component$h = defineComponent({
|
|
14446
14476
|
"class": "bk-select-options"
|
14447
14477
|
}, [this.multiple && this.showSelectAll && (!this.searchKey || !this.filterable) && createVNode("li", {
|
14448
14478
|
"class": "bk-select-option",
|
14479
|
+
"onMouseenter": this.handleSelectedAllOptionMouseEnter,
|
14449
14480
|
"onClick": this.handleToggleAll
|
14450
14481
|
}, [this.selectAllText]), (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a), this.scrollLoading && createVNode("li", {
|
14451
14482
|
"class": "bk-select-options-loading"
|
@@ -14455,7 +14486,7 @@ var Component$h = defineComponent({
|
|
14455
14486
|
"loading": true,
|
14456
14487
|
"mode": "spin",
|
14457
14488
|
"size": "mini"
|
14458
|
-
}, null), this.loadingText])]), [[vShow, this.isShowSelectContent]])]), this.$slots.extension && createVNode("div", {
|
14489
|
+
}, null), createVNode("span", null, [this.loadingText])])]), [[vShow, this.isShowSelectContent]])]), this.$slots.extension && createVNode("div", {
|
14459
14490
|
"class": "bk-select-extension"
|
14460
14491
|
}, [this.$slots.extension()])])]);
|
14461
14492
|
};
|
@@ -14490,6 +14521,10 @@ var Component$g = defineComponent({
|
|
14490
14521
|
type: String,
|
14491
14522
|
default: ""
|
14492
14523
|
},
|
14524
|
+
extCls: {
|
14525
|
+
type: String,
|
14526
|
+
default: ""
|
14527
|
+
},
|
14493
14528
|
direction: {
|
14494
14529
|
type: String,
|
14495
14530
|
default: "right",
|
@@ -14561,7 +14596,7 @@ var Component$g = defineComponent({
|
|
14561
14596
|
const maxHeight = slots.footer ? "calc(100vh - 114px)" : "calc(100vh - 60px)";
|
14562
14597
|
return createVNode(BkModal, mergeProps(props, {
|
14563
14598
|
"maxHeight": maxHeight,
|
14564
|
-
"
|
14599
|
+
"extCls": className,
|
14565
14600
|
"style": `${props.direction}: 0;`,
|
14566
14601
|
"onHidden": handleHidden,
|
14567
14602
|
"onShown": handleShown,
|
@@ -17380,8 +17415,11 @@ function useFlatList(props) {
|
|
17380
17415
|
displayKey,
|
17381
17416
|
list
|
17382
17417
|
} = toRefs(props);
|
17383
|
-
const
|
17418
|
+
const state = reactive({
|
17419
|
+
flatList: []
|
17420
|
+
});
|
17384
17421
|
watch([useGroup, saveKey, displayKey, list], () => {
|
17422
|
+
state.flatList = [];
|
17385
17423
|
let formatList = list.value;
|
17386
17424
|
if (useGroup.value) {
|
17387
17425
|
formatList = list.value.reduce((formatList2, item) => {
|
@@ -17397,9 +17435,9 @@ function useFlatList(props) {
|
|
17397
17435
|
return formatList2.concat(children);
|
17398
17436
|
}, []);
|
17399
17437
|
}
|
17400
|
-
|
17438
|
+
state.flatList = [...formatList];
|
17401
17439
|
}, { immediate: true, deep: true });
|
17402
|
-
return flatList;
|
17440
|
+
return state.flatList;
|
17403
17441
|
}
|
17404
17442
|
const getCharLength = (str) => {
|
17405
17443
|
const len = str.length;
|
@@ -17832,7 +17870,7 @@ var Component$a = defineComponent({
|
|
17832
17870
|
popoverProps.isShow = false;
|
17833
17871
|
emit("blur", inputValue, tagList.value);
|
17834
17872
|
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur");
|
17835
|
-
},
|
17873
|
+
}, 200);
|
17836
17874
|
};
|
17837
17875
|
const handleTagSelected = (item, type, e) => {
|
17838
17876
|
e == null ? void 0 : e.stopPropagation();
|
@@ -25126,6 +25164,12 @@ var FormItem = defineComponent({
|
|
25126
25164
|
});
|
25127
25165
|
const form2 = useForm();
|
25128
25166
|
const isForm = Boolean(form2);
|
25167
|
+
const isFormTypeVertical = computed(() => {
|
25168
|
+
if (!isForm) {
|
25169
|
+
return false;
|
25170
|
+
}
|
25171
|
+
return form2.props.formType === "vertical";
|
25172
|
+
});
|
25129
25173
|
const labelStyles = computed(() => {
|
25130
25174
|
const styles = {
|
25131
25175
|
width: "",
|
@@ -25210,12 +25254,13 @@ var FormItem = defineComponent({
|
|
25210
25254
|
});
|
25211
25255
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
25212
25256
|
labelStyles,
|
25257
|
+
isFormTypeVertical,
|
25213
25258
|
validate,
|
25214
25259
|
clearValidate
|
25215
25260
|
});
|
25216
25261
|
},
|
25217
25262
|
render() {
|
25218
|
-
var _a, _b;
|
25263
|
+
var _a, _b, _c, _d;
|
25219
25264
|
const itemClassees = classes({
|
25220
25265
|
"bk-form-item": true,
|
25221
25266
|
"is-error": this.isError,
|
@@ -25252,9 +25297,9 @@ var FormItem = defineComponent({
|
|
25252
25297
|
}, [createVNode("div", {
|
25253
25298
|
"class": "bk-form-label",
|
25254
25299
|
"style": this.labelStyles
|
25255
|
-
}, [renderLabel()]), createVNode("div", {
|
25300
|
+
}, [renderLabel(), this.isFormTypeVertical && ((_b = (_a = this.$slots).labelAppend) == null ? void 0 : _b.call(_a))]), createVNode("div", {
|
25256
25301
|
"class": "bk-form-content"
|
25257
|
-
}, [(
|
25302
|
+
}, [(_d = (_c = this.$slots).default) == null ? void 0 : _d.call(_c), renderError()])]);
|
25258
25303
|
}
|
25259
25304
|
});
|
25260
25305
|
const BkForm = withInstallProps(Form, { FormItem, ComposeFormItem });
|