bkui-vue 0.0.1-beta.54 → 0.0.1-beta.55
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 +12 -12
- package/dist/index.esm.js +173 -126
- package/dist/index.umd.js +16 -16
- package/dist/style.css +1 -1
- package/lib/dist.index.js +1 -0
- package/package.json +1 -2
package/dist/index.esm.js
CHANGED
@@ -34,6 +34,53 @@ var __publicField = (obj, key, value) => {
|
|
34
34
|
return value;
|
35
35
|
};
|
36
36
|
import { createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, Transition, getCurrentInstance, provide, inject, nextTick, isVNode, createTextVNode, Fragment, toRefs, customRef, onBeforeMount, withDirectives, vShow, toRef, unref, resolveDirective, vModelText, watchEffect, onUpdated, render, onUnmounted, Teleport } from "vue";
|
37
|
+
var reset = "";
|
38
|
+
var alert = "";
|
39
|
+
var backtop = "";
|
40
|
+
var badge = "";
|
41
|
+
var breadcrumb = "";
|
42
|
+
var button = "";
|
43
|
+
var card = "";
|
44
|
+
var checkbox = "";
|
45
|
+
var collapse = "";
|
46
|
+
var dialog = "";
|
47
|
+
var exception = "";
|
48
|
+
var fixedNavbar = "";
|
49
|
+
var input = "";
|
50
|
+
var link = "";
|
51
|
+
var dropdown = "";
|
52
|
+
var loading = "";
|
53
|
+
var modal = "";
|
54
|
+
var popover = "";
|
55
|
+
var progress = "";
|
56
|
+
var radio = "";
|
57
|
+
var rate = "";
|
58
|
+
var star$1 = "";
|
59
|
+
var swiper = "";
|
60
|
+
var select = "";
|
61
|
+
var sideslider = "";
|
62
|
+
var switcher = "";
|
63
|
+
var table = "";
|
64
|
+
var tag = "";
|
65
|
+
var form = "";
|
66
|
+
var steps = "";
|
67
|
+
var message = "";
|
68
|
+
var notify = "";
|
69
|
+
var tree = "";
|
70
|
+
var slider = "";
|
71
|
+
var menu = "";
|
72
|
+
var navigation = "";
|
73
|
+
var datePicker = "";
|
74
|
+
var divider = "";
|
75
|
+
var tab = "";
|
76
|
+
var process = "";
|
77
|
+
var virtualRender$1 = "";
|
78
|
+
var transfer = "";
|
79
|
+
var pagination = "";
|
80
|
+
var timeline = "";
|
81
|
+
var codeDiff = "";
|
82
|
+
var resizeLayout = "";
|
83
|
+
var tagInput = "";
|
37
84
|
const BKLAYERD_INDEX_EFAULT_VALUE = {
|
38
85
|
["bottom"]: 0,
|
39
86
|
["content"]: 1,
|
@@ -1830,11 +1877,11 @@ class BkMaskManager {
|
|
1830
1877
|
Object.entries(maskStyle).forEach((cfg) => this.mask.style.setProperty(cfg[0], cfg[1]));
|
1831
1878
|
}
|
1832
1879
|
}
|
1833
|
-
getMaskAttrTag(
|
1834
|
-
if (/^(auto|\s+)$/i.test(
|
1880
|
+
getMaskAttrTag(tag2) {
|
1881
|
+
if (/^(auto|\s+)$/i.test(tag2) || tag2 === null || tag2 === void 0 || tag2 === "") {
|
1835
1882
|
return `__bk_mask_${random(16)}`;
|
1836
1883
|
}
|
1837
|
-
return
|
1884
|
+
return tag2;
|
1838
1885
|
}
|
1839
1886
|
appendContentToMask(content) {
|
1840
1887
|
this.mask.append(content);
|
@@ -3910,20 +3957,20 @@ var lodash = { exports: {} };
|
|
3910
3957
|
return copyArray(value, result2);
|
3911
3958
|
}
|
3912
3959
|
} else {
|
3913
|
-
var
|
3960
|
+
var tag2 = getTag(value), isFunc = tag2 == funcTag || tag2 == genTag;
|
3914
3961
|
if (isBuffer(value)) {
|
3915
3962
|
return cloneBuffer(value, isDeep);
|
3916
3963
|
}
|
3917
|
-
if (
|
3964
|
+
if (tag2 == objectTag || tag2 == argsTag || isFunc && !object) {
|
3918
3965
|
result2 = isFlat || isFunc ? {} : initCloneObject(value);
|
3919
3966
|
if (!isDeep) {
|
3920
3967
|
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
|
3921
3968
|
}
|
3922
3969
|
} else {
|
3923
|
-
if (!cloneableTags[
|
3970
|
+
if (!cloneableTags[tag2]) {
|
3924
3971
|
return object ? value : {};
|
3925
3972
|
}
|
3926
|
-
result2 = initCloneByTag(value,
|
3973
|
+
result2 = initCloneByTag(value, tag2, isDeep);
|
3927
3974
|
}
|
3928
3975
|
}
|
3929
3976
|
stack || (stack = new Stack());
|
@@ -5218,11 +5265,11 @@ var lodash = { exports: {} };
|
|
5218
5265
|
};
|
5219
5266
|
function createToPairs(keysFunc) {
|
5220
5267
|
return function(object) {
|
5221
|
-
var
|
5222
|
-
if (
|
5268
|
+
var tag2 = getTag(object);
|
5269
|
+
if (tag2 == mapTag) {
|
5223
5270
|
return mapToArray(object);
|
5224
5271
|
}
|
5225
|
-
if (
|
5272
|
+
if (tag2 == setTag) {
|
5226
5273
|
return setToPairs(object);
|
5227
5274
|
}
|
5228
5275
|
return baseToPairs(object, keysFunc(object));
|
@@ -5342,8 +5389,8 @@ var lodash = { exports: {} };
|
|
5342
5389
|
stack["delete"](other);
|
5343
5390
|
return result2;
|
5344
5391
|
}
|
5345
|
-
function equalByTag(object, other,
|
5346
|
-
switch (
|
5392
|
+
function equalByTag(object, other, tag2, bitmask, customizer, equalFunc, stack) {
|
5393
|
+
switch (tag2) {
|
5347
5394
|
case dataViewTag:
|
5348
5395
|
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
5349
5396
|
return false;
|
@@ -5479,7 +5526,7 @@ var lodash = { exports: {} };
|
|
5479
5526
|
return baseIsNative(value) ? value : undefined$1;
|
5480
5527
|
}
|
5481
5528
|
function getRawTag(value) {
|
5482
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
5529
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag2 = value[symToStringTag];
|
5483
5530
|
try {
|
5484
5531
|
value[symToStringTag] = undefined$1;
|
5485
5532
|
var unmasked = true;
|
@@ -5488,7 +5535,7 @@ var lodash = { exports: {} };
|
|
5488
5535
|
var result2 = nativeObjectToString.call(value);
|
5489
5536
|
if (unmasked) {
|
5490
5537
|
if (isOwn) {
|
5491
|
-
value[symToStringTag] =
|
5538
|
+
value[symToStringTag] = tag2;
|
5492
5539
|
} else {
|
5493
5540
|
delete value[symToStringTag];
|
5494
5541
|
}
|
@@ -5585,9 +5632,9 @@ var lodash = { exports: {} };
|
|
5585
5632
|
function initCloneObject(object) {
|
5586
5633
|
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
5587
5634
|
}
|
5588
|
-
function initCloneByTag(object,
|
5635
|
+
function initCloneByTag(object, tag2, isDeep) {
|
5589
5636
|
var Ctor = object.constructor;
|
5590
|
-
switch (
|
5637
|
+
switch (tag2) {
|
5591
5638
|
case arrayBufferTag:
|
5592
5639
|
return cloneArrayBuffer(object);
|
5593
5640
|
case boolTag:
|
@@ -6468,8 +6515,8 @@ var lodash = { exports: {} };
|
|
6468
6515
|
if (isArrayLike(collection)) {
|
6469
6516
|
return isString(collection) ? stringSize(collection) : collection.length;
|
6470
6517
|
}
|
6471
|
-
var
|
6472
|
-
if (
|
6518
|
+
var tag2 = getTag(collection);
|
6519
|
+
if (tag2 == mapTag || tag2 == setTag) {
|
6473
6520
|
return collection.size;
|
6474
6521
|
}
|
6475
6522
|
return baseKeys(collection).length;
|
@@ -6807,8 +6854,8 @@ var lodash = { exports: {} };
|
|
6807
6854
|
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
6808
6855
|
return !value.length;
|
6809
6856
|
}
|
6810
|
-
var
|
6811
|
-
if (
|
6857
|
+
var tag2 = getTag(value);
|
6858
|
+
if (tag2 == mapTag || tag2 == setTag) {
|
6812
6859
|
return !value.size;
|
6813
6860
|
}
|
6814
6861
|
if (isPrototype(value)) {
|
@@ -6833,8 +6880,8 @@ var lodash = { exports: {} };
|
|
6833
6880
|
if (!isObjectLike(value)) {
|
6834
6881
|
return false;
|
6835
6882
|
}
|
6836
|
-
var
|
6837
|
-
return
|
6883
|
+
var tag2 = baseGetTag(value);
|
6884
|
+
return tag2 == errorTag || tag2 == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
|
6838
6885
|
}
|
6839
6886
|
function isFinite2(value) {
|
6840
6887
|
return typeof value == "number" && nativeIsFinite(value);
|
@@ -6843,8 +6890,8 @@ var lodash = { exports: {} };
|
|
6843
6890
|
if (!isObject2(value)) {
|
6844
6891
|
return false;
|
6845
6892
|
}
|
6846
|
-
var
|
6847
|
-
return
|
6893
|
+
var tag2 = baseGetTag(value);
|
6894
|
+
return tag2 == funcTag || tag2 == genTag || tag2 == asyncTag || tag2 == proxyTag;
|
6848
6895
|
}
|
6849
6896
|
function isInteger(value) {
|
6850
6897
|
return typeof value == "number" && value == toInteger2(value);
|
@@ -6931,7 +6978,7 @@ var lodash = { exports: {} };
|
|
6931
6978
|
if (symIterator && value[symIterator]) {
|
6932
6979
|
return iteratorToArray(value[symIterator]());
|
6933
6980
|
}
|
6934
|
-
var
|
6981
|
+
var tag2 = getTag(value), func = tag2 == mapTag ? mapToArray : tag2 == setTag ? setToArray : values;
|
6935
6982
|
return func(value);
|
6936
6983
|
}
|
6937
6984
|
function toFinite(value) {
|
@@ -9722,15 +9769,15 @@ const Circle = (_2, {
|
|
9722
9769
|
const radius = 50 - circleStrokeWidth / 2;
|
9723
9770
|
const isDashboard = type === "dashboard";
|
9724
9771
|
const len = Math.PI * 2 * radius;
|
9725
|
-
const
|
9726
|
-
const strokeDashoffset = `${-1 * len * (1 -
|
9772
|
+
const rate2 = isDashboard && 0.75 || 1;
|
9773
|
+
const strokeDashoffset = `${-1 * len * (1 - rate2) / 2}px`;
|
9727
9774
|
const transition = "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease";
|
9728
9775
|
const trailStyle = {
|
9729
|
-
strokeDasharray: `${len *
|
9776
|
+
strokeDasharray: `${len * rate2}px, ${len}px`,
|
9730
9777
|
strokeDashoffset
|
9731
9778
|
};
|
9732
9779
|
const pathStyle = {
|
9733
|
-
strokeDasharray: `${len *
|
9780
|
+
strokeDasharray: `${len * rate2 * (percent / 100)}px, ${len}px`,
|
9734
9781
|
strokeDashoffset,
|
9735
9782
|
transition
|
9736
9783
|
};
|
@@ -9881,11 +9928,11 @@ var Component$f = defineComponent({
|
|
9881
9928
|
const $props = __spreadProps(__spreadValues({}, this.$props), {
|
9882
9929
|
percent: this.validPercent(this.percent)
|
9883
9930
|
});
|
9884
|
-
let
|
9931
|
+
let progress2 = createVNode(Line, $props, _isSlot$3(progressInfo) ? progressInfo : {
|
9885
9932
|
default: () => [progressInfo]
|
9886
9933
|
});
|
9887
9934
|
if (this.type === "circle" || this.type === "dashboard") {
|
9888
|
-
|
9935
|
+
progress2 = createVNode(Circle, $props, _isSlot$3(progressInfo) ? progressInfo : {
|
9889
9936
|
default: () => [progressInfo]
|
9890
9937
|
});
|
9891
9938
|
}
|
@@ -9894,7 +9941,7 @@ var Component$f = defineComponent({
|
|
9894
9941
|
extCls: !!this.extCls
|
9895
9942
|
}, `bk-progress bk-progress-${this.type}`)
|
9896
9943
|
};
|
9897
|
-
return createVNode("div", progressProps, [
|
9944
|
+
return createVNode("div", progressProps, [progress2]);
|
9898
9945
|
}
|
9899
9946
|
});
|
9900
9947
|
const BkProgress = withInstall(Component$f);
|
@@ -10169,14 +10216,14 @@ var star = defineComponent({
|
|
10169
10216
|
const chooseRate = (index) => {
|
10170
10217
|
if (!props.editable)
|
10171
10218
|
return;
|
10172
|
-
const
|
10173
|
-
emit("chooseRate",
|
10219
|
+
const rate2 = index + 1;
|
10220
|
+
emit("chooseRate", rate2);
|
10174
10221
|
};
|
10175
10222
|
const changeHover = (index) => {
|
10176
10223
|
if (!props.editable)
|
10177
10224
|
return;
|
10178
|
-
const
|
10179
|
-
emit("changeHover",
|
10225
|
+
const rate2 = index + 1;
|
10226
|
+
emit("changeHover", rate2);
|
10180
10227
|
};
|
10181
10228
|
const starClass = (index) => classes({
|
10182
10229
|
"bk-is-select": index < Math.floor(displayRate.value),
|
@@ -10338,10 +10385,10 @@ var Component$c = defineComponent({
|
|
10338
10385
|
swiperIndex.value = showIndex;
|
10339
10386
|
emit("index-change", showIndex);
|
10340
10387
|
};
|
10341
|
-
const goToLink = (
|
10342
|
-
if (!
|
10388
|
+
const goToLink = (link2) => {
|
10389
|
+
if (!link2)
|
10343
10390
|
return;
|
10344
|
-
window.open(
|
10391
|
+
window.open(link2, "_blank");
|
10345
10392
|
};
|
10346
10393
|
const getRenderItemClass = (renderData) => ["bk-swiper-img", {
|
10347
10394
|
"bk-swiper-link": renderData.link
|
@@ -10566,21 +10613,21 @@ var BkOption = defineComponent({
|
|
10566
10613
|
const {
|
10567
10614
|
disabled
|
10568
10615
|
} = toRefs(props);
|
10569
|
-
const
|
10616
|
+
const select2 = inject(selectKey, null);
|
10570
10617
|
const group = inject(optionGroupKey, null);
|
10571
|
-
const selected = computed(() =>
|
10572
|
-
const multiple = computed(() =>
|
10618
|
+
const selected = computed(() => select2.selectedOptions.has(proxy));
|
10619
|
+
const multiple = computed(() => select2 == null ? void 0 : select2.props.multiple);
|
10573
10620
|
const handleOptionClick = () => {
|
10574
10621
|
if (disabled.value)
|
10575
10622
|
return;
|
10576
|
-
|
10623
|
+
select2 == null ? void 0 : select2.handleOptionSelected(proxy);
|
10577
10624
|
};
|
10578
10625
|
onBeforeMount(() => {
|
10579
|
-
|
10626
|
+
select2 == null ? void 0 : select2.register(proxy);
|
10580
10627
|
group == null ? void 0 : group.register(proxy);
|
10581
10628
|
});
|
10582
10629
|
onBeforeUnmount(() => {
|
10583
|
-
|
10630
|
+
select2 == null ? void 0 : select2.unregister(proxy);
|
10584
10631
|
group == null ? void 0 : group.unregister(proxy);
|
10585
10632
|
});
|
10586
10633
|
return __spreadProps(__spreadValues({}, toRefs(states)), {
|
@@ -10618,7 +10665,7 @@ var OptionGroup = defineComponent({
|
|
10618
10665
|
const {
|
10619
10666
|
proxy
|
10620
10667
|
} = getCurrentInstance();
|
10621
|
-
const
|
10668
|
+
const select2 = inject(selectKey, null);
|
10622
10669
|
const states = reactive({
|
10623
10670
|
groupCollapse: props.collapse,
|
10624
10671
|
visible: true
|
@@ -10641,10 +10688,10 @@ var OptionGroup = defineComponent({
|
|
10641
10688
|
groupCollapse: toRef(states, "groupCollapse")
|
10642
10689
|
})));
|
10643
10690
|
onBeforeMount(() => {
|
10644
|
-
|
10691
|
+
select2 == null ? void 0 : select2.registerGroup(proxy);
|
10645
10692
|
});
|
10646
10693
|
onBeforeUnmount(() => {
|
10647
|
-
|
10694
|
+
select2 == null ? void 0 : select2.unregisterGroup(proxy);
|
10648
10695
|
});
|
10649
10696
|
return __spreadProps(__spreadValues({}, toRefs(states)), {
|
10650
10697
|
groupLabel,
|
@@ -11183,7 +11230,7 @@ var Component$a = defineComponent({
|
|
11183
11230
|
placeholder,
|
11184
11231
|
multiple,
|
11185
11232
|
remoteMethod,
|
11186
|
-
loading,
|
11233
|
+
loading: loading2,
|
11187
11234
|
loadingText,
|
11188
11235
|
noDataText,
|
11189
11236
|
noMatchText,
|
@@ -11199,7 +11246,7 @@ var Component$a = defineComponent({
|
|
11199
11246
|
const popoverRef = ref();
|
11200
11247
|
const options = ref(/* @__PURE__ */ new Set());
|
11201
11248
|
const groups = ref(/* @__PURE__ */ new Set());
|
11202
|
-
const isDisabled = computed(() => disabled.value ||
|
11249
|
+
const isDisabled = computed(() => disabled.value || loading2.value);
|
11203
11250
|
const selectedLabel = computed(() => [...states.selectedOptions.values()].map((option) => option.label));
|
11204
11251
|
const isAllSelected = computed(() => [...options.value.values()].filter((option) => !option.disabled).every((option) => states.selectedOptions.has(option)));
|
11205
11252
|
const isGroup = computed(() => !!groups.value.size);
|
@@ -11624,9 +11671,9 @@ var Component$8 = defineComponent({
|
|
11624
11671
|
emit
|
11625
11672
|
}) {
|
11626
11673
|
const defaultSteps = ref([]);
|
11627
|
-
const updateSteps = (
|
11674
|
+
const updateSteps = (steps2) => {
|
11628
11675
|
const defaults = [];
|
11629
|
-
|
11676
|
+
steps2.forEach((step) => {
|
11630
11677
|
if (typeof step === "string") {
|
11631
11678
|
defaults.push(step);
|
11632
11679
|
} else {
|
@@ -11887,12 +11934,12 @@ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
|
11887
11934
|
}
|
11888
11935
|
return { startIndex, height, diffHeight };
|
11889
11936
|
}
|
11890
|
-
function computedVirtualIndex(lineHeight, callback,
|
11937
|
+
function computedVirtualIndex(lineHeight, callback, pagination2, el, event) {
|
11891
11938
|
if (!el) {
|
11892
11939
|
return;
|
11893
11940
|
}
|
11894
11941
|
const elScrollTop = el.scrollTop;
|
11895
|
-
const { scrollTop, count, groupItemCount, startIndex, endIndex } =
|
11942
|
+
const { scrollTop, count, groupItemCount, startIndex, endIndex } = pagination2;
|
11896
11943
|
const { offsetHeight } = el;
|
11897
11944
|
let targetStartIndex = 0;
|
11898
11945
|
let targetEndIndex = 0;
|
@@ -11914,8 +11961,8 @@ function computedVirtualIndex(lineHeight, callback, pagination, el, event) {
|
|
11914
11961
|
}
|
11915
11962
|
}
|
11916
11963
|
function visibleRender(e, wrapper, binding) {
|
11917
|
-
const { lineHeight = 30, handleScrollCallback, pagination = {} } = binding.value;
|
11918
|
-
const { startIndex, endIndex, groupItemCount, count, scrollTop } =
|
11964
|
+
const { lineHeight = 30, handleScrollCallback, pagination: pagination2 = {} } = binding.value;
|
11965
|
+
const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination2;
|
11919
11966
|
computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e);
|
11920
11967
|
}
|
11921
11968
|
const throttledRender = (delay = 60) => lodash.exports.throttle((e, wrapper, binding) => visibleRender(e, wrapper, binding), delay);
|
@@ -11986,7 +12033,7 @@ var Component$6 = defineComponent({
|
|
11986
12033
|
};
|
11987
12034
|
}
|
11988
12035
|
const refRoot = ref(null);
|
11989
|
-
const
|
12036
|
+
const pagination2 = reactive({
|
11990
12037
|
startIndex: 0,
|
11991
12038
|
endIndex: 0,
|
11992
12039
|
scrollTop: 1,
|
@@ -11995,11 +12042,11 @@ var Component$6 = defineComponent({
|
|
11995
12042
|
groupItemCount: props.groupItemCount
|
11996
12043
|
});
|
11997
12044
|
const handleScrollCallback = (event, startIndex, endIndex, scrollTop, translateY) => {
|
11998
|
-
|
11999
|
-
|
12000
|
-
|
12001
|
-
|
12002
|
-
ctx.emit("content-scroll", [event,
|
12045
|
+
pagination2.startIndex = startIndex;
|
12046
|
+
pagination2.endIndex = endIndex;
|
12047
|
+
pagination2.scrollTop = scrollTop;
|
12048
|
+
pagination2.translateY = translateY;
|
12049
|
+
ctx.emit("content-scroll", [event, pagination2]);
|
12003
12050
|
};
|
12004
12051
|
onMounted(() => {
|
12005
12052
|
nextTick(() => {
|
@@ -12024,11 +12071,11 @@ var Component$6 = defineComponent({
|
|
12024
12071
|
const innerHeight = ref(0);
|
12025
12072
|
const handleListChanged = (list) => {
|
12026
12073
|
listLength.value = Math.ceil((list || []).length / props.groupItemCount);
|
12027
|
-
|
12028
|
-
|
12029
|
-
|
12030
|
-
|
12031
|
-
|
12074
|
+
pagination2.count = listLength.value;
|
12075
|
+
pagination2.startIndex = 0;
|
12076
|
+
pagination2.endIndex = 0;
|
12077
|
+
pagination2.translateY = 0;
|
12078
|
+
pagination2.scrollTop = 0;
|
12032
12079
|
const isAuto = typeof props.abosuteHeight === "string" && props.abosuteHeight === "auto";
|
12033
12080
|
if (isAuto) {
|
12034
12081
|
if (typeof props.lineHeight === "function") {
|
@@ -12049,15 +12096,15 @@ var Component$6 = defineComponent({
|
|
12049
12096
|
const afterListDataReset = () => {
|
12050
12097
|
var _a;
|
12051
12098
|
const el = (_a = refRoot.value) == null ? void 0 : _a.parentNode;
|
12052
|
-
computedVirtualIndex(props.lineHeight, handleScrollCallback,
|
12099
|
+
computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination2, el, null);
|
12053
12100
|
};
|
12054
12101
|
const localList = computed(() => (props.list || []).map((item, index) => __spreadProps(__spreadValues({}, item), {
|
12055
12102
|
$index: index
|
12056
12103
|
})));
|
12057
|
-
const calcList = computed(() => localList.value.slice(
|
12104
|
+
const calcList = computed(() => localList.value.slice(pagination2.startIndex * props.groupItemCount, (pagination2.endIndex + props.preloadItemCount) * props.groupItemCount));
|
12058
12105
|
const innerContentStyle = computed(() => props.scrollPosition === "content" ? {
|
12059
|
-
top: `${
|
12060
|
-
transform: `translateY(-${
|
12106
|
+
top: `${pagination2.scrollTop + props.scrollOffsetTop}px`,
|
12107
|
+
transform: `translateY(-${pagination2.translateY}px)`
|
12061
12108
|
} : {});
|
12062
12109
|
const wrapperStyle = computed(() => __spreadValues({
|
12063
12110
|
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
@@ -12077,7 +12124,7 @@ var Component$6 = defineComponent({
|
|
12077
12124
|
const dirModifier = {
|
12078
12125
|
lineHeight: props.lineHeight,
|
12079
12126
|
handleScrollCallback,
|
12080
|
-
pagination,
|
12127
|
+
pagination: pagination2,
|
12081
12128
|
throttleDelay: props.throttleDelay
|
12082
12129
|
};
|
12083
12130
|
return () => {
|
@@ -12282,20 +12329,20 @@ var userPagination = (props) => {
|
|
12282
12329
|
const indexData = computed(() => props.data.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
12283
12330
|
__$table_row_index: index + 1
|
12284
12331
|
})));
|
12285
|
-
let
|
12332
|
+
let pagination2 = reactive({
|
12286
12333
|
count: 0,
|
12287
12334
|
limit: 10,
|
12288
12335
|
current: 1
|
12289
12336
|
});
|
12290
|
-
|
12337
|
+
pagination2 = resolvePaginationOption(props.pagination, pagination2);
|
12291
12338
|
const resetStartEndIndex = () => {
|
12292
12339
|
if (!props.pagination || props.remotePagination) {
|
12293
12340
|
startIndex.value = 0;
|
12294
12341
|
endIndex.value = props.data.length;
|
12295
12342
|
return;
|
12296
12343
|
}
|
12297
|
-
startIndex.value = (
|
12298
|
-
endIndex.value =
|
12344
|
+
startIndex.value = (pagination2.current - 1) * pagination2.limit;
|
12345
|
+
endIndex.value = pagination2.current * pagination2.limit;
|
12299
12346
|
};
|
12300
12347
|
resetStartEndIndex();
|
12301
12348
|
const pageData = reactive([]);
|
@@ -12316,7 +12363,7 @@ var userPagination = (props) => {
|
|
12316
12363
|
sort(sortFn);
|
12317
12364
|
};
|
12318
12365
|
const watchEffectFn = (filterFn, sortFn) => {
|
12319
|
-
|
12366
|
+
pagination2 = resolvePaginationOption(props.pagination, pagination2);
|
12320
12367
|
resetStartEndIndex();
|
12321
12368
|
resolvePageData(filterFn, sortFn);
|
12322
12369
|
};
|
@@ -12324,7 +12371,7 @@ var userPagination = (props) => {
|
|
12324
12371
|
if (!props.pagination) {
|
12325
12372
|
return null;
|
12326
12373
|
}
|
12327
|
-
return props.remotePagination ?
|
12374
|
+
return props.remotePagination ? pagination2 : __spreadProps(__spreadValues({}, pagination2), {
|
12328
12375
|
count: props.data.length
|
12329
12376
|
});
|
12330
12377
|
});
|
@@ -13282,8 +13329,8 @@ var Component$4 = defineComponent({
|
|
13282
13329
|
resolvePageData(columnFilterFn, columnSortFn);
|
13283
13330
|
});
|
13284
13331
|
const handleScrollChanged = (args) => {
|
13285
|
-
const
|
13286
|
-
reactiveProp.scrollTranslateY =
|
13332
|
+
const pagination2 = args[1];
|
13333
|
+
reactiveProp.scrollTranslateY = pagination2.translateY;
|
13287
13334
|
};
|
13288
13335
|
onMounted(() => {
|
13289
13336
|
observerIns = observerResize(root.value, () => {
|
@@ -13659,7 +13706,7 @@ var TagInput = defineComponent({
|
|
13659
13706
|
selectedTagList: [],
|
13660
13707
|
selectedTagListCache: []
|
13661
13708
|
});
|
13662
|
-
const tagList = computed(() => listState.selectedTagList.map((
|
13709
|
+
const tagList = computed(() => listState.selectedTagList.map((tag2) => tag2[props.saveKey]));
|
13663
13710
|
const formatList = useFlatList(props);
|
13664
13711
|
const renderList = computed(() => {
|
13665
13712
|
if (props.useGroup) {
|
@@ -13690,14 +13737,14 @@ var TagInput = defineComponent({
|
|
13690
13737
|
listState.selectedTagList = [];
|
13691
13738
|
listState.localList = [...formatList];
|
13692
13739
|
if (modelValue.length) {
|
13693
|
-
modelValue.forEach((
|
13694
|
-
const value = listState.localList.find((val) =>
|
13740
|
+
modelValue.forEach((tag2) => {
|
13741
|
+
const value = listState.localList.find((val) => tag2 === val[saveKey]);
|
13695
13742
|
if (value !== void 0) {
|
13696
13743
|
listState.selectedTagList.push(value);
|
13697
|
-
} else if (allowCreate && !tagList.value.includes(
|
13744
|
+
} else if (allowCreate && !tagList.value.includes(tag2)) {
|
13698
13745
|
listState.selectedTagList.push({
|
13699
|
-
[saveKey]:
|
13700
|
-
[displayKey]:
|
13746
|
+
[saveKey]: tag2,
|
13747
|
+
[displayKey]: tag2
|
13701
13748
|
});
|
13702
13749
|
}
|
13703
13750
|
});
|
@@ -14003,7 +14050,7 @@ var TagInput = defineComponent({
|
|
14003
14050
|
const nodes = getSelectedTagNodes();
|
14004
14051
|
const index = getTagInputItemSite();
|
14005
14052
|
const localInitData = listState.localList.map((data2) => data2[saveKey]);
|
14006
|
-
tags = tags.filter((
|
14053
|
+
tags = tags.filter((tag2) => (tag2 == null ? void 0 : tag2.trim()) && !tagList.value.includes(tag2) && localInitData.includes(tag2));
|
14007
14054
|
if (maxData !== -1) {
|
14008
14055
|
const selectedLength = listState.selectedTagList.length;
|
14009
14056
|
if (selectedLength < maxData) {
|
@@ -14015,7 +14062,7 @@ var TagInput = defineComponent({
|
|
14015
14062
|
tags = [];
|
14016
14063
|
}
|
14017
14064
|
}
|
14018
|
-
const localTags = listState.localList.filter((
|
14065
|
+
const localTags = listState.localList.filter((tag2) => tags.includes(tag2[saveKey]));
|
14019
14066
|
if (tags.length) {
|
14020
14067
|
listState.selectedTagList.splice(index, 0, ...localTags);
|
14021
14068
|
swapElementPositions(tagInputItemRef.value, nodes[index]);
|
@@ -14053,14 +14100,14 @@ var TagInput = defineComponent({
|
|
14053
14100
|
}
|
14054
14101
|
return true;
|
14055
14102
|
};
|
14056
|
-
const existTag = (value) => listState.localList.find((
|
14103
|
+
const existTag = (value) => listState.localList.find((tag2) => tag2[saveKey] === value);
|
14057
14104
|
if (type === "custom") {
|
14058
14105
|
if (separator) {
|
14059
14106
|
let tags = item.split(separator);
|
14060
|
-
tags = tags.filter((
|
14061
|
-
const localTags = tags.map((
|
14062
|
-
[saveKey]:
|
14063
|
-
[displayKey]:
|
14107
|
+
tags = tags.filter((tag2) => (tag2 == null ? void 0 : tag2.trim()) && !tagList.value.includes(tag2) && validateTag(tag2));
|
14108
|
+
const localTags = tags.map((tag2) => existTag(tag2) || {
|
14109
|
+
[saveKey]: tag2,
|
14110
|
+
[displayKey]: tag2
|
14064
14111
|
});
|
14065
14112
|
if (tags.length) {
|
14066
14113
|
listState.selectedTagList.splice(targetIndex, 0, ...localTags);
|
@@ -15120,7 +15167,7 @@ var Component$3 = defineComponent({
|
|
15120
15167
|
const openedKeys = ref([]);
|
15121
15168
|
const menuStore = ref({});
|
15122
15169
|
const mode = computed(() => props.mode);
|
15123
|
-
const
|
15170
|
+
const collapse2 = ref(props.collapse);
|
15124
15171
|
const oldOpenKeys = ref([]);
|
15125
15172
|
watch(() => props.OpenedKeys, (keys = openedKeys.value) => {
|
15126
15173
|
openedKeys.value = keys;
|
@@ -15133,11 +15180,11 @@ var Component$3 = defineComponent({
|
|
15133
15180
|
}
|
15134
15181
|
});
|
15135
15182
|
watch(() => props.collapse, () => {
|
15136
|
-
|
15183
|
+
collapse2.value = props.collapse;
|
15137
15184
|
const oldKeys = [...oldOpenKeys.value];
|
15138
15185
|
const openKeys = [...openedKeys.value];
|
15139
|
-
openedKeys.value =
|
15140
|
-
oldOpenKeys.value =
|
15186
|
+
openedKeys.value = collapse2.value ? [] : oldKeys;
|
15187
|
+
oldOpenKeys.value = collapse2.value ? openKeys : [];
|
15141
15188
|
}, {
|
15142
15189
|
immediate: true
|
15143
15190
|
});
|
@@ -15174,7 +15221,7 @@ var Component$3 = defineComponent({
|
|
15174
15221
|
unregisterMenuInfo,
|
15175
15222
|
mode: mode.value,
|
15176
15223
|
openedKeys,
|
15177
|
-
collapse,
|
15224
|
+
collapse: collapse2,
|
15178
15225
|
handleOpenChange,
|
15179
15226
|
handleActiveChange
|
15180
15227
|
});
|
@@ -15183,7 +15230,7 @@ var Component$3 = defineComponent({
|
|
15183
15230
|
return createVNode("div", {
|
15184
15231
|
"class": {
|
15185
15232
|
"bk-menu": true,
|
15186
|
-
"is-collapse":
|
15233
|
+
"is-collapse": collapse2.value
|
15187
15234
|
}
|
15188
15235
|
}, [(_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)]);
|
15189
15236
|
};
|
@@ -15288,7 +15335,7 @@ var Submenu = defineComponent({
|
|
15288
15335
|
unregisterMenuInfo,
|
15289
15336
|
openedKeys,
|
15290
15337
|
handleOpenChange,
|
15291
|
-
collapse,
|
15338
|
+
collapse: collapse2,
|
15292
15339
|
activeKey,
|
15293
15340
|
menuStore
|
15294
15341
|
} = useMenuInject();
|
@@ -15302,7 +15349,7 @@ var Submenu = defineComponent({
|
|
15302
15349
|
const specialCollapse = computed(() => {
|
15303
15350
|
var _a2, _b2;
|
15304
15351
|
const activeParentKey = (_b2 = (_a2 = menuStore.value) == null ? void 0 : _a2[activeKey.value]) == null ? void 0 : _b2.parentKey;
|
15305
|
-
return
|
15352
|
+
return collapse2.value && activeParentKey === key && isShow;
|
15306
15353
|
});
|
15307
15354
|
useMenuPathProvider(key);
|
15308
15355
|
registerMenuInfo(key, {
|
@@ -17299,15 +17346,15 @@ function isProtectedDayOfYearToken(token2) {
|
|
17299
17346
|
function isProtectedWeekYearToken(token2) {
|
17300
17347
|
return protectedWeekYearTokens.indexOf(token2) !== -1;
|
17301
17348
|
}
|
17302
|
-
function throwProtectedError(token2, format2,
|
17349
|
+
function throwProtectedError(token2, format2, input2) {
|
17303
17350
|
if (token2 === "YYYY") {
|
17304
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(
|
17351
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
|
17305
17352
|
} else if (token2 === "YY") {
|
17306
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(
|
17353
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
|
17307
17354
|
} else if (token2 === "D") {
|
17308
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(
|
17355
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
|
17309
17356
|
} else if (token2 === "DD") {
|
17310
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(
|
17357
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
|
17311
17358
|
}
|
17312
17359
|
}
|
17313
17360
|
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
@@ -17382,8 +17429,8 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
17382
17429
|
}).join("");
|
17383
17430
|
return result;
|
17384
17431
|
}
|
17385
|
-
function cleanEscapedString(
|
17386
|
-
return
|
17432
|
+
function cleanEscapedString(input2) {
|
17433
|
+
return input2.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
17387
17434
|
}
|
17388
17435
|
const fecha = {};
|
17389
17436
|
const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
@@ -18128,7 +18175,7 @@ var DatePanel = defineComponent({
|
|
18128
18175
|
handlePickSuccess();
|
18129
18176
|
}
|
18130
18177
|
};
|
18131
|
-
const
|
18178
|
+
const reset2 = () => {
|
18132
18179
|
state.currentView = props.selectionMode;
|
18133
18180
|
state.pickerTable = getTableType(state.currentView);
|
18134
18181
|
};
|
@@ -18184,7 +18231,7 @@ var DatePanel = defineComponent({
|
|
18184
18231
|
handleShortcutClick,
|
18185
18232
|
changeYear,
|
18186
18233
|
changeMonth,
|
18187
|
-
reset,
|
18234
|
+
reset: reset2,
|
18188
18235
|
isTime,
|
18189
18236
|
onToggleVisibility
|
18190
18237
|
});
|
@@ -18350,7 +18397,7 @@ var DateRangePanel = defineComponent({
|
|
18350
18397
|
}
|
18351
18398
|
return a2.getTime() - b2.getTime();
|
18352
18399
|
};
|
18353
|
-
const
|
18400
|
+
const reset2 = () => {
|
18354
18401
|
state.currentView = props.selectionMode;
|
18355
18402
|
state.leftPickerTable = `${state.currentView}-table`;
|
18356
18403
|
state.rightPickerTable = `${state.currentView}-table`;
|
@@ -18517,7 +18564,7 @@ var DateRangePanel = defineComponent({
|
|
18517
18564
|
rightShowLabelSecond,
|
18518
18565
|
preSelecting,
|
18519
18566
|
panelPickerHandlers,
|
18520
|
-
reset,
|
18567
|
+
reset: reset2,
|
18521
18568
|
onToggleVisibility,
|
18522
18569
|
handleRangePick,
|
18523
18570
|
handleChangeRange
|
@@ -19047,7 +19094,7 @@ var Component$2 = defineComponent({
|
|
19047
19094
|
state.visible = true;
|
19048
19095
|
}
|
19049
19096
|
};
|
19050
|
-
const
|
19097
|
+
const reset2 = () => {
|
19051
19098
|
var _a;
|
19052
19099
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.reset();
|
19053
19100
|
};
|
@@ -19064,7 +19111,7 @@ var Component$2 = defineComponent({
|
|
19064
19111
|
state.isFocused = false;
|
19065
19112
|
onSelectionModeChange(props.type);
|
19066
19113
|
state.internalValue = state.internalValue.slice();
|
19067
|
-
|
19114
|
+
reset2();
|
19068
19115
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.onToggleVisibility(false);
|
19069
19116
|
};
|
19070
19117
|
const handleKeydown = (e) => {
|
@@ -19109,7 +19156,7 @@ var Component$2 = defineComponent({
|
|
19109
19156
|
state.internalValue = state.internalValue.map(() => null);
|
19110
19157
|
emit("clear");
|
19111
19158
|
emitChange(props.type);
|
19112
|
-
|
19159
|
+
reset2();
|
19113
19160
|
state.showClose = false;
|
19114
19161
|
state.shortcut = null;
|
19115
19162
|
setTimeout(() => onSelectionModeChange(props.type), 500);
|
@@ -19126,7 +19173,7 @@ var Component$2 = defineComponent({
|
|
19126
19173
|
emit("pick-success");
|
19127
19174
|
});
|
19128
19175
|
(_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.blur();
|
19129
|
-
|
19176
|
+
reset2();
|
19130
19177
|
};
|
19131
19178
|
const onPick = (_dates, visible = false, type, shortcut2) => {
|
19132
19179
|
let dates = _dates;
|
@@ -20560,38 +20607,38 @@ var FormItem = defineComponent({
|
|
20560
20607
|
isError: false,
|
20561
20608
|
errorMessage: ""
|
20562
20609
|
});
|
20563
|
-
const
|
20564
|
-
const isForm = Boolean(
|
20610
|
+
const form2 = inject(formKey);
|
20611
|
+
const isForm = Boolean(form2);
|
20565
20612
|
const labelStyles = computed(() => {
|
20566
20613
|
const styles = {
|
20567
20614
|
width: "",
|
20568
20615
|
paddingRight: "",
|
20569
20616
|
textAlign: ""
|
20570
20617
|
};
|
20571
|
-
const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm &&
|
20618
|
+
const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form2.props.labelWidth;
|
20572
20619
|
if (isValid(labelWidth)) {
|
20573
20620
|
styles.width = `${labelWidth}px`;
|
20574
20621
|
styles.paddingRight = labelWidth ? "" : "0px";
|
20575
20622
|
}
|
20576
|
-
const labelPosition = props.labelPosition || isForm &&
|
20623
|
+
const labelPosition = props.labelPosition || isForm && form2.props.labelPosition;
|
20577
20624
|
if (labelPosition) {
|
20578
20625
|
styles["text-align"] = labelPosition;
|
20579
20626
|
}
|
20580
20627
|
return styles;
|
20581
20628
|
});
|
20582
20629
|
const validate = () => {
|
20583
|
-
if (!props.property || isForm && !
|
20630
|
+
if (!props.property || isForm && !form2.props.model) {
|
20584
20631
|
return Promise.resolve();
|
20585
20632
|
}
|
20586
20633
|
let rules = [];
|
20587
|
-
if (isForm &&
|
20588
|
-
rules =
|
20634
|
+
if (isForm && form2.props.rules && hasOwn(form2.props.rules, props.property)) {
|
20635
|
+
rules = form2.props.rules[props.property];
|
20589
20636
|
}
|
20590
20637
|
if (props.rules) {
|
20591
20638
|
rules = props.rules;
|
20592
20639
|
}
|
20593
20640
|
rules = mergeRules(rules, getRulesFromProps(props));
|
20594
|
-
const value =
|
20641
|
+
const value = form2.props.model[props.property];
|
20595
20642
|
const doValidate = (() => {
|
20596
20643
|
let stepIndex = -1;
|
20597
20644
|
return () => {
|
@@ -20626,12 +20673,12 @@ var FormItem = defineComponent({
|
|
20626
20673
|
};
|
20627
20674
|
onMounted(() => {
|
20628
20675
|
if (isForm) {
|
20629
|
-
|
20676
|
+
form2.register(currentInstance.proxy);
|
20630
20677
|
}
|
20631
20678
|
});
|
20632
20679
|
onBeforeUnmount(() => {
|
20633
20680
|
if (isForm) {
|
20634
|
-
|
20681
|
+
form2.unregister(currentInstance.proxy);
|
20635
20682
|
}
|
20636
20683
|
});
|
20637
20684
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|