bkui-vue 0.0.1-beta.155 → 0.0.1-beta.158
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 +39 -39
- package/dist/index.esm.js +290 -164
- package/dist/index.umd.js +40 -40
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +2 -2
- package/lib/alert/alert.variable.css +2 -2
- package/lib/backtop/backtop.variable.css +2 -2
- package/lib/badge/badge.variable.css +2 -2
- package/lib/breadcrumb/breadcrumb.variable.css +2 -2
- package/lib/button/button.variable.css +2 -2
- package/lib/card/card.variable.css +2 -2
- package/lib/cascader/cascader-panel.d.ts +4 -4
- package/lib/cascader/cascader.css +13 -3
- package/lib/cascader/cascader.d.ts +2 -2
- package/lib/cascader/cascader.less +14 -1
- package/lib/cascader/cascader.variable.css +13 -3
- package/lib/cascader/index.d.ts +10 -10
- package/lib/cascader/index.js +1 -1
- package/lib/checkbox/checkbox-group.d.ts +16 -0
- package/lib/checkbox/checkbox.variable.css +2 -2
- package/lib/checkbox/index.d.ts +11 -0
- package/lib/checkbox/index.js +1 -1
- package/lib/code-diff/code-diff.variable.css +2 -2
- package/lib/collapse/collapse.variable.css +2 -2
- package/lib/color-picker/color-picker.d.ts +16 -0
- package/lib/color-picker/color-picker.variable.css +2 -2
- package/lib/color-picker/index.d.ts +24 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/container/container.variable.css +2 -2
- package/lib/date-picker/date-picker.d.ts +9 -0
- package/lib/date-picker/date-picker.variable.css +2 -2
- package/lib/date-picker/index.d.ts +20 -1
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/props.d.ts +4 -0
- package/lib/divider/divider.variable.css +2 -2
- package/lib/dropdown/dropdown.variable.css +2 -2
- package/lib/exception/exception.css +40 -14
- package/lib/exception/exception.d.ts +10 -3
- package/lib/exception/exception.less +59 -22
- package/lib/exception/exception.variable.css +42 -16
- package/lib/exception/index.d.ts +23 -8
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +2 -2
- package/lib/form/form-item.d.ts +1 -1
- package/lib/form/form.css +6 -0
- package/lib/form/form.less +9 -0
- package/lib/form/form.variable.css +8 -2
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.js +1 -1
- package/lib/input/index.d.ts +27 -4
- package/lib/input/index.js +1 -1
- package/lib/input/input.d.ts +17 -1
- package/lib/input/input.variable.css +2 -2
- package/lib/link/link.variable.css +2 -2
- package/lib/loading/loading.variable.css +2 -2
- package/lib/menu/menu.variable.css +2 -2
- package/lib/menu/submenu.variable.css +2 -2
- package/lib/message/message.variable.css +2 -2
- package/lib/navigation/navigation.variable.css +2 -2
- package/lib/notify/notify.variable.css +2 -2
- package/lib/pagination/pagination.variable.css +2 -2
- package/lib/popover/popover.variable.css +2 -2
- package/lib/popover2/popover2.variable.css +2 -2
- package/lib/process/index.js +1 -1
- package/lib/process/process.variable.css +2 -2
- package/lib/progress/progress.variable.css +2 -2
- package/lib/radio/index.d.ts +11 -0
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-group.d.ts +16 -0
- package/lib/radio/radio.variable.css +2 -2
- package/lib/rate/index.d.ts +24 -1
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +11 -0
- package/lib/resize-layout/index.d.ts +4 -4
- package/lib/resize-layout/resize-layout.d.ts +1 -1
- package/lib/resize-layout/resize-layout.variable.css +2 -2
- package/lib/select/index.d.ts +88 -25
- package/lib/select/index.js +1 -1
- package/lib/select/select.css +54 -24
- package/lib/select/select.d.ts +39 -8
- package/lib/select/select.less +62 -24
- package/lib/select/select.variable.css +56 -26
- package/lib/select/selectTagInput.d.ts +1 -3
- package/lib/shared/dom.d.ts +2 -0
- package/lib/shared/index.d.ts +1 -0
- package/lib/shared/index.js +1 -1
- package/lib/sideslider/sideslider.variable.css +2 -2
- package/lib/slider/slider.variable.css +2 -2
- package/lib/steps/steps.variable.css +2 -2
- package/lib/styles/mixins/scroll.variable.css +2 -2
- package/lib/styles/themes/themes.less +2 -2
- package/lib/switcher/index.d.ts +24 -1
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.d.ts +11 -0
- package/lib/switcher/switcher.variable.css +2 -2
- package/lib/tab/tab.variable.css +2 -2
- package/lib/table/const.d.ts +2 -2
- package/lib/table/index.d.ts +6 -6
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.variable.css +2 -2
- package/lib/table/plugins/head-sort.variable.css +2 -2
- package/lib/table/plugins/settings.variable.css +2 -2
- package/lib/table/table.css +52 -18
- package/lib/table/table.d.ts +2 -2
- package/lib/table/table.less +13 -6
- package/lib/table/table.variable.css +54 -20
- package/lib/tag/tag.css +23 -8
- package/lib/tag/tag.less +25 -8
- package/lib/tag/tag.variable.css +25 -10
- package/lib/tag-input/index.d.ts +20 -1
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/tag-input.d.ts +10 -1
- package/lib/tag-input/tag-input.variable.css +2 -2
- package/lib/tag-input/tag-props.d.ts +4 -0
- package/lib/timeline/timeline.variable.css +2 -2
- package/lib/transfer/index.d.ts +4 -4
- package/lib/transfer/transfer.d.ts +1 -1
- package/lib/transfer/transfer.variable.css +2 -2
- package/lib/tree/tree.css +5 -1
- package/lib/tree/tree.less +8 -1
- package/lib/tree/tree.variable.css +7 -3
- package/lib/upload/upload.variable.css +2 -2
- package/lib/virtual-render/virtual-render.variable.css +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -7320,6 +7320,7 @@ var lodash = { exports: {} };
|
|
7320
7320
|
}
|
7321
7321
|
}).call(commonjsGlobal);
|
7322
7322
|
})(lodash, lodash.exports);
|
7323
|
+
var _$1 = lodash.exports;
|
7323
7324
|
const lowerStr = "abcdefghijklmnopqrstuvwxyz0123456789";
|
7324
7325
|
const random = (n2, str = lowerStr) => {
|
7325
7326
|
let result = "";
|
@@ -7905,6 +7906,34 @@ const formKey = Symbol("form");
|
|
7905
7906
|
const formItemKey = Symbol("formItem");
|
7906
7907
|
const useForm = () => inject(formKey);
|
7907
7908
|
const useFormItem = () => inject(formItemKey, EMPTY_OBJ);
|
7909
|
+
const on$2 = (() => {
|
7910
|
+
if (document.addEventListener) {
|
7911
|
+
return (element, event, handler) => {
|
7912
|
+
if (element && event && handler) {
|
7913
|
+
element.addEventListener(event, handler, true);
|
7914
|
+
}
|
7915
|
+
};
|
7916
|
+
}
|
7917
|
+
return (element, event, handler) => {
|
7918
|
+
if (element && event && handler) {
|
7919
|
+
element.attachEvent(`on${event}`, handler);
|
7920
|
+
}
|
7921
|
+
};
|
7922
|
+
})();
|
7923
|
+
const off$2 = (() => {
|
7924
|
+
if (document.removeEventListener) {
|
7925
|
+
return (element, event, handler) => {
|
7926
|
+
if (element && event) {
|
7927
|
+
element.removeEventListener(event, handler, true);
|
7928
|
+
}
|
7929
|
+
};
|
7930
|
+
}
|
7931
|
+
return (element, event, handler) => {
|
7932
|
+
if (element && event) {
|
7933
|
+
element.detachEvent(`on${event}`, handler);
|
7934
|
+
}
|
7935
|
+
};
|
7936
|
+
})();
|
7908
7937
|
function classes(dynamicCls, constCls = "") {
|
7909
7938
|
return Object.entries(dynamicCls).filter((entry) => entry[1]).map((entry) => entry[0]).join(" ").concat(constCls ? ` ${constCls}` : "");
|
7910
7939
|
}
|
@@ -9205,7 +9234,8 @@ const inputType = {
|
|
9205
9234
|
modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
9206
9235
|
size: PropTypes.size(),
|
9207
9236
|
rows: PropTypes.number,
|
9208
|
-
selectReadonly: PropTypes.bool.def(false)
|
9237
|
+
selectReadonly: PropTypes.bool.def(false),
|
9238
|
+
withValidate: PropTypes.bool.def(true)
|
9209
9239
|
};
|
9210
9240
|
let EVENTS$2;
|
9211
9241
|
(function(EVENTS2) {
|
@@ -9305,6 +9335,12 @@ var Component$x = defineComponent({
|
|
9305
9335
|
const decControlCls = computed(() => classes({
|
9306
9336
|
"is-disabled": props2.disabled || props2.modelValue <= props2.min
|
9307
9337
|
}));
|
9338
|
+
watch(() => props2.modelValue, () => {
|
9339
|
+
var _a2;
|
9340
|
+
if (props2.withValidate) {
|
9341
|
+
(_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change");
|
9342
|
+
}
|
9343
|
+
});
|
9308
9344
|
ctx.expose({
|
9309
9345
|
focus() {
|
9310
9346
|
inputRef.value.focus();
|
@@ -9312,14 +9348,12 @@ var Component$x = defineComponent({
|
|
9312
9348
|
clear
|
9313
9349
|
});
|
9314
9350
|
function clear() {
|
9315
|
-
var _a2;
|
9316
9351
|
if (props2.disabled)
|
9317
9352
|
return;
|
9318
9353
|
const resetVal = isNumberInput.value ? props2.min : "";
|
9319
9354
|
ctx.emit(EVENTS$2.UPDATE, resetVal);
|
9320
9355
|
ctx.emit(EVENTS$2.CHANGE, resetVal);
|
9321
9356
|
ctx.emit(EVENTS$2.CLEAR);
|
9322
|
-
(_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change");
|
9323
9357
|
}
|
9324
9358
|
function handleFocus(e) {
|
9325
9359
|
isFocused.value = true;
|
@@ -9338,7 +9372,6 @@ var Component$x = defineComponent({
|
|
9338
9372
|
}
|
9339
9373
|
function eventHandler(eventName) {
|
9340
9374
|
return (e) => {
|
9341
|
-
var _a2;
|
9342
9375
|
e.stopPropagation();
|
9343
9376
|
if (eventName === EVENTS$2.KEYDOWN && (e.code === "Enter" || e.key === "Enter" || e.keyCode === 13)) {
|
9344
9377
|
ctx.emit(EVENTS$2.ENTER, e.target.value, e);
|
@@ -9349,9 +9382,6 @@ var Component$x = defineComponent({
|
|
9349
9382
|
ctx.emit(EVENTS$2.UPDATE, isNumberInput.value ? +e.target.value : e.target.value);
|
9350
9383
|
}
|
9351
9384
|
ctx.emit(eventName, e.target.value, e);
|
9352
|
-
if (eventName === EVENTS$2.INPUT) {
|
9353
|
-
(_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change");
|
9354
|
-
}
|
9355
9385
|
};
|
9356
9386
|
}
|
9357
9387
|
const [handleKeyup, handleKeydown, handleKeyPress, handlePaste, handleChange, handleInput] = [EVENTS$2.KEYUP, EVENTS$2.KEYDOWN, EVENTS$2.KEYPRESS, EVENTS$2.PASTE, EVENTS$2.CHANGE, EVENTS$2.INPUT].map(eventHandler);
|
@@ -9580,7 +9610,6 @@ const useCheckbox = () => {
|
|
9580
9610
|
props: props2,
|
9581
9611
|
emit
|
9582
9612
|
} = currentInstance;
|
9583
|
-
const formItem = useFormItem();
|
9584
9613
|
const checkboxGroup = inject(checkboxGroupKey, EMPTY_OBJ);
|
9585
9614
|
const isGroup = !isEmptyObj(checkboxGroup);
|
9586
9615
|
const isChecked = ref(props2.checked);
|
@@ -9610,7 +9639,6 @@ const useCheckbox = () => {
|
|
9610
9639
|
isChecked.value = value;
|
9611
9640
|
};
|
9612
9641
|
const handleChange = (event) => {
|
9613
|
-
var _a;
|
9614
9642
|
if (isDisabled.value) {
|
9615
9643
|
return;
|
9616
9644
|
}
|
@@ -9622,7 +9650,6 @@ const useCheckbox = () => {
|
|
9622
9650
|
if (isGroup) {
|
9623
9651
|
checkboxGroup.handleChange();
|
9624
9652
|
}
|
9625
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
9626
9653
|
nextTick(() => {
|
9627
9654
|
if ($targetInput.checked !== isChecked.value) {
|
9628
9655
|
$targetInput.checked = isChecked.value;
|
@@ -9710,13 +9737,15 @@ var Component$v = defineComponent({
|
|
9710
9737
|
const checkboxGroupProps = {
|
9711
9738
|
name: PropTypes.string.def(""),
|
9712
9739
|
modelValue: PropTypes.array,
|
9713
|
-
disabled: PropTypes.bool
|
9740
|
+
disabled: PropTypes.bool,
|
9741
|
+
withValidate: PropTypes.bool.def(true)
|
9714
9742
|
};
|
9715
9743
|
var BkCheckboxGroup = defineComponent({
|
9716
9744
|
name: "CheckboxGroup",
|
9717
9745
|
props: checkboxGroupProps,
|
9718
9746
|
emits: ["change", "update:modelValue"],
|
9719
9747
|
setup(props2, context) {
|
9748
|
+
const formItem = useFormItem();
|
9720
9749
|
const checkboxInstanceList = [];
|
9721
9750
|
const register = (checkboxContext) => {
|
9722
9751
|
checkboxInstanceList.push(checkboxContext);
|
@@ -9744,6 +9773,12 @@ var BkCheckboxGroup = defineComponent({
|
|
9744
9773
|
unregister,
|
9745
9774
|
handleChange
|
9746
9775
|
});
|
9776
|
+
watch(() => props2.modelValue, () => {
|
9777
|
+
var _a;
|
9778
|
+
if (props2.withValidate) {
|
9779
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
9780
|
+
}
|
9781
|
+
});
|
9747
9782
|
onMounted(() => {
|
9748
9783
|
const modelValue = props2.modelValue || [];
|
9749
9784
|
checkboxInstanceList.forEach((checkboxInstance) => {
|
@@ -10432,20 +10467,12 @@ var Component$t = defineComponent({
|
|
10432
10467
|
props: {
|
10433
10468
|
type: PropTypes.commonType(["404", "403", "500", "building", "empty", "search-empty", "login"], "type").def("404"),
|
10434
10469
|
scene: PropTypes.commonType(["page", "part"], "scene").def("page"),
|
10435
|
-
|
10470
|
+
title: PropTypes.string,
|
10471
|
+
description: PropTypes.string
|
10436
10472
|
},
|
10437
10473
|
setup(props2, {
|
10438
10474
|
slots
|
10439
10475
|
}) {
|
10440
|
-
const tipText = {
|
10441
|
-
403: "\u65E0\u4E1A\u52A1\u6743\u9650",
|
10442
|
-
404: "\u9875\u9762\u4E0D\u5B58\u5728",
|
10443
|
-
500: "\u670D\u52A1\u7EF4\u62A4\u4E2D",
|
10444
|
-
building: "\u529F\u80FD\u5EFA\u8BBE\u4E2D",
|
10445
|
-
empty: "\u6CA1\u6709\u6570\u636E",
|
10446
|
-
"search-empty": "\u641C\u7D22\u4E3A\u7A7A",
|
10447
|
-
login: "\u8BF7\u767B\u5165\u84DD\u9CB8"
|
10448
|
-
};
|
10449
10476
|
const images = {
|
10450
10477
|
403: permissions,
|
10451
10478
|
404: notFound,
|
@@ -10455,19 +10482,58 @@ var Component$t = defineComponent({
|
|
10455
10482
|
"search-empty": searchEmpty,
|
10456
10483
|
login
|
10457
10484
|
};
|
10458
|
-
|
10459
|
-
|
10485
|
+
const renderImg = () => {
|
10486
|
+
const imgSrc = images[props2.type] ? images[props2.type] : empty;
|
10460
10487
|
return createVNode("div", {
|
10461
|
-
"class":
|
10462
|
-
}, [createVNode("div", {
|
10463
|
-
"class": ["bk-exception-img", `${props2.scene}-img`]
|
10488
|
+
"class": "bk-exception-img"
|
10464
10489
|
}, [createVNode("img", {
|
10465
10490
|
"class": "exception-image",
|
10466
|
-
"src":
|
10491
|
+
"src": imgSrc,
|
10467
10492
|
"alt": "type"
|
10468
|
-
}, null)])
|
10469
|
-
|
10470
|
-
|
10493
|
+
}, null)]);
|
10494
|
+
};
|
10495
|
+
const renderTitle = () => {
|
10496
|
+
if (_$1.isFunction(slots.title)) {
|
10497
|
+
return createVNode("div", {
|
10498
|
+
"class": "bk-exception-title"
|
10499
|
+
}, [slots.title()]);
|
10500
|
+
}
|
10501
|
+
if (props2.title) {
|
10502
|
+
return createVNode("div", {
|
10503
|
+
"class": "bk-exception-title"
|
10504
|
+
}, [props2.title]);
|
10505
|
+
}
|
10506
|
+
return null;
|
10507
|
+
};
|
10508
|
+
const renderDescription = () => {
|
10509
|
+
if (_$1.isFunction(slots.description)) {
|
10510
|
+
return createVNode("div", {
|
10511
|
+
"class": "bk-exception-description"
|
10512
|
+
}, [slots.description()]);
|
10513
|
+
}
|
10514
|
+
if (props2.description) {
|
10515
|
+
return createVNode("div", {
|
10516
|
+
"class": "bk-exception-description"
|
10517
|
+
}, [props2.description]);
|
10518
|
+
}
|
10519
|
+
return null;
|
10520
|
+
};
|
10521
|
+
const renderFooter = () => {
|
10522
|
+
if (_$1.isFunction(slots.default)) {
|
10523
|
+
return createVNode("div", {
|
10524
|
+
"class": "bk-exception-footer"
|
10525
|
+
}, [slots.default()]);
|
10526
|
+
}
|
10527
|
+
return null;
|
10528
|
+
};
|
10529
|
+
return () => {
|
10530
|
+
const rootClass = classes({
|
10531
|
+
"bk-exception": true,
|
10532
|
+
[`bk-exception-${props2.scene}`]: true
|
10533
|
+
});
|
10534
|
+
return createVNode("div", {
|
10535
|
+
"class": rootClass
|
10536
|
+
}, [renderImg(), renderTitle(), renderDescription(), renderFooter()]);
|
10471
10537
|
};
|
10472
10538
|
}
|
10473
10539
|
});
|
@@ -13303,7 +13369,6 @@ const useRadio = () => {
|
|
13303
13369
|
props: props2,
|
13304
13370
|
emit
|
13305
13371
|
} = currentInstance;
|
13306
|
-
const formItem = useFormItem();
|
13307
13372
|
const radioGroup = inject(radioGroupKey, EMPTY_OBJ);
|
13308
13373
|
const isGroup = !isEmptyObj(radioGroup);
|
13309
13374
|
const isChecked = ref(false);
|
@@ -13333,7 +13398,6 @@ const useRadio = () => {
|
|
13333
13398
|
isChecked.value = value;
|
13334
13399
|
};
|
13335
13400
|
const handleChange = (event) => {
|
13336
|
-
var _a;
|
13337
13401
|
if (isDisabled.value) {
|
13338
13402
|
return;
|
13339
13403
|
}
|
@@ -13345,7 +13409,6 @@ const useRadio = () => {
|
|
13345
13409
|
if (isGroup) {
|
13346
13410
|
radioGroup.handleChange(currentInstance.proxy);
|
13347
13411
|
}
|
13348
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
13349
13412
|
nextTick(() => {
|
13350
13413
|
if ($targetInput.checked !== isChecked.value) {
|
13351
13414
|
$targetInput.checked = isChecked.value;
|
@@ -13487,13 +13550,15 @@ var RadioButton = defineComponent({
|
|
13487
13550
|
const radioGroupProps = {
|
13488
13551
|
name: PropTypes.string.def(""),
|
13489
13552
|
modelValue: PropTypes.oneOfType([String, Number, Boolean]),
|
13490
|
-
disabled: PropTypes.bool
|
13553
|
+
disabled: PropTypes.bool,
|
13554
|
+
withValidate: PropTypes.bool.def(true)
|
13491
13555
|
};
|
13492
13556
|
var RadioGroup = defineComponent({
|
13493
13557
|
name: "RadioGroup",
|
13494
13558
|
props: radioGroupProps,
|
13495
13559
|
emits: ["change", "update:modelValue"],
|
13496
13560
|
setup(props2, context) {
|
13561
|
+
const formItem = useFormItem();
|
13497
13562
|
const radioInstanceList = [];
|
13498
13563
|
const register = (radioContext) => {
|
13499
13564
|
radioInstanceList.push(radioContext);
|
@@ -13520,6 +13585,12 @@ var RadioGroup = defineComponent({
|
|
13520
13585
|
unregister,
|
13521
13586
|
handleChange
|
13522
13587
|
});
|
13588
|
+
watch(() => props2.modelValue, () => {
|
13589
|
+
var _a;
|
13590
|
+
if (props2.withValidate) {
|
13591
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
13592
|
+
}
|
13593
|
+
});
|
13523
13594
|
onMounted(() => {
|
13524
13595
|
if (props2.modelValue === "") {
|
13525
13596
|
return;
|
@@ -13607,7 +13678,8 @@ var Component$m = defineComponent({
|
|
13607
13678
|
props: {
|
13608
13679
|
modelValue: PropTypes.number.def(0),
|
13609
13680
|
size: PropTypes.size(),
|
13610
|
-
editable: PropTypes.bool.def(true)
|
13681
|
+
editable: PropTypes.bool.def(true),
|
13682
|
+
withValidate: PropTypes.bool.def(true)
|
13611
13683
|
},
|
13612
13684
|
emits: ["change", "update:modelValue"],
|
13613
13685
|
setup(props2, {
|
@@ -13616,12 +13688,10 @@ var Component$m = defineComponent({
|
|
13616
13688
|
const formItem = useFormItem();
|
13617
13689
|
const hoverRate = ref(0);
|
13618
13690
|
const chooseRate = (val) => {
|
13619
|
-
var _a;
|
13620
13691
|
if (!props2.editable)
|
13621
13692
|
return;
|
13622
13693
|
emit("update:modelValue", val);
|
13623
13694
|
emit("change", val);
|
13624
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
13625
13695
|
};
|
13626
13696
|
const changeHover = (val) => {
|
13627
13697
|
hoverRate.value = val;
|
@@ -13655,6 +13725,12 @@ var Component$m = defineComponent({
|
|
13655
13725
|
width: rateSize.width,
|
13656
13726
|
height: rateSize.height
|
13657
13727
|
};
|
13728
|
+
watch(() => props2.modelValue, () => {
|
13729
|
+
var _a;
|
13730
|
+
if (props2.withValidate) {
|
13731
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
13732
|
+
}
|
13733
|
+
});
|
13658
13734
|
return () => createVNode("p", {
|
13659
13735
|
"class": rateClass
|
13660
13736
|
}, [props2.editable ? createVNode(star, mergeProps({
|
@@ -14184,7 +14260,7 @@ var SelectTagInput = defineComponent({
|
|
14184
14260
|
allowCreate: PropTypes.bool.def(false),
|
14185
14261
|
modelValue: PropTypes.any
|
14186
14262
|
},
|
14187
|
-
emits: ["update:modelValue", "remove", "
|
14263
|
+
emits: ["update:modelValue", "remove", "enter"],
|
14188
14264
|
setup(props2, {
|
14189
14265
|
emit
|
14190
14266
|
}) {
|
@@ -14200,9 +14276,6 @@ var SelectTagInput = defineComponent({
|
|
14200
14276
|
const handleRemoveTag = (val) => {
|
14201
14277
|
emit("remove", val);
|
14202
14278
|
};
|
14203
|
-
const handleFocus = () => {
|
14204
|
-
emit("focus");
|
14205
|
-
};
|
14206
14279
|
const focus = () => {
|
14207
14280
|
var _a;
|
14208
14281
|
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
@@ -14223,7 +14296,6 @@ var SelectTagInput = defineComponent({
|
|
14223
14296
|
value,
|
14224
14297
|
inputRef,
|
14225
14298
|
handleRemoveTag,
|
14226
|
-
handleFocus,
|
14227
14299
|
focus,
|
14228
14300
|
handleInput,
|
14229
14301
|
handleKeydown,
|
@@ -14243,17 +14315,16 @@ var SelectTagInput = defineComponent({
|
|
14243
14315
|
}, _isSlot$5(_slot = this.handleGetLabelByValue(item)) ? _slot : {
|
14244
14316
|
default: () => [_slot]
|
14245
14317
|
});
|
14246
|
-
}),
|
14318
|
+
}), createVNode("input", {
|
14247
14319
|
"class": "bk-select-tag-input",
|
14248
14320
|
"ref": "inputRef",
|
14249
14321
|
"type": "text",
|
14250
14322
|
"placeholder": !this.selected.length ? this.placeholder : "",
|
14251
14323
|
"readonly": !this.filterable,
|
14252
|
-
"
|
14253
|
-
"onFocus": this.handleFocus,
|
14324
|
+
"value": !this.filterable ? "" : this.value,
|
14254
14325
|
"onInput": this.handleInput,
|
14255
14326
|
"onKeydown": this.handleKeydown
|
14256
|
-
}, null),
|
14327
|
+
}, null), (_d = (_c = this.$slots) == null ? void 0 : _c.suffix) == null ? void 0 : _d.call(_c)]);
|
14257
14328
|
}
|
14258
14329
|
});
|
14259
14330
|
var Component$j = defineComponent({
|
@@ -14282,6 +14353,7 @@ var Component$j = defineComponent({
|
|
14282
14353
|
noMatchText: PropTypes.string.def("\u65E0\u5339\u914D\u6570\u636E"),
|
14283
14354
|
loadingText: PropTypes.string.def("\u52A0\u8F7D\u4E2D..."),
|
14284
14355
|
placeholder: PropTypes.string.def("\u8BF7\u9009\u62E9"),
|
14356
|
+
searchPlaceholder: PropTypes.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),
|
14285
14357
|
selectAllText: PropTypes.string.def("\u5168\u90E8"),
|
14286
14358
|
scrollLoading: PropTypes.bool.def(false),
|
14287
14359
|
allowCreate: PropTypes.bool.def(false),
|
@@ -14290,7 +14362,9 @@ var Component$j = defineComponent({
|
|
14290
14362
|
list: PropTypes.array.def([]),
|
14291
14363
|
idKey: PropTypes.string.def("value"),
|
14292
14364
|
displayKey: PropTypes.string.def("label"),
|
14293
|
-
|
14365
|
+
withValidate: PropTypes.bool.def(true),
|
14366
|
+
showSelectedIcon: PropTypes.bool.def(true),
|
14367
|
+
inputSearch: PropTypes.bool.def(true)
|
14294
14368
|
},
|
14295
14369
|
emits: ["update:modelValue", "change", "toggle", "clear", "scroll-end", "focus", "blur"],
|
14296
14370
|
setup(props2, {
|
@@ -14311,11 +14385,14 @@ var Component$j = defineComponent({
|
|
14311
14385
|
multipleMode,
|
14312
14386
|
allowCreate,
|
14313
14387
|
customContent,
|
14314
|
-
showSelectedIcon
|
14388
|
+
showSelectedIcon,
|
14389
|
+
inputSearch
|
14315
14390
|
} = toRefs(props2);
|
14316
14391
|
const formItem = useFormItem();
|
14317
14392
|
const inputRef = ref();
|
14318
14393
|
const triggerRef = ref();
|
14394
|
+
const contentRef = ref();
|
14395
|
+
const searchRef = ref();
|
14319
14396
|
const selectTagInputRef = ref();
|
14320
14397
|
const optionsMap = ref(/* @__PURE__ */ new Map());
|
14321
14398
|
const options = computed(() => [...optionsMap.value.values()]);
|
@@ -14323,7 +14400,11 @@ var Component$j = defineComponent({
|
|
14323
14400
|
const selected = ref([]);
|
14324
14401
|
const activeOptionValue = ref();
|
14325
14402
|
watch(modelValue, () => {
|
14403
|
+
var _a;
|
14326
14404
|
handleSetSelectedData();
|
14405
|
+
if (props2.withValidate) {
|
14406
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
14407
|
+
}
|
14327
14408
|
}, {
|
14328
14409
|
deep: true
|
14329
14410
|
});
|
@@ -14369,13 +14450,17 @@ var Component$j = defineComponent({
|
|
14369
14450
|
cancelHover
|
14370
14451
|
} = useHover();
|
14371
14452
|
const isFocus = ref(false);
|
14372
|
-
const handleFocus = (
|
14453
|
+
const handleFocus = () => {
|
14454
|
+
if (isFocus.value)
|
14455
|
+
return;
|
14373
14456
|
isFocus.value = true;
|
14374
|
-
emit("focus"
|
14457
|
+
emit("focus");
|
14375
14458
|
};
|
14376
14459
|
const handleBlur = () => {
|
14377
|
-
isFocus.value
|
14460
|
+
if (!isFocus.value)
|
14461
|
+
return;
|
14378
14462
|
isFocus.value = false;
|
14463
|
+
emit("blur");
|
14379
14464
|
};
|
14380
14465
|
const {
|
14381
14466
|
popperWidth,
|
@@ -14386,12 +14471,12 @@ var Component$j = defineComponent({
|
|
14386
14471
|
} = usePopover({
|
14387
14472
|
popoverMinWidth: popoverMinWidth.value
|
14388
14473
|
}, triggerRef);
|
14389
|
-
const isInput = computed(() => (filterable.value || allowCreate.value) && isPopoverShow.value);
|
14474
|
+
const isInput = computed(() => (filterable.value && inputSearch.value || allowCreate.value) && isPopoverShow.value);
|
14390
14475
|
watch(isPopoverShow, (isShow) => {
|
14391
14476
|
if (!isShow) {
|
14392
14477
|
searchKey.value = "";
|
14393
14478
|
} else {
|
14394
|
-
|
14479
|
+
focusInput();
|
14395
14480
|
initActiveOptionValue();
|
14396
14481
|
}
|
14397
14482
|
});
|
@@ -14418,16 +14503,15 @@ var Component$j = defineComponent({
|
|
14418
14503
|
searchLoading
|
14419
14504
|
} = useRemoteSearch(isRemoteSearch.value ? remoteMethod.value : defaultSearchMethod, initActiveOptionValue);
|
14420
14505
|
const emitChange = (val) => {
|
14421
|
-
var _a;
|
14422
14506
|
if (val === modelValue.value)
|
14423
14507
|
return;
|
14424
14508
|
emit("change", val, modelValue.value);
|
14425
14509
|
emit("update:modelValue", val, modelValue.value);
|
14426
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
14427
14510
|
};
|
14428
14511
|
const handleTogglePopover = () => {
|
14429
14512
|
if (isDisabled.value)
|
14430
14513
|
return;
|
14514
|
+
handleFocus();
|
14431
14515
|
togglePopover();
|
14432
14516
|
emit("toggle", isPopoverShow.value);
|
14433
14517
|
};
|
@@ -14482,15 +14566,21 @@ var Component$j = defineComponent({
|
|
14482
14566
|
emitChange(option.value);
|
14483
14567
|
hidePopover();
|
14484
14568
|
}
|
14485
|
-
|
14569
|
+
focusInput();
|
14486
14570
|
};
|
14487
|
-
const
|
14488
|
-
|
14489
|
-
|
14490
|
-
(
|
14491
|
-
|
14492
|
-
|
14493
|
-
|
14571
|
+
const focusInput = () => {
|
14572
|
+
setTimeout(() => {
|
14573
|
+
var _a, _b, _c;
|
14574
|
+
if (!inputSearch.value && !allowCreate.value) {
|
14575
|
+
(_a = searchRef.value) == null ? void 0 : _a.focus();
|
14576
|
+
} else {
|
14577
|
+
if (multipleMode.value === "tag") {
|
14578
|
+
(_b = selectTagInputRef.value) == null ? void 0 : _b.focus();
|
14579
|
+
} else {
|
14580
|
+
(_c = inputRef.value) == null ? void 0 : _c.focus();
|
14581
|
+
}
|
14582
|
+
}
|
14583
|
+
}, 0);
|
14494
14584
|
};
|
14495
14585
|
const handleClear = (e) => {
|
14496
14586
|
e.stopPropagation();
|
@@ -14516,7 +14606,7 @@ var Component$j = defineComponent({
|
|
14516
14606
|
});
|
14517
14607
|
}
|
14518
14608
|
emitChange(selected.value.map((item) => item.value));
|
14519
|
-
|
14609
|
+
focusInput();
|
14520
14610
|
};
|
14521
14611
|
const handleScroll = (e) => {
|
14522
14612
|
const {
|
@@ -14554,6 +14644,8 @@ var Component$j = defineComponent({
|
|
14554
14644
|
};
|
14555
14645
|
const handleKeydown = (e) => {
|
14556
14646
|
var _a, _b;
|
14647
|
+
if (!triggerRef.value.contains(e.target) && !contentRef.value.contains(e.target))
|
14648
|
+
return;
|
14557
14649
|
const availableOptions = options.value.filter((option) => !option.disabled && option.visible);
|
14558
14650
|
const index = availableOptions.findIndex((option) => option.value === activeOptionValue.value);
|
14559
14651
|
if (!availableOptions.length || index === -1)
|
@@ -14572,7 +14664,7 @@ var Component$j = defineComponent({
|
|
14572
14664
|
break;
|
14573
14665
|
}
|
14574
14666
|
case "Backspace": {
|
14575
|
-
if (!multiple.value || !selected.value.length || searchKey.value.length)
|
14667
|
+
if (!multiple.value || !selected.value.length || searchKey.value.length || e.target === searchRef.value)
|
14576
14668
|
return;
|
14577
14669
|
selected.value.pop();
|
14578
14670
|
emitChange(selected.value.map((item) => item.value));
|
@@ -14618,6 +14710,10 @@ var Component$j = defineComponent({
|
|
14618
14710
|
setTimeout(() => {
|
14619
14711
|
showOnInit.value && showPopover();
|
14620
14712
|
});
|
14713
|
+
on$2(document, "keydown", handleKeydown);
|
14714
|
+
});
|
14715
|
+
onBeforeMount(() => {
|
14716
|
+
off$2(document, "keydown", handleKeydown);
|
14621
14717
|
});
|
14622
14718
|
return {
|
14623
14719
|
selected,
|
@@ -14630,6 +14726,8 @@ var Component$j = defineComponent({
|
|
14630
14726
|
popperWidth,
|
14631
14727
|
inputRef,
|
14632
14728
|
triggerRef,
|
14729
|
+
contentRef,
|
14730
|
+
searchRef,
|
14633
14731
|
selectTagInputRef,
|
14634
14732
|
searchLoading,
|
14635
14733
|
isOptionsEmpty,
|
@@ -14642,6 +14740,7 @@ var Component$j = defineComponent({
|
|
14642
14740
|
setHover,
|
14643
14741
|
cancelHover,
|
14644
14742
|
handleFocus,
|
14743
|
+
handleBlur,
|
14645
14744
|
handleTogglePopover,
|
14646
14745
|
handleClear,
|
14647
14746
|
hidePopover,
|
@@ -14706,7 +14805,6 @@ var Component$j = defineComponent({
|
|
14706
14805
|
"tagTheme": this.tagTheme,
|
14707
14806
|
"placeholder": this.placeholder,
|
14708
14807
|
"filterable": this.isInput,
|
14709
|
-
"onFocus": this.handleFocus,
|
14710
14808
|
"onRemove": this.handleDeleteTag,
|
14711
14809
|
"onEnter": this.handleInputEnter
|
14712
14810
|
}, {
|
@@ -14727,10 +14825,8 @@ var Component$j = defineComponent({
|
|
14727
14825
|
"disabled": this.isDisabled,
|
14728
14826
|
"behavior": this.behavior,
|
14729
14827
|
"size": this.size,
|
14730
|
-
"onFocus": this.handleFocus,
|
14731
14828
|
"onInput": this.handleInputChange,
|
14732
|
-
"onEnter": this.handleInputEnter
|
14733
|
-
"onKeydown": (_2, e) => this.handleKeydown(e)
|
14829
|
+
"onEnter": this.handleInputEnter
|
14734
14830
|
}, {
|
14735
14831
|
prefix: () => {
|
14736
14832
|
var _a, _b;
|
@@ -14744,14 +14840,25 @@ var Component$j = defineComponent({
|
|
14744
14840
|
"ref": "triggerRef",
|
14745
14841
|
"onClick": this.handleTogglePopover,
|
14746
14842
|
"onMouseenter": this.setHover,
|
14747
|
-
"onMouseleave": this.cancelHover
|
14748
|
-
"onKeydown": this.handleKeydown
|
14843
|
+
"onMouseleave": this.cancelHover
|
14749
14844
|
}, [renderTriggerInput()]);
|
14750
14845
|
const renderSelectContent = () => {
|
14751
14846
|
var _a, _b;
|
14752
14847
|
return createVNode("div", {
|
14753
|
-
"class": "bk-select-content"
|
14754
|
-
|
14848
|
+
"class": "bk-select-content",
|
14849
|
+
"ref": "contentRef"
|
14850
|
+
}, [this.filterable && !this.inputSearch && createVNode("div", {
|
14851
|
+
"class": "bk-select-search-wrapper"
|
14852
|
+
}, [createVNode(search, {
|
14853
|
+
"class": "icon-search",
|
14854
|
+
"width": 16,
|
14855
|
+
"height": 16
|
14856
|
+
}, null), withDirectives(createVNode("input", {
|
14857
|
+
"ref": "searchRef",
|
14858
|
+
"class": "bk-select-search-input",
|
14859
|
+
"placeholder": this.searchPlaceholder,
|
14860
|
+
"onUpdate:modelValue": ($event) => this.searchKey = $event
|
14861
|
+
}, null), [[vModelText, this.searchKey]])]), !this.isShowSelectContent && createVNode("div", {
|
14755
14862
|
"class": "bk-select-empty"
|
14756
14863
|
}, [this.searchLoading && createVNode(BkLoading, {
|
14757
14864
|
"class": "mr5",
|
@@ -15082,7 +15189,8 @@ var Component$g = defineComponent({
|
|
15082
15189
|
trueValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(true),
|
15083
15190
|
falseValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false),
|
15084
15191
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false),
|
15085
|
-
modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false)
|
15192
|
+
modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]).def(false),
|
15193
|
+
withValidate: PropTypes.bool.def(true)
|
15086
15194
|
},
|
15087
15195
|
emits: ["update:modelValue", "change"],
|
15088
15196
|
setup(props2, {
|
@@ -15113,7 +15221,11 @@ var Component$g = defineComponent({
|
|
15113
15221
|
return cls;
|
15114
15222
|
});
|
15115
15223
|
watch(() => props2.modelValue, () => {
|
15224
|
+
var _a;
|
15116
15225
|
isModelValue.value = true;
|
15226
|
+
if (props2.withValidate) {
|
15227
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
15228
|
+
}
|
15117
15229
|
});
|
15118
15230
|
watch(() => props2.value, () => {
|
15119
15231
|
isModelValue.value = false;
|
@@ -15127,10 +15239,8 @@ var Component$g = defineComponent({
|
|
15127
15239
|
const lastValue = isChecked.value ? props2.falseValue : props2.trueValue;
|
15128
15240
|
const lastChecked = !isChecked.value;
|
15129
15241
|
const trigger = () => {
|
15130
|
-
var _a;
|
15131
15242
|
emit("update:modelValue", lastValue);
|
15132
15243
|
emit("change", lastChecked);
|
15133
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
15134
15244
|
};
|
15135
15245
|
let goodJob = true;
|
15136
15246
|
if (typeof props2.beforeChange === "function") {
|
@@ -15472,7 +15582,7 @@ var EMITEVENTS = /* @__PURE__ */ ((EMITEVENTS2) => {
|
|
15472
15582
|
EMITEVENTS2["COLUMN_SORT"] = "columnSort";
|
15473
15583
|
EMITEVENTS2["COLUMN_FILTER"] = "columnFilter";
|
15474
15584
|
EMITEVENTS2["ROW_CLICK"] = "rowClick";
|
15475
|
-
EMITEVENTS2["ROW_DBL_CLICK"] = "
|
15585
|
+
EMITEVENTS2["ROW_DBL_CLICK"] = "rowDblclick";
|
15476
15586
|
EMITEVENTS2["ROW_EXPAND_CLICK"] = "rowExpand";
|
15477
15587
|
EMITEVENTS2["PAGE_LIMIT_CHANGE"] = "pageLimitChange";
|
15478
15588
|
EMITEVENTS2["PAGE_VALUE_CHANGE"] = "pageValueChange";
|
@@ -15486,7 +15596,7 @@ const EMIT_EVENT_TYPES = {
|
|
15486
15596
|
["columnFilter"]: EMPTY$1,
|
15487
15597
|
["columnSort"]: EMPTY$1,
|
15488
15598
|
["rowClick"]: EMPTY$1,
|
15489
|
-
["
|
15599
|
+
["rowDblclick"]: EMPTY$1,
|
15490
15600
|
["rowExpand"]: EMPTY$1,
|
15491
15601
|
["pageLimitChange"]: EMPTY$1,
|
15492
15602
|
["pageValueChange"]: EMPTY$1,
|
@@ -16155,19 +16265,13 @@ var BodyEmpty = defineComponent({
|
|
16155
16265
|
emptyText: PropTypes.string.def("\u6682\u65E0\u6570\u636E")
|
16156
16266
|
},
|
16157
16267
|
emits: ["change"],
|
16158
|
-
setup(props2
|
16159
|
-
slots
|
16160
|
-
}) {
|
16268
|
+
setup(props2) {
|
16161
16269
|
const type = computed(() => props2.list.length === 0 ? "empty" : "search-empty");
|
16162
16270
|
return () => createVNode(BkException, {
|
16163
16271
|
"scene": "part",
|
16164
|
-
"type": type.value
|
16165
|
-
|
16166
|
-
|
16167
|
-
var _a, _b;
|
16168
|
-
return [(_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : props2.emptyText];
|
16169
|
-
}
|
16170
|
-
});
|
16272
|
+
"type": type.value,
|
16273
|
+
"description": props2.emptyText
|
16274
|
+
}, null);
|
16171
16275
|
}
|
16172
16276
|
});
|
16173
16277
|
const resolvePropVal = (prop, key2, args) => {
|
@@ -16918,14 +17022,14 @@ class TableRender {
|
|
16918
17022
|
Object.assign(this.props.pagination, {
|
16919
17023
|
limit
|
16920
17024
|
});
|
16921
|
-
this.context.emit(
|
17025
|
+
this.context.emit(EMITEVENTS.PAGE_LIMIT_CHANGE, limit);
|
16922
17026
|
}
|
16923
17027
|
hanlePageChange(current) {
|
16924
17028
|
Object.assign(this.props.pagination, {
|
16925
17029
|
current,
|
16926
17030
|
value: current
|
16927
17031
|
});
|
16928
|
-
this.context.emit(
|
17032
|
+
this.context.emit(EMITEVENTS.PAGE_VALUE_CHANGE, current);
|
16929
17033
|
}
|
16930
17034
|
setColumnActive(index, single = false) {
|
16931
17035
|
const col = this.propActiveCols.find((item) => item.index === index);
|
@@ -16943,7 +17047,7 @@ class TableRender {
|
|
16943
17047
|
handleColumnHeadClick(index) {
|
16944
17048
|
if (this.props.columnPick !== "disabled") {
|
16945
17049
|
this.setColumnActive(index, this.props.columnPick === "single");
|
16946
|
-
this.context.emit(
|
17050
|
+
this.context.emit(EMITEVENTS.COLUMN_PICK, this.propActiveCols);
|
16947
17051
|
}
|
16948
17052
|
}
|
16949
17053
|
getSortCell(column, index) {
|
@@ -17098,10 +17202,10 @@ class TableRender {
|
|
17098
17202
|
}
|
17099
17203
|
}
|
17100
17204
|
handleRowClick(e, row, index, rows) {
|
17101
|
-
this.context.emit(
|
17205
|
+
this.context.emit(EMITEVENTS.ROW_CLICK, e, row, index, rows, this);
|
17102
17206
|
}
|
17103
17207
|
handleRowDblClick(e, row, index, rows) {
|
17104
|
-
this.context.emit(
|
17208
|
+
this.context.emit(EMITEVENTS.ROW_DBL_CLICK, e, row, index, rows, this);
|
17105
17209
|
}
|
17106
17210
|
getExpandCell(row) {
|
17107
17211
|
const isExpand = !!row[TABLE_ROW_ATTRIBUTE.ROW_EXPAND];
|
@@ -17808,11 +17912,9 @@ function useFlatList(props2) {
|
|
17808
17912
|
displayKey,
|
17809
17913
|
list
|
17810
17914
|
} = toRefs(props2);
|
17811
|
-
const
|
17812
|
-
flatList: []
|
17813
|
-
});
|
17915
|
+
const flatList = reactive([]);
|
17814
17916
|
watch([useGroup, saveKey, displayKey, list], () => {
|
17815
|
-
|
17917
|
+
flatList.splice(0, flatList.length);
|
17816
17918
|
let formatList = list.value;
|
17817
17919
|
if (useGroup.value) {
|
17818
17920
|
formatList = list.value.reduce((formatList2, item) => {
|
@@ -17828,9 +17930,17 @@ function useFlatList(props2) {
|
|
17828
17930
|
return formatList2.concat(children);
|
17829
17931
|
}, []);
|
17830
17932
|
}
|
17831
|
-
|
17933
|
+
appendToTargetList(formatList);
|
17832
17934
|
}, { immediate: true, deep: true });
|
17833
|
-
|
17935
|
+
function appendToTargetList(targetList) {
|
17936
|
+
const QUANTUM = 3e4;
|
17937
|
+
const len = targetList.length;
|
17938
|
+
for (let i2 = 0; i2 < len; i2 += QUANTUM) {
|
17939
|
+
const appendList = targetList.slice(i2, Math.min(i2 + QUANTUM, len));
|
17940
|
+
flatList.push(...appendList);
|
17941
|
+
}
|
17942
|
+
}
|
17943
|
+
return flatList;
|
17834
17944
|
}
|
17835
17945
|
const getCharLength = (str) => {
|
17836
17946
|
const len = str.length;
|
@@ -17917,6 +18027,10 @@ const tagProps = () => ({
|
|
17917
18027
|
pasteFn: {
|
17918
18028
|
type: Function,
|
17919
18029
|
default: null
|
18030
|
+
},
|
18031
|
+
withValidate: {
|
18032
|
+
type: Boolean,
|
18033
|
+
default: true
|
17920
18034
|
}
|
17921
18035
|
});
|
17922
18036
|
var TagRender = defineComponent({
|
@@ -17992,7 +18106,13 @@ var Component$c = defineComponent({
|
|
17992
18106
|
disabled: props2.disabled
|
17993
18107
|
}));
|
17994
18108
|
watch([() => [...props2.modelValue], () => [...props2.list]], () => {
|
17995
|
-
|
18109
|
+
var _a;
|
18110
|
+
nextTick(() => {
|
18111
|
+
initData();
|
18112
|
+
});
|
18113
|
+
if (props2.withValidate) {
|
18114
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
18115
|
+
}
|
17996
18116
|
});
|
17997
18117
|
watch(curInputValue, lodash.exports.debounce(() => {
|
17998
18118
|
const hasShowCount = pageState.curPageList.length !== 0;
|
@@ -18286,11 +18406,9 @@ var Component$c = defineComponent({
|
|
18286
18406
|
tagInputRef.value.style.width = `${INPUT_MIN_WIDTH}px`;
|
18287
18407
|
};
|
18288
18408
|
const handleChange = (type, data2) => {
|
18289
|
-
var _a;
|
18290
18409
|
emit("change", tagList.value);
|
18291
18410
|
emit(type, data2);
|
18292
18411
|
emit("update:modelValue", tagList.value);
|
18293
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
18294
18412
|
};
|
18295
18413
|
const handleClear = (e) => {
|
18296
18414
|
e.stopPropagation();
|
@@ -23453,7 +23571,11 @@ const datePickerProps = {
|
|
23453
23571
|
return ["simplicity", "normal"].indexOf(v2) > -1;
|
23454
23572
|
}
|
23455
23573
|
},
|
23456
|
-
disableDate: Function
|
23574
|
+
disableDate: Function,
|
23575
|
+
withValidate: {
|
23576
|
+
type: Boolean,
|
23577
|
+
default: true
|
23578
|
+
}
|
23457
23579
|
};
|
23458
23580
|
var Component$9 = defineComponent({
|
23459
23581
|
name: "DatePicker",
|
@@ -23585,7 +23707,11 @@ var Component$9 = defineComponent({
|
|
23585
23707
|
});
|
23586
23708
|
const pickerDropdownRef = ref(null);
|
23587
23709
|
watch(() => props2.modelValue, (modelValue) => {
|
23710
|
+
var _a;
|
23588
23711
|
state.internalValue = parseDate(modelValue, props2.type, props2.multiple, props2.format);
|
23712
|
+
if (props2.withValidate) {
|
23713
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
23714
|
+
}
|
23589
23715
|
});
|
23590
23716
|
watch(() => props2.open, (open) => {
|
23591
23717
|
state.visible = open === true;
|
@@ -23659,17 +23785,15 @@ var Component$9 = defineComponent({
|
|
23659
23785
|
}
|
23660
23786
|
};
|
23661
23787
|
const handleInputMouseleave = (_e) => {
|
23662
|
-
console.log("handleInputMouseleave");
|
23663
23788
|
state.showClose = false;
|
23664
23789
|
};
|
23665
23790
|
const emitChange = (type) => {
|
23666
23791
|
nextTick(() => {
|
23667
|
-
var _a
|
23792
|
+
var _a;
|
23668
23793
|
emit("change", publicStringValue.value, type);
|
23669
23794
|
emit("update:modelValue", publicVModelValue.value);
|
23670
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
23671
23795
|
if (props2.type.indexOf("time") < 0) {
|
23672
|
-
(
|
23796
|
+
(_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.blur();
|
23673
23797
|
}
|
23674
23798
|
});
|
23675
23799
|
};
|
@@ -25580,30 +25704,12 @@ var Form = defineComponent({
|
|
25580
25704
|
}
|
25581
25705
|
});
|
25582
25706
|
var defaultValidator = {
|
25583
|
-
required: (value) =>
|
25584
|
-
|
25585
|
-
|
25586
|
-
},
|
25587
|
-
|
25588
|
-
|
25589
|
-
return value >= min2;
|
25590
|
-
},
|
25591
|
-
max: (value, max2) => {
|
25592
|
-
console.log("max");
|
25593
|
-
return max2 >= value;
|
25594
|
-
},
|
25595
|
-
email: (value) => {
|
25596
|
-
console.log("email");
|
25597
|
-
return /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(value);
|
25598
|
-
},
|
25599
|
-
maxlength: (value, maxlength) => {
|
25600
|
-
console.log("maxlength");
|
25601
|
-
return value.length <= maxlength;
|
25602
|
-
},
|
25603
|
-
pattern: (value, pattern) => {
|
25604
|
-
console.log("pattern");
|
25605
|
-
return pattern.test(value);
|
25606
|
-
}
|
25707
|
+
required: (value) => value !== "" && value !== void 0 && value !== null,
|
25708
|
+
min: (value, min2) => value >= min2,
|
25709
|
+
max: (value, max2) => max2 >= value,
|
25710
|
+
email: (value) => /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(value),
|
25711
|
+
maxlength: (value, maxlength) => value.length <= maxlength,
|
25712
|
+
pattern: (value, pattern) => pattern.test(value)
|
25607
25713
|
};
|
25608
25714
|
const formItemProps = {
|
25609
25715
|
label: PropTypes.string,
|
@@ -26092,9 +26198,10 @@ const BkDropdown = withInstallProps(Dropdown, { DropdownMenu, DropdownItem });
|
|
26092
26198
|
var CascaderPanel = defineComponent({
|
26093
26199
|
name: "CascaderPanel",
|
26094
26200
|
props: {
|
26095
|
-
store: PropTypes.object.def({})
|
26201
|
+
store: PropTypes.object.def({}),
|
26202
|
+
modelValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number).def([]), PropTypes.arrayOf(PropTypes.string).def([])])
|
26096
26203
|
},
|
26097
|
-
emits: ["
|
26204
|
+
emits: ["update:modelValue"],
|
26098
26205
|
setup(props2, {
|
26099
26206
|
emit
|
26100
26207
|
}) {
|
@@ -26106,24 +26213,25 @@ var CascaderPanel = defineComponent({
|
|
26106
26213
|
});
|
26107
26214
|
const activePath = ref([]);
|
26108
26215
|
const checkValue = ref([]);
|
26109
|
-
const
|
26110
|
-
if (
|
26111
|
-
|
26112
|
-
|
26113
|
-
checkValue.value = node.path;
|
26216
|
+
const updateCheckValue = (value) => {
|
26217
|
+
if (value.length === 0) {
|
26218
|
+
menus.list = menus.list.slice(0, 1);
|
26219
|
+
activePath.value = [];
|
26114
26220
|
}
|
26115
|
-
emit("input", checkValue.value);
|
26116
|
-
};
|
26117
|
-
const nodeClear = () => {
|
26118
|
-
emit("input", []);
|
26119
|
-
};
|
26120
|
-
const syncCheckedValue = (value) => {
|
26121
26221
|
value.forEach((id) => {
|
26122
26222
|
const node = store.getNodeById(id);
|
26123
26223
|
nodeExpandHandler(node);
|
26124
26224
|
});
|
26125
26225
|
checkValue.value = value;
|
26126
26226
|
};
|
26227
|
+
const nodeCheckHandler = (node) => {
|
26228
|
+
if (node.config.multiple) {
|
26229
|
+
checkValue.value = store.getCheckedNodes().map((node2) => node2.path);
|
26230
|
+
} else {
|
26231
|
+
checkValue.value = node.path;
|
26232
|
+
}
|
26233
|
+
emit("update:modelValue", checkValue.value);
|
26234
|
+
};
|
26127
26235
|
const nodeExpandHandler = (node) => {
|
26128
26236
|
var _a;
|
26129
26237
|
if (node.isDisabled)
|
@@ -26188,6 +26296,11 @@ var CascaderPanel = defineComponent({
|
|
26188
26296
|
}, null) : createVNode(angleRight, {
|
26189
26297
|
"class": "icon-angle-right"
|
26190
26298
|
}, null);
|
26299
|
+
watch(() => props2.modelValue, (value) => {
|
26300
|
+
updateCheckValue(value);
|
26301
|
+
}, {
|
26302
|
+
immediate: true
|
26303
|
+
});
|
26191
26304
|
return {
|
26192
26305
|
menus,
|
26193
26306
|
activePath,
|
@@ -26196,10 +26309,8 @@ var CascaderPanel = defineComponent({
|
|
26196
26309
|
nodeEvent,
|
26197
26310
|
isCheckedNode,
|
26198
26311
|
checkValue,
|
26199
|
-
nodeClear,
|
26200
26312
|
checkNode,
|
26201
|
-
iconRender
|
26202
|
-
syncCheckedValue
|
26313
|
+
iconRender
|
26203
26314
|
};
|
26204
26315
|
},
|
26205
26316
|
render() {
|
@@ -26359,13 +26470,18 @@ var Component$6 = defineComponent({
|
|
26359
26470
|
const panelShow = ref(false);
|
26360
26471
|
const selectedText = ref("");
|
26361
26472
|
const selectedTags = ref([]);
|
26362
|
-
const
|
26473
|
+
const {
|
26474
|
+
modelValue
|
26475
|
+
} = toRefs(props2);
|
26363
26476
|
const cascaderPanel = ref();
|
26364
|
-
|
26365
|
-
|
26477
|
+
const checkedValue = computed({
|
26478
|
+
get: () => modelValue.value,
|
26479
|
+
set: (value) => {
|
26480
|
+
emit("update:modelValue", value);
|
26481
|
+
}
|
26366
26482
|
});
|
26483
|
+
const popover3 = ref(null);
|
26367
26484
|
const updateValue = (val) => {
|
26368
|
-
cascaderPanel.value.syncCheckedValue(val);
|
26369
26485
|
if (multiple) {
|
26370
26486
|
selectedTags.value = store.getCheckedNodes().map((node) => ({
|
26371
26487
|
text: node.pathNames.join(separator2),
|
@@ -26380,17 +26496,13 @@ var Component$6 = defineComponent({
|
|
26380
26496
|
selectedText.value = node.pathNames.join(separator2);
|
26381
26497
|
}
|
26382
26498
|
};
|
26383
|
-
const inputChangeHandler = (val) => {
|
26384
|
-
updateValue(val);
|
26385
|
-
emit("update:modelValue", val);
|
26386
|
-
emit("change", val);
|
26387
|
-
};
|
26388
26499
|
const hidePopover = () => {
|
26389
26500
|
panelShow.value = false;
|
26390
26501
|
};
|
26391
26502
|
const handleClear = (e) => {
|
26392
26503
|
e.stopPropagation();
|
26393
26504
|
updateValue([]);
|
26505
|
+
emit("update:modelValue", []);
|
26394
26506
|
emit("clear", JSON.parse(JSON.stringify(props2.modelValue)));
|
26395
26507
|
};
|
26396
26508
|
const inputClickHandler = (e) => {
|
@@ -26404,6 +26516,15 @@ var Component$6 = defineComponent({
|
|
26404
26516
|
current.splice(index, 1);
|
26405
26517
|
updateValue(current);
|
26406
26518
|
};
|
26519
|
+
watch(() => props2.modelValue, (value) => {
|
26520
|
+
var _a;
|
26521
|
+
updateValue(value);
|
26522
|
+
(_a = popover3 == null ? void 0 : popover3.value) == null ? void 0 : _a.handlePopShow(false);
|
26523
|
+
emit("update:modelValue", value);
|
26524
|
+
emit("change", value);
|
26525
|
+
}, {
|
26526
|
+
immediate: true
|
26527
|
+
});
|
26407
26528
|
return {
|
26408
26529
|
store,
|
26409
26530
|
updateValue,
|
@@ -26415,10 +26536,10 @@ var Component$6 = defineComponent({
|
|
26415
26536
|
handleClear,
|
26416
26537
|
isHover,
|
26417
26538
|
setHover,
|
26539
|
+
popover: popover3,
|
26418
26540
|
cancelHover,
|
26419
26541
|
selectedTags,
|
26420
26542
|
removeTag,
|
26421
|
-
inputChangeHandler,
|
26422
26543
|
cascaderPanel
|
26423
26544
|
};
|
26424
26545
|
},
|
@@ -26452,7 +26573,8 @@ var Component$6 = defineComponent({
|
|
26452
26573
|
return createVNode("div", {
|
26453
26574
|
"class": ["bk-cascader", "bk-cascader-wrapper", this.extCls, {
|
26454
26575
|
"bk-is-show-panel": this.panelShow,
|
26455
|
-
"is-unselected": this.modelValue.length === 0
|
26576
|
+
"is-unselected": this.modelValue.length === 0,
|
26577
|
+
"is-hover": this.isHover
|
26456
26578
|
}],
|
26457
26579
|
"tabindex": "0",
|
26458
26580
|
"data-placeholder": this.placeholder,
|
@@ -26466,6 +26588,7 @@ var Component$6 = defineComponent({
|
|
26466
26588
|
"class": "bk-cascader-popover-wrapper",
|
26467
26589
|
"isShow": this.panelShow,
|
26468
26590
|
"onUpdate:isShow": ($event) => this.panelShow = $event,
|
26591
|
+
"ref": "popover",
|
26469
26592
|
"boundary": "body"
|
26470
26593
|
}, {
|
26471
26594
|
default: () => createVNode("div", {
|
@@ -26481,7 +26604,8 @@ var Component$6 = defineComponent({
|
|
26481
26604
|
}, [createVNode(CascaderPanel, {
|
26482
26605
|
"store": this.store,
|
26483
26606
|
"ref": "cascaderPanel",
|
26484
|
-
"
|
26607
|
+
"modelValue": this.checkedValue,
|
26608
|
+
"onUpdate:modelValue": ($event) => this.checkedValue = $event
|
26485
26609
|
}, null)])
|
26486
26610
|
})]);
|
26487
26611
|
}
|
@@ -27505,18 +27629,14 @@ var Component$2 = defineComponent({
|
|
27505
27629
|
}, {
|
27506
27630
|
content: "\u6B65\u9AA45"
|
27507
27631
|
}]);
|
27508
|
-
console.log("props.list", props2.list);
|
27509
27632
|
if ((_a = props2.list) == null ? void 0 : _a.length) {
|
27510
27633
|
defaultProcessList.value.splice(0, defaultProcessList.value.length, ...props2.list);
|
27511
27634
|
}
|
27512
27635
|
};
|
27513
27636
|
const jumpTo = async (index) => {
|
27514
|
-
console.log(index);
|
27515
27637
|
try {
|
27516
27638
|
if (props2.controllable && index !== props2.curProcess) {
|
27517
|
-
console.log(props2.curProcess);
|
27518
27639
|
emit("update:curProcess", index);
|
27519
|
-
console.log(props2.curProcess);
|
27520
27640
|
emit("click", index);
|
27521
27641
|
}
|
27522
27642
|
} catch (e) {
|
@@ -33386,7 +33506,8 @@ const colorPickerProps = {
|
|
33386
33506
|
size: PropTypes.size(["", "small", "large"]).def(""),
|
33387
33507
|
showValue: PropTypes.bool.def(true),
|
33388
33508
|
recommend: PropTypes.oneOfType([PropTypes.array.def(() => []), PropTypes.bool.def(true)]).def(true),
|
33389
|
-
extCls: PropTypes.string.def("")
|
33509
|
+
extCls: PropTypes.string.def(""),
|
33510
|
+
withValidate: PropTypes.bool.def(true)
|
33390
33511
|
};
|
33391
33512
|
const whiteColorObj = formatColor("#FFFFFF");
|
33392
33513
|
var Component = defineComponent({
|
@@ -33399,6 +33520,7 @@ var Component = defineComponent({
|
|
33399
33520
|
setup(props2, {
|
33400
33521
|
emit
|
33401
33522
|
}) {
|
33523
|
+
const formItem = useFormItem();
|
33402
33524
|
const showDropdown = ref(false);
|
33403
33525
|
const colorStr = ref("");
|
33404
33526
|
const colorObj = reactive(JSON.parse(JSON.stringify(whiteColorObj)));
|
@@ -33418,7 +33540,11 @@ var Component = defineComponent({
|
|
33418
33540
|
});
|
33419
33541
|
});
|
33420
33542
|
watch(() => props2.modelValue, () => {
|
33543
|
+
var _a;
|
33421
33544
|
changeColorFromProps();
|
33545
|
+
if (props2.withValidate) {
|
33546
|
+
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
|
33547
|
+
}
|
33422
33548
|
});
|
33423
33549
|
const handleTriggerKeydown = (e) => {
|
33424
33550
|
if (e.code === "Enter" || e.code === "NumpadEnter") {
|