bkui-vue 0.0.1-beta.50 → 0.0.1-beta.51
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 +9 -9
- package/dist/index.esm.js +126 -173
- package/dist/index.umd.js +16 -16
- package/dist/style.css +1 -1
- package/lib/components.js +1 -0
- package/lib/icon/help.js +1 -1
- package/lib/icon/index.js +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -0
- package/lib/preset.js +1 -0
- package/package.json +4 -4
- package/lib/icon/help-fill.js +0 -1
package/dist/index.esm.js
CHANGED
@@ -34,53 +34,6 @@ 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 = "";
|
84
37
|
const BKLAYERD_INDEX_EFAULT_VALUE = {
|
85
38
|
["bottom"]: 0,
|
86
39
|
["content"]: 1,
|
@@ -1880,11 +1833,11 @@ class BkMaskManager {
|
|
1880
1833
|
Object.entries(maskStyle).forEach((cfg) => this.mask.style.setProperty(cfg[0], cfg[1]));
|
1881
1834
|
}
|
1882
1835
|
}
|
1883
|
-
getMaskAttrTag(
|
1884
|
-
if (/^(auto|\s+)$/i.test(
|
1836
|
+
getMaskAttrTag(tag) {
|
1837
|
+
if (/^(auto|\s+)$/i.test(tag) || tag === null || tag === void 0 || tag === "") {
|
1885
1838
|
return `__bk_mask_${random(16)}`;
|
1886
1839
|
}
|
1887
|
-
return
|
1840
|
+
return tag;
|
1888
1841
|
}
|
1889
1842
|
appendContentToMask(content) {
|
1890
1843
|
this.mask.append(content);
|
@@ -3962,20 +3915,20 @@ var lodash = { exports: {} };
|
|
3962
3915
|
return copyArray(value, result2);
|
3963
3916
|
}
|
3964
3917
|
} else {
|
3965
|
-
var
|
3918
|
+
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
3966
3919
|
if (isBuffer(value)) {
|
3967
3920
|
return cloneBuffer(value, isDeep);
|
3968
3921
|
}
|
3969
|
-
if (
|
3922
|
+
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
3970
3923
|
result2 = isFlat || isFunc ? {} : initCloneObject(value);
|
3971
3924
|
if (!isDeep) {
|
3972
3925
|
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
|
3973
3926
|
}
|
3974
3927
|
} else {
|
3975
|
-
if (!cloneableTags[
|
3928
|
+
if (!cloneableTags[tag]) {
|
3976
3929
|
return object ? value : {};
|
3977
3930
|
}
|
3978
|
-
result2 = initCloneByTag(value,
|
3931
|
+
result2 = initCloneByTag(value, tag, isDeep);
|
3979
3932
|
}
|
3980
3933
|
}
|
3981
3934
|
stack || (stack = new Stack());
|
@@ -5270,11 +5223,11 @@ var lodash = { exports: {} };
|
|
5270
5223
|
};
|
5271
5224
|
function createToPairs(keysFunc) {
|
5272
5225
|
return function(object) {
|
5273
|
-
var
|
5274
|
-
if (
|
5226
|
+
var tag = getTag(object);
|
5227
|
+
if (tag == mapTag) {
|
5275
5228
|
return mapToArray(object);
|
5276
5229
|
}
|
5277
|
-
if (
|
5230
|
+
if (tag == setTag) {
|
5278
5231
|
return setToPairs(object);
|
5279
5232
|
}
|
5280
5233
|
return baseToPairs(object, keysFunc(object));
|
@@ -5394,8 +5347,8 @@ var lodash = { exports: {} };
|
|
5394
5347
|
stack["delete"](other);
|
5395
5348
|
return result2;
|
5396
5349
|
}
|
5397
|
-
function equalByTag(object, other,
|
5398
|
-
switch (
|
5350
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
5351
|
+
switch (tag) {
|
5399
5352
|
case dataViewTag:
|
5400
5353
|
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
5401
5354
|
return false;
|
@@ -5531,7 +5484,7 @@ var lodash = { exports: {} };
|
|
5531
5484
|
return baseIsNative(value) ? value : undefined$1;
|
5532
5485
|
}
|
5533
5486
|
function getRawTag(value) {
|
5534
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
5487
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
5535
5488
|
try {
|
5536
5489
|
value[symToStringTag] = undefined$1;
|
5537
5490
|
var unmasked = true;
|
@@ -5540,7 +5493,7 @@ var lodash = { exports: {} };
|
|
5540
5493
|
var result2 = nativeObjectToString.call(value);
|
5541
5494
|
if (unmasked) {
|
5542
5495
|
if (isOwn) {
|
5543
|
-
value[symToStringTag] =
|
5496
|
+
value[symToStringTag] = tag;
|
5544
5497
|
} else {
|
5545
5498
|
delete value[symToStringTag];
|
5546
5499
|
}
|
@@ -5637,9 +5590,9 @@ var lodash = { exports: {} };
|
|
5637
5590
|
function initCloneObject(object) {
|
5638
5591
|
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
5639
5592
|
}
|
5640
|
-
function initCloneByTag(object,
|
5593
|
+
function initCloneByTag(object, tag, isDeep) {
|
5641
5594
|
var Ctor = object.constructor;
|
5642
|
-
switch (
|
5595
|
+
switch (tag) {
|
5643
5596
|
case arrayBufferTag:
|
5644
5597
|
return cloneArrayBuffer(object);
|
5645
5598
|
case boolTag:
|
@@ -6520,8 +6473,8 @@ var lodash = { exports: {} };
|
|
6520
6473
|
if (isArrayLike(collection)) {
|
6521
6474
|
return isString(collection) ? stringSize(collection) : collection.length;
|
6522
6475
|
}
|
6523
|
-
var
|
6524
|
-
if (
|
6476
|
+
var tag = getTag(collection);
|
6477
|
+
if (tag == mapTag || tag == setTag) {
|
6525
6478
|
return collection.size;
|
6526
6479
|
}
|
6527
6480
|
return baseKeys(collection).length;
|
@@ -6859,8 +6812,8 @@ var lodash = { exports: {} };
|
|
6859
6812
|
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
6860
6813
|
return !value.length;
|
6861
6814
|
}
|
6862
|
-
var
|
6863
|
-
if (
|
6815
|
+
var tag = getTag(value);
|
6816
|
+
if (tag == mapTag || tag == setTag) {
|
6864
6817
|
return !value.size;
|
6865
6818
|
}
|
6866
6819
|
if (isPrototype(value)) {
|
@@ -6885,8 +6838,8 @@ var lodash = { exports: {} };
|
|
6885
6838
|
if (!isObjectLike(value)) {
|
6886
6839
|
return false;
|
6887
6840
|
}
|
6888
|
-
var
|
6889
|
-
return
|
6841
|
+
var tag = baseGetTag(value);
|
6842
|
+
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
|
6890
6843
|
}
|
6891
6844
|
function isFinite2(value) {
|
6892
6845
|
return typeof value == "number" && nativeIsFinite(value);
|
@@ -6895,8 +6848,8 @@ var lodash = { exports: {} };
|
|
6895
6848
|
if (!isObject2(value)) {
|
6896
6849
|
return false;
|
6897
6850
|
}
|
6898
|
-
var
|
6899
|
-
return
|
6851
|
+
var tag = baseGetTag(value);
|
6852
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
6900
6853
|
}
|
6901
6854
|
function isInteger(value) {
|
6902
6855
|
return typeof value == "number" && value == toInteger2(value);
|
@@ -6983,7 +6936,7 @@ var lodash = { exports: {} };
|
|
6983
6936
|
if (symIterator && value[symIterator]) {
|
6984
6937
|
return iteratorToArray(value[symIterator]());
|
6985
6938
|
}
|
6986
|
-
var
|
6939
|
+
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
|
6987
6940
|
return func(value);
|
6988
6941
|
}
|
6989
6942
|
function toFinite(value) {
|
@@ -9774,15 +9727,15 @@ const Circle = (_2, {
|
|
9774
9727
|
const radius = 50 - circleStrokeWidth / 2;
|
9775
9728
|
const isDashboard = type === "dashboard";
|
9776
9729
|
const len = Math.PI * 2 * radius;
|
9777
|
-
const
|
9778
|
-
const strokeDashoffset = `${-1 * len * (1 -
|
9730
|
+
const rate = isDashboard && 0.75 || 1;
|
9731
|
+
const strokeDashoffset = `${-1 * len * (1 - rate) / 2}px`;
|
9779
9732
|
const transition = "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease";
|
9780
9733
|
const trailStyle = {
|
9781
|
-
strokeDasharray: `${len *
|
9734
|
+
strokeDasharray: `${len * rate}px, ${len}px`,
|
9782
9735
|
strokeDashoffset
|
9783
9736
|
};
|
9784
9737
|
const pathStyle = {
|
9785
|
-
strokeDasharray: `${len *
|
9738
|
+
strokeDasharray: `${len * rate * (percent / 100)}px, ${len}px`,
|
9786
9739
|
strokeDashoffset,
|
9787
9740
|
transition
|
9788
9741
|
};
|
@@ -9933,11 +9886,11 @@ var Component$f = defineComponent({
|
|
9933
9886
|
const $props = __spreadProps(__spreadValues({}, this.$props), {
|
9934
9887
|
percent: this.validPercent(this.percent)
|
9935
9888
|
});
|
9936
|
-
let
|
9889
|
+
let progress = createVNode(Line, $props, _isSlot$3(progressInfo) ? progressInfo : {
|
9937
9890
|
default: () => [progressInfo]
|
9938
9891
|
});
|
9939
9892
|
if (this.type === "circle" || this.type === "dashboard") {
|
9940
|
-
|
9893
|
+
progress = createVNode(Circle, $props, _isSlot$3(progressInfo) ? progressInfo : {
|
9941
9894
|
default: () => [progressInfo]
|
9942
9895
|
});
|
9943
9896
|
}
|
@@ -9946,7 +9899,7 @@ var Component$f = defineComponent({
|
|
9946
9899
|
extCls: !!this.extCls
|
9947
9900
|
}, `bk-progress bk-progress-${this.type}`)
|
9948
9901
|
};
|
9949
|
-
return createVNode("div", progressProps, [
|
9902
|
+
return createVNode("div", progressProps, [progress]);
|
9950
9903
|
}
|
9951
9904
|
});
|
9952
9905
|
const BkProgress = withInstall(Component$f);
|
@@ -10221,14 +10174,14 @@ var star = defineComponent({
|
|
10221
10174
|
const chooseRate = (index) => {
|
10222
10175
|
if (!props.editable)
|
10223
10176
|
return;
|
10224
|
-
const
|
10225
|
-
emit("chooseRate",
|
10177
|
+
const rate = index + 1;
|
10178
|
+
emit("chooseRate", rate);
|
10226
10179
|
};
|
10227
10180
|
const changeHover = (index) => {
|
10228
10181
|
if (!props.editable)
|
10229
10182
|
return;
|
10230
|
-
const
|
10231
|
-
emit("changeHover",
|
10183
|
+
const rate = index + 1;
|
10184
|
+
emit("changeHover", rate);
|
10232
10185
|
};
|
10233
10186
|
const starClass = (index) => classes({
|
10234
10187
|
"bk-is-select": index < Math.floor(displayRate.value),
|
@@ -10390,10 +10343,10 @@ var Component$c = defineComponent({
|
|
10390
10343
|
swiperIndex.value = showIndex;
|
10391
10344
|
emit("index-change", showIndex);
|
10392
10345
|
};
|
10393
|
-
const goToLink = (
|
10394
|
-
if (!
|
10346
|
+
const goToLink = (link) => {
|
10347
|
+
if (!link)
|
10395
10348
|
return;
|
10396
|
-
window.open(
|
10349
|
+
window.open(link, "_blank");
|
10397
10350
|
};
|
10398
10351
|
const getRenderItemClass = (renderData) => ["bk-swiper-img", {
|
10399
10352
|
"bk-swiper-link": renderData.link
|
@@ -10618,21 +10571,21 @@ var BkOption = defineComponent({
|
|
10618
10571
|
const {
|
10619
10572
|
disabled
|
10620
10573
|
} = toRefs(props);
|
10621
|
-
const
|
10574
|
+
const select = inject(selectKey, null);
|
10622
10575
|
const group = inject(optionGroupKey, null);
|
10623
|
-
const selected = computed(() =>
|
10624
|
-
const multiple = computed(() =>
|
10576
|
+
const selected = computed(() => select.selectedOptions.has(proxy));
|
10577
|
+
const multiple = computed(() => select == null ? void 0 : select.props.multiple);
|
10625
10578
|
const handleOptionClick = () => {
|
10626
10579
|
if (disabled.value)
|
10627
10580
|
return;
|
10628
|
-
|
10581
|
+
select == null ? void 0 : select.handleOptionSelected(proxy);
|
10629
10582
|
};
|
10630
10583
|
onBeforeMount(() => {
|
10631
|
-
|
10584
|
+
select == null ? void 0 : select.register(proxy);
|
10632
10585
|
group == null ? void 0 : group.register(proxy);
|
10633
10586
|
});
|
10634
10587
|
onBeforeUnmount(() => {
|
10635
|
-
|
10588
|
+
select == null ? void 0 : select.unregister(proxy);
|
10636
10589
|
group == null ? void 0 : group.unregister(proxy);
|
10637
10590
|
});
|
10638
10591
|
return __spreadProps(__spreadValues({}, toRefs(states)), {
|
@@ -10670,7 +10623,7 @@ var OptionGroup = defineComponent({
|
|
10670
10623
|
const {
|
10671
10624
|
proxy
|
10672
10625
|
} = getCurrentInstance();
|
10673
|
-
const
|
10626
|
+
const select = inject(selectKey, null);
|
10674
10627
|
const states = reactive({
|
10675
10628
|
groupCollapse: props.collapse,
|
10676
10629
|
visible: true
|
@@ -10693,10 +10646,10 @@ var OptionGroup = defineComponent({
|
|
10693
10646
|
groupCollapse: toRef(states, "groupCollapse")
|
10694
10647
|
})));
|
10695
10648
|
onBeforeMount(() => {
|
10696
|
-
|
10649
|
+
select == null ? void 0 : select.registerGroup(proxy);
|
10697
10650
|
});
|
10698
10651
|
onBeforeUnmount(() => {
|
10699
|
-
|
10652
|
+
select == null ? void 0 : select.unregisterGroup(proxy);
|
10700
10653
|
});
|
10701
10654
|
return __spreadProps(__spreadValues({}, toRefs(states)), {
|
10702
10655
|
groupLabel,
|
@@ -11235,7 +11188,7 @@ var Component$a = defineComponent({
|
|
11235
11188
|
placeholder,
|
11236
11189
|
multiple,
|
11237
11190
|
remoteMethod,
|
11238
|
-
loading
|
11191
|
+
loading,
|
11239
11192
|
loadingText,
|
11240
11193
|
noDataText,
|
11241
11194
|
noMatchText,
|
@@ -11251,7 +11204,7 @@ var Component$a = defineComponent({
|
|
11251
11204
|
const popoverRef = ref();
|
11252
11205
|
const options = ref(/* @__PURE__ */ new Set());
|
11253
11206
|
const groups = ref(/* @__PURE__ */ new Set());
|
11254
|
-
const isDisabled = computed(() => disabled.value ||
|
11207
|
+
const isDisabled = computed(() => disabled.value || loading.value);
|
11255
11208
|
const selectedLabel = computed(() => [...states.selectedOptions.values()].map((option) => option.label));
|
11256
11209
|
const isAllSelected = computed(() => [...options.value.values()].filter((option) => !option.disabled).every((option) => states.selectedOptions.has(option)));
|
11257
11210
|
const isGroup = computed(() => !!groups.value.size);
|
@@ -11676,9 +11629,9 @@ var Component$8 = defineComponent({
|
|
11676
11629
|
emit
|
11677
11630
|
}) {
|
11678
11631
|
const defaultSteps = ref([]);
|
11679
|
-
const updateSteps = (
|
11632
|
+
const updateSteps = (steps) => {
|
11680
11633
|
const defaults = [];
|
11681
|
-
|
11634
|
+
steps.forEach((step) => {
|
11682
11635
|
if (typeof step === "string") {
|
11683
11636
|
defaults.push(step);
|
11684
11637
|
} else {
|
@@ -11939,12 +11892,12 @@ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
|
11939
11892
|
}
|
11940
11893
|
return { startIndex, height, diffHeight };
|
11941
11894
|
}
|
11942
|
-
function computedVirtualIndex(lineHeight, callback,
|
11895
|
+
function computedVirtualIndex(lineHeight, callback, pagination, el, event) {
|
11943
11896
|
if (!el) {
|
11944
11897
|
return;
|
11945
11898
|
}
|
11946
11899
|
const elScrollTop = el.scrollTop;
|
11947
|
-
const { scrollTop, count, groupItemCount, startIndex, endIndex } =
|
11900
|
+
const { scrollTop, count, groupItemCount, startIndex, endIndex } = pagination;
|
11948
11901
|
const { offsetHeight } = el;
|
11949
11902
|
let targetStartIndex = 0;
|
11950
11903
|
let targetEndIndex = 0;
|
@@ -11966,8 +11919,8 @@ function computedVirtualIndex(lineHeight, callback, pagination2, el, event) {
|
|
11966
11919
|
}
|
11967
11920
|
}
|
11968
11921
|
function visibleRender(e, wrapper, binding) {
|
11969
|
-
const { lineHeight = 30, handleScrollCallback, pagination
|
11970
|
-
const { startIndex, endIndex, groupItemCount, count, scrollTop } =
|
11922
|
+
const { lineHeight = 30, handleScrollCallback, pagination = {} } = binding.value;
|
11923
|
+
const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination;
|
11971
11924
|
computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e);
|
11972
11925
|
}
|
11973
11926
|
const throttledRender = (delay = 60) => lodash.exports.throttle((e, wrapper, binding) => visibleRender(e, wrapper, binding), delay);
|
@@ -12038,7 +11991,7 @@ var Component$6 = defineComponent({
|
|
12038
11991
|
};
|
12039
11992
|
}
|
12040
11993
|
const refRoot = ref(null);
|
12041
|
-
const
|
11994
|
+
const pagination = reactive({
|
12042
11995
|
startIndex: 0,
|
12043
11996
|
endIndex: 0,
|
12044
11997
|
scrollTop: 1,
|
@@ -12047,11 +12000,11 @@ var Component$6 = defineComponent({
|
|
12047
12000
|
groupItemCount: props.groupItemCount
|
12048
12001
|
});
|
12049
12002
|
const handleScrollCallback = (event, startIndex, endIndex, scrollTop, translateY) => {
|
12050
|
-
|
12051
|
-
|
12052
|
-
|
12053
|
-
|
12054
|
-
ctx.emit("content-scroll", [event,
|
12003
|
+
pagination.startIndex = startIndex;
|
12004
|
+
pagination.endIndex = endIndex;
|
12005
|
+
pagination.scrollTop = scrollTop;
|
12006
|
+
pagination.translateY = translateY;
|
12007
|
+
ctx.emit("content-scroll", [event, pagination]);
|
12055
12008
|
};
|
12056
12009
|
onMounted(() => {
|
12057
12010
|
nextTick(() => {
|
@@ -12076,11 +12029,11 @@ var Component$6 = defineComponent({
|
|
12076
12029
|
const innerHeight = ref(0);
|
12077
12030
|
const handleListChanged = (list) => {
|
12078
12031
|
listLength.value = Math.ceil((list || []).length / props.groupItemCount);
|
12079
|
-
|
12080
|
-
|
12081
|
-
|
12082
|
-
|
12083
|
-
|
12032
|
+
pagination.count = listLength.value;
|
12033
|
+
pagination.startIndex = 0;
|
12034
|
+
pagination.endIndex = 0;
|
12035
|
+
pagination.translateY = 0;
|
12036
|
+
pagination.scrollTop = 0;
|
12084
12037
|
const isAuto = typeof props.abosuteHeight === "string" && props.abosuteHeight === "auto";
|
12085
12038
|
if (isAuto) {
|
12086
12039
|
if (typeof props.lineHeight === "function") {
|
@@ -12101,15 +12054,15 @@ var Component$6 = defineComponent({
|
|
12101
12054
|
const afterListDataReset = () => {
|
12102
12055
|
var _a;
|
12103
12056
|
const el = (_a = refRoot.value) == null ? void 0 : _a.parentNode;
|
12104
|
-
computedVirtualIndex(props.lineHeight, handleScrollCallback,
|
12057
|
+
computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination, el, null);
|
12105
12058
|
};
|
12106
12059
|
const localList = computed(() => (props.list || []).map((item, index) => __spreadProps(__spreadValues({}, item), {
|
12107
12060
|
$index: index
|
12108
12061
|
})));
|
12109
|
-
const calcList = computed(() => localList.value.slice(
|
12062
|
+
const calcList = computed(() => localList.value.slice(pagination.startIndex * props.groupItemCount, (pagination.endIndex + props.preloadItemCount) * props.groupItemCount));
|
12110
12063
|
const innerContentStyle = computed(() => props.scrollPosition === "content" ? {
|
12111
|
-
top: `${
|
12112
|
-
transform: `translateY(-${
|
12064
|
+
top: `${pagination.scrollTop + props.scrollOffsetTop}px`,
|
12065
|
+
transform: `translateY(-${pagination.translateY}px)`
|
12113
12066
|
} : {});
|
12114
12067
|
const wrapperStyle = computed(() => __spreadValues({
|
12115
12068
|
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
@@ -12129,7 +12082,7 @@ var Component$6 = defineComponent({
|
|
12129
12082
|
const dirModifier = {
|
12130
12083
|
lineHeight: props.lineHeight,
|
12131
12084
|
handleScrollCallback,
|
12132
|
-
pagination
|
12085
|
+
pagination,
|
12133
12086
|
throttleDelay: props.throttleDelay
|
12134
12087
|
};
|
12135
12088
|
return () => {
|
@@ -12334,20 +12287,20 @@ var userPagination = (props) => {
|
|
12334
12287
|
const indexData = computed(() => props.data.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
12335
12288
|
__$table_row_index: index + 1
|
12336
12289
|
})));
|
12337
|
-
let
|
12290
|
+
let pagination = reactive({
|
12338
12291
|
count: 0,
|
12339
12292
|
limit: 10,
|
12340
12293
|
current: 1
|
12341
12294
|
});
|
12342
|
-
|
12295
|
+
pagination = resolvePaginationOption(props.pagination, pagination);
|
12343
12296
|
const resetStartEndIndex = () => {
|
12344
12297
|
if (!props.pagination || props.remotePagination) {
|
12345
12298
|
startIndex.value = 0;
|
12346
12299
|
endIndex.value = props.data.length;
|
12347
12300
|
return;
|
12348
12301
|
}
|
12349
|
-
startIndex.value = (
|
12350
|
-
endIndex.value =
|
12302
|
+
startIndex.value = (pagination.current - 1) * pagination.limit;
|
12303
|
+
endIndex.value = pagination.current * pagination.limit;
|
12351
12304
|
};
|
12352
12305
|
resetStartEndIndex();
|
12353
12306
|
const pageData = reactive([]);
|
@@ -12368,7 +12321,7 @@ var userPagination = (props) => {
|
|
12368
12321
|
sort(sortFn);
|
12369
12322
|
};
|
12370
12323
|
const watchEffectFn = (filterFn, sortFn) => {
|
12371
|
-
|
12324
|
+
pagination = resolvePaginationOption(props.pagination, pagination);
|
12372
12325
|
resetStartEndIndex();
|
12373
12326
|
resolvePageData(filterFn, sortFn);
|
12374
12327
|
};
|
@@ -12376,7 +12329,7 @@ var userPagination = (props) => {
|
|
12376
12329
|
if (!props.pagination) {
|
12377
12330
|
return null;
|
12378
12331
|
}
|
12379
|
-
return props.remotePagination ?
|
12332
|
+
return props.remotePagination ? pagination : __spreadProps(__spreadValues({}, pagination), {
|
12380
12333
|
count: props.data.length
|
12381
12334
|
});
|
12382
12335
|
});
|
@@ -13334,8 +13287,8 @@ var Component$4 = defineComponent({
|
|
13334
13287
|
resolvePageData(columnFilterFn, columnSortFn);
|
13335
13288
|
});
|
13336
13289
|
const handleScrollChanged = (args) => {
|
13337
|
-
const
|
13338
|
-
reactiveProp.scrollTranslateY =
|
13290
|
+
const pagination = args[1];
|
13291
|
+
reactiveProp.scrollTranslateY = pagination.translateY;
|
13339
13292
|
};
|
13340
13293
|
onMounted(() => {
|
13341
13294
|
observerIns = observerResize(root.value, () => {
|
@@ -13711,7 +13664,7 @@ var TagInput = defineComponent({
|
|
13711
13664
|
selectedTagList: [],
|
13712
13665
|
selectedTagListCache: []
|
13713
13666
|
});
|
13714
|
-
const tagList = computed(() => listState.selectedTagList.map((
|
13667
|
+
const tagList = computed(() => listState.selectedTagList.map((tag) => tag[props.saveKey]));
|
13715
13668
|
const formatList = useFlatList(props);
|
13716
13669
|
const renderList = computed(() => {
|
13717
13670
|
if (props.useGroup) {
|
@@ -13742,14 +13695,14 @@ var TagInput = defineComponent({
|
|
13742
13695
|
listState.selectedTagList = [];
|
13743
13696
|
listState.localList = [...formatList];
|
13744
13697
|
if (modelValue.length) {
|
13745
|
-
modelValue.forEach((
|
13746
|
-
const value = listState.localList.find((val) =>
|
13698
|
+
modelValue.forEach((tag) => {
|
13699
|
+
const value = listState.localList.find((val) => tag === val[saveKey]);
|
13747
13700
|
if (value !== void 0) {
|
13748
13701
|
listState.selectedTagList.push(value);
|
13749
|
-
} else if (allowCreate && !tagList.value.includes(
|
13702
|
+
} else if (allowCreate && !tagList.value.includes(tag)) {
|
13750
13703
|
listState.selectedTagList.push({
|
13751
|
-
[saveKey]:
|
13752
|
-
[displayKey]:
|
13704
|
+
[saveKey]: tag,
|
13705
|
+
[displayKey]: tag
|
13753
13706
|
});
|
13754
13707
|
}
|
13755
13708
|
});
|
@@ -14055,7 +14008,7 @@ var TagInput = defineComponent({
|
|
14055
14008
|
const nodes = getSelectedTagNodes();
|
14056
14009
|
const index = getTagInputItemSite();
|
14057
14010
|
const localInitData = listState.localList.map((data2) => data2[saveKey]);
|
14058
|
-
tags = tags.filter((
|
14011
|
+
tags = tags.filter((tag) => (tag == null ? void 0 : tag.trim()) && !tagList.value.includes(tag) && localInitData.includes(tag));
|
14059
14012
|
if (maxData !== -1) {
|
14060
14013
|
const selectedLength = listState.selectedTagList.length;
|
14061
14014
|
if (selectedLength < maxData) {
|
@@ -14067,7 +14020,7 @@ var TagInput = defineComponent({
|
|
14067
14020
|
tags = [];
|
14068
14021
|
}
|
14069
14022
|
}
|
14070
|
-
const localTags = listState.localList.filter((
|
14023
|
+
const localTags = listState.localList.filter((tag) => tags.includes(tag[saveKey]));
|
14071
14024
|
if (tags.length) {
|
14072
14025
|
listState.selectedTagList.splice(index, 0, ...localTags);
|
14073
14026
|
swapElementPositions(tagInputItemRef.value, nodes[index]);
|
@@ -14105,14 +14058,14 @@ var TagInput = defineComponent({
|
|
14105
14058
|
}
|
14106
14059
|
return true;
|
14107
14060
|
};
|
14108
|
-
const existTag = (value) => listState.localList.find((
|
14061
|
+
const existTag = (value) => listState.localList.find((tag) => tag[saveKey] === value);
|
14109
14062
|
if (type === "custom") {
|
14110
14063
|
if (separator) {
|
14111
14064
|
let tags = item.split(separator);
|
14112
|
-
tags = tags.filter((
|
14113
|
-
const localTags = tags.map((
|
14114
|
-
[saveKey]:
|
14115
|
-
[displayKey]:
|
14065
|
+
tags = tags.filter((tag) => (tag == null ? void 0 : tag.trim()) && !tagList.value.includes(tag) && validateTag(tag));
|
14066
|
+
const localTags = tags.map((tag) => existTag(tag) || {
|
14067
|
+
[saveKey]: tag,
|
14068
|
+
[displayKey]: tag
|
14116
14069
|
});
|
14117
14070
|
if (tags.length) {
|
14118
14071
|
listState.selectedTagList.splice(targetIndex, 0, ...localTags);
|
@@ -15172,7 +15125,7 @@ var Component$3 = defineComponent({
|
|
15172
15125
|
const openedKeys = ref([]);
|
15173
15126
|
const menuStore = ref({});
|
15174
15127
|
const mode = computed(() => props.mode);
|
15175
|
-
const
|
15128
|
+
const collapse = ref(props.collapse);
|
15176
15129
|
const oldOpenKeys = ref([]);
|
15177
15130
|
watch(() => props.OpenedKeys, (keys = openedKeys.value) => {
|
15178
15131
|
openedKeys.value = keys;
|
@@ -15185,11 +15138,11 @@ var Component$3 = defineComponent({
|
|
15185
15138
|
}
|
15186
15139
|
});
|
15187
15140
|
watch(() => props.collapse, () => {
|
15188
|
-
|
15141
|
+
collapse.value = props.collapse;
|
15189
15142
|
const oldKeys = [...oldOpenKeys.value];
|
15190
15143
|
const openKeys = [...openedKeys.value];
|
15191
|
-
openedKeys.value =
|
15192
|
-
oldOpenKeys.value =
|
15144
|
+
openedKeys.value = collapse.value ? [] : oldKeys;
|
15145
|
+
oldOpenKeys.value = collapse.value ? openKeys : [];
|
15193
15146
|
}, {
|
15194
15147
|
immediate: true
|
15195
15148
|
});
|
@@ -15226,7 +15179,7 @@ var Component$3 = defineComponent({
|
|
15226
15179
|
unregisterMenuInfo,
|
15227
15180
|
mode: mode.value,
|
15228
15181
|
openedKeys,
|
15229
|
-
collapse
|
15182
|
+
collapse,
|
15230
15183
|
handleOpenChange,
|
15231
15184
|
handleActiveChange
|
15232
15185
|
});
|
@@ -15235,7 +15188,7 @@ var Component$3 = defineComponent({
|
|
15235
15188
|
return createVNode("div", {
|
15236
15189
|
"class": {
|
15237
15190
|
"bk-menu": true,
|
15238
|
-
"is-collapse":
|
15191
|
+
"is-collapse": collapse.value
|
15239
15192
|
}
|
15240
15193
|
}, [(_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)]);
|
15241
15194
|
};
|
@@ -15340,7 +15293,7 @@ var Submenu = defineComponent({
|
|
15340
15293
|
unregisterMenuInfo,
|
15341
15294
|
openedKeys,
|
15342
15295
|
handleOpenChange,
|
15343
|
-
collapse
|
15296
|
+
collapse,
|
15344
15297
|
activeKey,
|
15345
15298
|
menuStore
|
15346
15299
|
} = useMenuInject();
|
@@ -15354,7 +15307,7 @@ var Submenu = defineComponent({
|
|
15354
15307
|
const specialCollapse = computed(() => {
|
15355
15308
|
var _a2, _b2;
|
15356
15309
|
const activeParentKey = (_b2 = (_a2 = menuStore.value) == null ? void 0 : _a2[activeKey.value]) == null ? void 0 : _b2.parentKey;
|
15357
|
-
return
|
15310
|
+
return collapse.value && activeParentKey === key && isShow;
|
15358
15311
|
});
|
15359
15312
|
useMenuPathProvider(key);
|
15360
15313
|
registerMenuInfo(key, {
|
@@ -17351,15 +17304,15 @@ function isProtectedDayOfYearToken(token2) {
|
|
17351
17304
|
function isProtectedWeekYearToken(token2) {
|
17352
17305
|
return protectedWeekYearTokens.indexOf(token2) !== -1;
|
17353
17306
|
}
|
17354
|
-
function throwProtectedError(token2, format2,
|
17307
|
+
function throwProtectedError(token2, format2, input) {
|
17355
17308
|
if (token2 === "YYYY") {
|
17356
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(
|
17309
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
17357
17310
|
} else if (token2 === "YY") {
|
17358
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(
|
17311
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
17359
17312
|
} else if (token2 === "D") {
|
17360
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(
|
17313
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
17361
17314
|
} else if (token2 === "DD") {
|
17362
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(
|
17315
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
17363
17316
|
}
|
17364
17317
|
}
|
17365
17318
|
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
@@ -17434,8 +17387,8 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
17434
17387
|
}).join("");
|
17435
17388
|
return result;
|
17436
17389
|
}
|
17437
|
-
function cleanEscapedString(
|
17438
|
-
return
|
17390
|
+
function cleanEscapedString(input) {
|
17391
|
+
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
17439
17392
|
}
|
17440
17393
|
const fecha = {};
|
17441
17394
|
const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
@@ -18180,7 +18133,7 @@ var DatePanel = defineComponent({
|
|
18180
18133
|
handlePickSuccess();
|
18181
18134
|
}
|
18182
18135
|
};
|
18183
|
-
const
|
18136
|
+
const reset = () => {
|
18184
18137
|
state.currentView = props.selectionMode;
|
18185
18138
|
state.pickerTable = getTableType(state.currentView);
|
18186
18139
|
};
|
@@ -18236,7 +18189,7 @@ var DatePanel = defineComponent({
|
|
18236
18189
|
handleShortcutClick,
|
18237
18190
|
changeYear,
|
18238
18191
|
changeMonth,
|
18239
|
-
reset
|
18192
|
+
reset,
|
18240
18193
|
isTime,
|
18241
18194
|
onToggleVisibility
|
18242
18195
|
});
|
@@ -18402,7 +18355,7 @@ var DateRangePanel = defineComponent({
|
|
18402
18355
|
}
|
18403
18356
|
return a2.getTime() - b2.getTime();
|
18404
18357
|
};
|
18405
|
-
const
|
18358
|
+
const reset = () => {
|
18406
18359
|
state.currentView = props.selectionMode;
|
18407
18360
|
state.leftPickerTable = `${state.currentView}-table`;
|
18408
18361
|
state.rightPickerTable = `${state.currentView}-table`;
|
@@ -18569,7 +18522,7 @@ var DateRangePanel = defineComponent({
|
|
18569
18522
|
rightShowLabelSecond,
|
18570
18523
|
preSelecting,
|
18571
18524
|
panelPickerHandlers,
|
18572
|
-
reset
|
18525
|
+
reset,
|
18573
18526
|
onToggleVisibility,
|
18574
18527
|
handleRangePick,
|
18575
18528
|
handleChangeRange
|
@@ -19099,7 +19052,7 @@ var Component$2 = defineComponent({
|
|
19099
19052
|
state.visible = true;
|
19100
19053
|
}
|
19101
19054
|
};
|
19102
|
-
const
|
19055
|
+
const reset = () => {
|
19103
19056
|
var _a;
|
19104
19057
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.reset();
|
19105
19058
|
};
|
@@ -19116,7 +19069,7 @@ var Component$2 = defineComponent({
|
|
19116
19069
|
state.isFocused = false;
|
19117
19070
|
onSelectionModeChange(props.type);
|
19118
19071
|
state.internalValue = state.internalValue.slice();
|
19119
|
-
|
19072
|
+
reset();
|
19120
19073
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.onToggleVisibility(false);
|
19121
19074
|
};
|
19122
19075
|
const handleKeydown = (e) => {
|
@@ -19161,7 +19114,7 @@ var Component$2 = defineComponent({
|
|
19161
19114
|
state.internalValue = state.internalValue.map(() => null);
|
19162
19115
|
emit("clear");
|
19163
19116
|
emitChange(props.type);
|
19164
|
-
|
19117
|
+
reset();
|
19165
19118
|
state.showClose = false;
|
19166
19119
|
state.shortcut = null;
|
19167
19120
|
setTimeout(() => onSelectionModeChange(props.type), 500);
|
@@ -19178,7 +19131,7 @@ var Component$2 = defineComponent({
|
|
19178
19131
|
emit("pick-success");
|
19179
19132
|
});
|
19180
19133
|
(_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.blur();
|
19181
|
-
|
19134
|
+
reset();
|
19182
19135
|
};
|
19183
19136
|
const onPick = (_dates, visible = false, type, shortcut2) => {
|
19184
19137
|
let dates = _dates;
|
@@ -20612,38 +20565,38 @@ var FormItem = defineComponent({
|
|
20612
20565
|
isError: false,
|
20613
20566
|
errorMessage: ""
|
20614
20567
|
});
|
20615
|
-
const
|
20616
|
-
const isForm = Boolean(
|
20568
|
+
const form = inject(formKey);
|
20569
|
+
const isForm = Boolean(form);
|
20617
20570
|
const labelStyles = computed(() => {
|
20618
20571
|
const styles = {
|
20619
20572
|
width: "",
|
20620
20573
|
paddingRight: "",
|
20621
20574
|
textAlign: ""
|
20622
20575
|
};
|
20623
|
-
const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm &&
|
20576
|
+
const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form.props.labelWidth;
|
20624
20577
|
if (isValid(labelWidth)) {
|
20625
20578
|
styles.width = `${labelWidth}px`;
|
20626
20579
|
styles.paddingRight = labelWidth ? "" : "0px";
|
20627
20580
|
}
|
20628
|
-
const labelPosition = props.labelPosition || isForm &&
|
20581
|
+
const labelPosition = props.labelPosition || isForm && form.props.labelPosition;
|
20629
20582
|
if (labelPosition) {
|
20630
20583
|
styles["text-align"] = labelPosition;
|
20631
20584
|
}
|
20632
20585
|
return styles;
|
20633
20586
|
});
|
20634
20587
|
const validate = () => {
|
20635
|
-
if (!props.property || isForm && !
|
20588
|
+
if (!props.property || isForm && !form.props.model) {
|
20636
20589
|
return Promise.resolve();
|
20637
20590
|
}
|
20638
20591
|
let rules = [];
|
20639
|
-
if (isForm &&
|
20640
|
-
rules =
|
20592
|
+
if (isForm && form.props.rules && hasOwn(form.props.rules, props.property)) {
|
20593
|
+
rules = form.props.rules[props.property];
|
20641
20594
|
}
|
20642
20595
|
if (props.rules) {
|
20643
20596
|
rules = props.rules;
|
20644
20597
|
}
|
20645
20598
|
rules = mergeRules(rules, getRulesFromProps(props));
|
20646
|
-
const value =
|
20599
|
+
const value = form.props.model[props.property];
|
20647
20600
|
const doValidate = (() => {
|
20648
20601
|
let stepIndex = -1;
|
20649
20602
|
return () => {
|
@@ -20678,12 +20631,12 @@ var FormItem = defineComponent({
|
|
20678
20631
|
};
|
20679
20632
|
onMounted(() => {
|
20680
20633
|
if (isForm) {
|
20681
|
-
|
20634
|
+
form.register(currentInstance.proxy);
|
20682
20635
|
}
|
20683
20636
|
});
|
20684
20637
|
onBeforeUnmount(() => {
|
20685
20638
|
if (isForm) {
|
20686
|
-
|
20639
|
+
form.unregister(currentInstance.proxy);
|
20687
20640
|
}
|
20688
20641
|
});
|
20689
20642
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|