bkui-vue 0.0.1-beta.50 → 0.0.1-beta.53
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 +18 -18
- package/dist/index.esm.js +149 -201
- package/dist/index.umd.js +20 -20
- package/dist/style.css +1 -1
- package/lib/alert/alert.d.ts +1 -1
- package/lib/alert/index.d.ts +4 -4
- package/lib/animate-number/animate-number.d.ts +1 -1
- package/lib/animate-number/index.d.ts +4 -4
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/index.d.ts +4 -4
- package/lib/badge/badge.d.ts +2 -2
- package/lib/badge/index.d.ts +7 -7
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +4 -4
- package/lib/button/button.d.ts +2 -2
- package/lib/button/index.d.ts +7 -7
- package/lib/code-diff/index.js +1 -1
- package/lib/components.js +1 -0
- package/lib/date-picker/date-picker.d.ts +6 -6
- package/lib/date-picker/index.d.ts +17 -17
- package/lib/date-picker/props.d.ts +1 -1
- package/lib/dialog/dialog.d.ts +1 -1
- package/lib/dialog/index.d.ts +4 -4
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/index.d.ts +4 -4
- 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/input/index.d.ts +3 -3
- package/lib/input/input.d.ts +1 -1
- package/lib/link/index.d.ts +7 -7
- package/lib/link/link.d.ts +2 -2
- package/lib/modal/index.d.ts +4 -4
- package/lib/modal/modal.d.ts +1 -1
- package/lib/popover/index.d.ts +4 -4
- package/lib/popover/popover.d.ts +1 -1
- package/lib/preset.js +1 -0
- package/lib/resize-layout/index.d.ts +4 -4
- package/lib/resize-layout/resize-layout.d.ts +1 -1
- package/lib/select/index.d.ts +3 -3
- package/lib/select/select.d.ts +1 -1
- package/lib/sideslider/index.d.ts +4 -4
- package/lib/sideslider/sideslider.d.ts +1 -1
- package/lib/slider/slider.d.ts +1 -1
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/switcher.d.ts +1 -1
- package/lib/tab/index.d.ts +8 -8
- package/lib/tab/tab-nav.d.ts +1 -1
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/tab/tab.d.ts +2 -2
- package/lib/table/index.d.ts +4 -4
- package/lib/table/table.d.ts +1 -1
- package/package.json +7 -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,
|
@@ -93,7 +46,7 @@ const BKLAYERD_INDEX_EFAULT_VALUE = {
|
|
93
46
|
};
|
94
47
|
class BKZIndexManager {
|
95
48
|
constructor() {
|
96
|
-
|
49
|
+
this.storageLayerIndexValue = {};
|
97
50
|
this.copyDefaultValue();
|
98
51
|
}
|
99
52
|
getNextIndex(type) {
|
@@ -1529,22 +1482,21 @@ function isElement$1(obj) {
|
|
1529
1482
|
}
|
1530
1483
|
class BKPopover {
|
1531
1484
|
constructor(reference2, popperRefer, options) {
|
1532
|
-
__publicField(this, "isShow", false);
|
1533
|
-
__publicField(this, "trigger");
|
1534
|
-
__publicField(this, "instance");
|
1535
|
-
__publicField(this, "reference");
|
1536
|
-
__publicField(this, "referenceTarget");
|
1537
|
-
__publicField(this, "popperRefer");
|
1538
|
-
__publicField(this, "instanceOptions");
|
1539
|
-
__publicField(this, "delay", 50);
|
1540
|
-
__publicField(this, "isInnerPopper", false);
|
1541
|
-
__publicField(this, "disabled", false);
|
1542
|
-
__publicField(this, "afterShow", null);
|
1543
|
-
__publicField(this, "afterHidden", null);
|
1544
|
-
__publicField(this, "appendTo", "parent");
|
1545
|
-
__publicField(this, "container", null);
|
1546
|
-
__publicField(this, "fixOnBoundary", false);
|
1547
1485
|
var _a, _b;
|
1486
|
+
this.isShow = false;
|
1487
|
+
this.trigger = void 0;
|
1488
|
+
this.instance = void 0;
|
1489
|
+
this.reference = void 0;
|
1490
|
+
this.referenceTarget = void 0;
|
1491
|
+
this.popperRefer = void 0;
|
1492
|
+
this.delay = 50;
|
1493
|
+
this.isInnerPopper = false;
|
1494
|
+
this.disabled = false;
|
1495
|
+
this.afterShow = null;
|
1496
|
+
this.afterHidden = null;
|
1497
|
+
this.appendTo = "parent";
|
1498
|
+
this.container = null;
|
1499
|
+
this.fixOnBoundary = false;
|
1548
1500
|
this.instanceOptions = this.initDefaultOptions(options);
|
1549
1501
|
this.reference = this.resolveInputSelectorToHtmlElement(reference2);
|
1550
1502
|
this.popperRefer = this.resolveInputSelectorToHtmlElement(popperRefer);
|
@@ -1774,15 +1726,13 @@ const random = (n2, str = lowerStr) => {
|
|
1774
1726
|
};
|
1775
1727
|
class BkMaskManager {
|
1776
1728
|
constructor(config) {
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
__publicField(this, "lastUUID", null);
|
1785
|
-
__publicField(this, "maskStyle", {
|
1729
|
+
this.multiInstance = false;
|
1730
|
+
this.uniqueMaskAttrTag = "";
|
1731
|
+
this.parentNode = document.body;
|
1732
|
+
this.activeInstance = void 0;
|
1733
|
+
this.zIndexStore = /* @__PURE__ */ new Map();
|
1734
|
+
this.lastUUID = null;
|
1735
|
+
this.maskStyle = {
|
1786
1736
|
position: "absolute",
|
1787
1737
|
left: 0,
|
1788
1738
|
top: 0,
|
@@ -1790,7 +1740,7 @@ class BkMaskManager {
|
|
1790
1740
|
right: 0,
|
1791
1741
|
display: "none",
|
1792
1742
|
"background-color": "rgba(0,0,0,.6)"
|
1793
|
-
}
|
1743
|
+
};
|
1794
1744
|
const { multiInstance = false, maskAttrTag = "auto", parentNode = document.body, maskStyle = {} } = config || {};
|
1795
1745
|
this.activeInstance = void 0;
|
1796
1746
|
this.multiInstance = multiInstance;
|
@@ -1880,11 +1830,11 @@ class BkMaskManager {
|
|
1880
1830
|
Object.entries(maskStyle).forEach((cfg) => this.mask.style.setProperty(cfg[0], cfg[1]));
|
1881
1831
|
}
|
1882
1832
|
}
|
1883
|
-
getMaskAttrTag(
|
1884
|
-
if (/^(auto|\s+)$/i.test(
|
1833
|
+
getMaskAttrTag(tag) {
|
1834
|
+
if (/^(auto|\s+)$/i.test(tag) || tag === null || tag === void 0 || tag === "") {
|
1885
1835
|
return `__bk_mask_${random(16)}`;
|
1886
1836
|
}
|
1887
|
-
return
|
1837
|
+
return tag;
|
1888
1838
|
}
|
1889
1839
|
appendContentToMask(content) {
|
1890
1840
|
this.mask.append(content);
|
@@ -1893,8 +1843,6 @@ class BkMaskManager {
|
|
1893
1843
|
const bKMaskManager = new BkMaskManager({});
|
1894
1844
|
class BKPopIndexManager {
|
1895
1845
|
constructor() {
|
1896
|
-
__publicField(this, "popInstanceList");
|
1897
|
-
__publicField(this, "uuidAttrName");
|
1898
1846
|
this.popInstanceList = [];
|
1899
1847
|
this.uuidAttrName = "data-bk-pop-uuid";
|
1900
1848
|
}
|
@@ -3962,20 +3910,20 @@ var lodash = { exports: {} };
|
|
3962
3910
|
return copyArray(value, result2);
|
3963
3911
|
}
|
3964
3912
|
} else {
|
3965
|
-
var
|
3913
|
+
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
3966
3914
|
if (isBuffer(value)) {
|
3967
3915
|
return cloneBuffer(value, isDeep);
|
3968
3916
|
}
|
3969
|
-
if (
|
3917
|
+
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
3970
3918
|
result2 = isFlat || isFunc ? {} : initCloneObject(value);
|
3971
3919
|
if (!isDeep) {
|
3972
3920
|
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
|
3973
3921
|
}
|
3974
3922
|
} else {
|
3975
|
-
if (!cloneableTags[
|
3923
|
+
if (!cloneableTags[tag]) {
|
3976
3924
|
return object ? value : {};
|
3977
3925
|
}
|
3978
|
-
result2 = initCloneByTag(value,
|
3926
|
+
result2 = initCloneByTag(value, tag, isDeep);
|
3979
3927
|
}
|
3980
3928
|
}
|
3981
3929
|
stack || (stack = new Stack());
|
@@ -5270,11 +5218,11 @@ var lodash = { exports: {} };
|
|
5270
5218
|
};
|
5271
5219
|
function createToPairs(keysFunc) {
|
5272
5220
|
return function(object) {
|
5273
|
-
var
|
5274
|
-
if (
|
5221
|
+
var tag = getTag(object);
|
5222
|
+
if (tag == mapTag) {
|
5275
5223
|
return mapToArray(object);
|
5276
5224
|
}
|
5277
|
-
if (
|
5225
|
+
if (tag == setTag) {
|
5278
5226
|
return setToPairs(object);
|
5279
5227
|
}
|
5280
5228
|
return baseToPairs(object, keysFunc(object));
|
@@ -5394,8 +5342,8 @@ var lodash = { exports: {} };
|
|
5394
5342
|
stack["delete"](other);
|
5395
5343
|
return result2;
|
5396
5344
|
}
|
5397
|
-
function equalByTag(object, other,
|
5398
|
-
switch (
|
5345
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
5346
|
+
switch (tag) {
|
5399
5347
|
case dataViewTag:
|
5400
5348
|
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
5401
5349
|
return false;
|
@@ -5531,7 +5479,7 @@ var lodash = { exports: {} };
|
|
5531
5479
|
return baseIsNative(value) ? value : undefined$1;
|
5532
5480
|
}
|
5533
5481
|
function getRawTag(value) {
|
5534
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
5482
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
5535
5483
|
try {
|
5536
5484
|
value[symToStringTag] = undefined$1;
|
5537
5485
|
var unmasked = true;
|
@@ -5540,7 +5488,7 @@ var lodash = { exports: {} };
|
|
5540
5488
|
var result2 = nativeObjectToString.call(value);
|
5541
5489
|
if (unmasked) {
|
5542
5490
|
if (isOwn) {
|
5543
|
-
value[symToStringTag] =
|
5491
|
+
value[symToStringTag] = tag;
|
5544
5492
|
} else {
|
5545
5493
|
delete value[symToStringTag];
|
5546
5494
|
}
|
@@ -5637,9 +5585,9 @@ var lodash = { exports: {} };
|
|
5637
5585
|
function initCloneObject(object) {
|
5638
5586
|
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
5639
5587
|
}
|
5640
|
-
function initCloneByTag(object,
|
5588
|
+
function initCloneByTag(object, tag, isDeep) {
|
5641
5589
|
var Ctor = object.constructor;
|
5642
|
-
switch (
|
5590
|
+
switch (tag) {
|
5643
5591
|
case arrayBufferTag:
|
5644
5592
|
return cloneArrayBuffer(object);
|
5645
5593
|
case boolTag:
|
@@ -6520,8 +6468,8 @@ var lodash = { exports: {} };
|
|
6520
6468
|
if (isArrayLike(collection)) {
|
6521
6469
|
return isString(collection) ? stringSize(collection) : collection.length;
|
6522
6470
|
}
|
6523
|
-
var
|
6524
|
-
if (
|
6471
|
+
var tag = getTag(collection);
|
6472
|
+
if (tag == mapTag || tag == setTag) {
|
6525
6473
|
return collection.size;
|
6526
6474
|
}
|
6527
6475
|
return baseKeys(collection).length;
|
@@ -6859,8 +6807,8 @@ var lodash = { exports: {} };
|
|
6859
6807
|
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
6860
6808
|
return !value.length;
|
6861
6809
|
}
|
6862
|
-
var
|
6863
|
-
if (
|
6810
|
+
var tag = getTag(value);
|
6811
|
+
if (tag == mapTag || tag == setTag) {
|
6864
6812
|
return !value.size;
|
6865
6813
|
}
|
6866
6814
|
if (isPrototype(value)) {
|
@@ -6885,8 +6833,8 @@ var lodash = { exports: {} };
|
|
6885
6833
|
if (!isObjectLike(value)) {
|
6886
6834
|
return false;
|
6887
6835
|
}
|
6888
|
-
var
|
6889
|
-
return
|
6836
|
+
var tag = baseGetTag(value);
|
6837
|
+
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
|
6890
6838
|
}
|
6891
6839
|
function isFinite2(value) {
|
6892
6840
|
return typeof value == "number" && nativeIsFinite(value);
|
@@ -6895,8 +6843,8 @@ var lodash = { exports: {} };
|
|
6895
6843
|
if (!isObject2(value)) {
|
6896
6844
|
return false;
|
6897
6845
|
}
|
6898
|
-
var
|
6899
|
-
return
|
6846
|
+
var tag = baseGetTag(value);
|
6847
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
6900
6848
|
}
|
6901
6849
|
function isInteger(value) {
|
6902
6850
|
return typeof value == "number" && value == toInteger2(value);
|
@@ -6983,7 +6931,7 @@ var lodash = { exports: {} };
|
|
6983
6931
|
if (symIterator && value[symIterator]) {
|
6984
6932
|
return iteratorToArray(value[symIterator]());
|
6985
6933
|
}
|
6986
|
-
var
|
6934
|
+
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
|
6987
6935
|
return func(value);
|
6988
6936
|
}
|
6989
6937
|
function toFinite(value) {
|
@@ -9774,15 +9722,15 @@ const Circle = (_2, {
|
|
9774
9722
|
const radius = 50 - circleStrokeWidth / 2;
|
9775
9723
|
const isDashboard = type === "dashboard";
|
9776
9724
|
const len = Math.PI * 2 * radius;
|
9777
|
-
const
|
9778
|
-
const strokeDashoffset = `${-1 * len * (1 -
|
9725
|
+
const rate = isDashboard && 0.75 || 1;
|
9726
|
+
const strokeDashoffset = `${-1 * len * (1 - rate) / 2}px`;
|
9779
9727
|
const transition = "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease";
|
9780
9728
|
const trailStyle = {
|
9781
|
-
strokeDasharray: `${len *
|
9729
|
+
strokeDasharray: `${len * rate}px, ${len}px`,
|
9782
9730
|
strokeDashoffset
|
9783
9731
|
};
|
9784
9732
|
const pathStyle = {
|
9785
|
-
strokeDasharray: `${len *
|
9733
|
+
strokeDasharray: `${len * rate * (percent / 100)}px, ${len}px`,
|
9786
9734
|
strokeDashoffset,
|
9787
9735
|
transition
|
9788
9736
|
};
|
@@ -9933,11 +9881,11 @@ var Component$f = defineComponent({
|
|
9933
9881
|
const $props = __spreadProps(__spreadValues({}, this.$props), {
|
9934
9882
|
percent: this.validPercent(this.percent)
|
9935
9883
|
});
|
9936
|
-
let
|
9884
|
+
let progress = createVNode(Line, $props, _isSlot$3(progressInfo) ? progressInfo : {
|
9937
9885
|
default: () => [progressInfo]
|
9938
9886
|
});
|
9939
9887
|
if (this.type === "circle" || this.type === "dashboard") {
|
9940
|
-
|
9888
|
+
progress = createVNode(Circle, $props, _isSlot$3(progressInfo) ? progressInfo : {
|
9941
9889
|
default: () => [progressInfo]
|
9942
9890
|
});
|
9943
9891
|
}
|
@@ -9946,7 +9894,7 @@ var Component$f = defineComponent({
|
|
9946
9894
|
extCls: !!this.extCls
|
9947
9895
|
}, `bk-progress bk-progress-${this.type}`)
|
9948
9896
|
};
|
9949
|
-
return createVNode("div", progressProps, [
|
9897
|
+
return createVNode("div", progressProps, [progress]);
|
9950
9898
|
}
|
9951
9899
|
});
|
9952
9900
|
const BkProgress = withInstall(Component$f);
|
@@ -10221,14 +10169,14 @@ var star = defineComponent({
|
|
10221
10169
|
const chooseRate = (index) => {
|
10222
10170
|
if (!props.editable)
|
10223
10171
|
return;
|
10224
|
-
const
|
10225
|
-
emit("chooseRate",
|
10172
|
+
const rate = index + 1;
|
10173
|
+
emit("chooseRate", rate);
|
10226
10174
|
};
|
10227
10175
|
const changeHover = (index) => {
|
10228
10176
|
if (!props.editable)
|
10229
10177
|
return;
|
10230
|
-
const
|
10231
|
-
emit("changeHover",
|
10178
|
+
const rate = index + 1;
|
10179
|
+
emit("changeHover", rate);
|
10232
10180
|
};
|
10233
10181
|
const starClass = (index) => classes({
|
10234
10182
|
"bk-is-select": index < Math.floor(displayRate.value),
|
@@ -10390,10 +10338,10 @@ var Component$c = defineComponent({
|
|
10390
10338
|
swiperIndex.value = showIndex;
|
10391
10339
|
emit("index-change", showIndex);
|
10392
10340
|
};
|
10393
|
-
const goToLink = (
|
10394
|
-
if (!
|
10341
|
+
const goToLink = (link) => {
|
10342
|
+
if (!link)
|
10395
10343
|
return;
|
10396
|
-
window.open(
|
10344
|
+
window.open(link, "_blank");
|
10397
10345
|
};
|
10398
10346
|
const getRenderItemClass = (renderData) => ["bk-swiper-img", {
|
10399
10347
|
"bk-swiper-link": renderData.link
|
@@ -10618,21 +10566,21 @@ var BkOption = defineComponent({
|
|
10618
10566
|
const {
|
10619
10567
|
disabled
|
10620
10568
|
} = toRefs(props);
|
10621
|
-
const
|
10569
|
+
const select = inject(selectKey, null);
|
10622
10570
|
const group = inject(optionGroupKey, null);
|
10623
|
-
const selected = computed(() =>
|
10624
|
-
const multiple = computed(() =>
|
10571
|
+
const selected = computed(() => select.selectedOptions.has(proxy));
|
10572
|
+
const multiple = computed(() => select == null ? void 0 : select.props.multiple);
|
10625
10573
|
const handleOptionClick = () => {
|
10626
10574
|
if (disabled.value)
|
10627
10575
|
return;
|
10628
|
-
|
10576
|
+
select == null ? void 0 : select.handleOptionSelected(proxy);
|
10629
10577
|
};
|
10630
10578
|
onBeforeMount(() => {
|
10631
|
-
|
10579
|
+
select == null ? void 0 : select.register(proxy);
|
10632
10580
|
group == null ? void 0 : group.register(proxy);
|
10633
10581
|
});
|
10634
10582
|
onBeforeUnmount(() => {
|
10635
|
-
|
10583
|
+
select == null ? void 0 : select.unregister(proxy);
|
10636
10584
|
group == null ? void 0 : group.unregister(proxy);
|
10637
10585
|
});
|
10638
10586
|
return __spreadProps(__spreadValues({}, toRefs(states)), {
|
@@ -10670,7 +10618,7 @@ var OptionGroup = defineComponent({
|
|
10670
10618
|
const {
|
10671
10619
|
proxy
|
10672
10620
|
} = getCurrentInstance();
|
10673
|
-
const
|
10621
|
+
const select = inject(selectKey, null);
|
10674
10622
|
const states = reactive({
|
10675
10623
|
groupCollapse: props.collapse,
|
10676
10624
|
visible: true
|
@@ -10693,10 +10641,10 @@ var OptionGroup = defineComponent({
|
|
10693
10641
|
groupCollapse: toRef(states, "groupCollapse")
|
10694
10642
|
})));
|
10695
10643
|
onBeforeMount(() => {
|
10696
|
-
|
10644
|
+
select == null ? void 0 : select.registerGroup(proxy);
|
10697
10645
|
});
|
10698
10646
|
onBeforeUnmount(() => {
|
10699
|
-
|
10647
|
+
select == null ? void 0 : select.unregisterGroup(proxy);
|
10700
10648
|
});
|
10701
10649
|
return __spreadProps(__spreadValues({}, toRefs(states)), {
|
10702
10650
|
groupLabel,
|
@@ -11235,7 +11183,7 @@ var Component$a = defineComponent({
|
|
11235
11183
|
placeholder,
|
11236
11184
|
multiple,
|
11237
11185
|
remoteMethod,
|
11238
|
-
loading
|
11186
|
+
loading,
|
11239
11187
|
loadingText,
|
11240
11188
|
noDataText,
|
11241
11189
|
noMatchText,
|
@@ -11251,7 +11199,7 @@ var Component$a = defineComponent({
|
|
11251
11199
|
const popoverRef = ref();
|
11252
11200
|
const options = ref(/* @__PURE__ */ new Set());
|
11253
11201
|
const groups = ref(/* @__PURE__ */ new Set());
|
11254
|
-
const isDisabled = computed(() => disabled.value ||
|
11202
|
+
const isDisabled = computed(() => disabled.value || loading.value);
|
11255
11203
|
const selectedLabel = computed(() => [...states.selectedOptions.values()].map((option) => option.label));
|
11256
11204
|
const isAllSelected = computed(() => [...options.value.values()].filter((option) => !option.disabled).every((option) => states.selectedOptions.has(option)));
|
11257
11205
|
const isGroup = computed(() => !!groups.value.size);
|
@@ -11676,9 +11624,9 @@ var Component$8 = defineComponent({
|
|
11676
11624
|
emit
|
11677
11625
|
}) {
|
11678
11626
|
const defaultSteps = ref([]);
|
11679
|
-
const updateSteps = (
|
11627
|
+
const updateSteps = (steps) => {
|
11680
11628
|
const defaults = [];
|
11681
|
-
|
11629
|
+
steps.forEach((step) => {
|
11682
11630
|
if (typeof step === "string") {
|
11683
11631
|
defaults.push(step);
|
11684
11632
|
} else {
|
@@ -11939,12 +11887,12 @@ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
|
11939
11887
|
}
|
11940
11888
|
return { startIndex, height, diffHeight };
|
11941
11889
|
}
|
11942
|
-
function computedVirtualIndex(lineHeight, callback,
|
11890
|
+
function computedVirtualIndex(lineHeight, callback, pagination, el, event) {
|
11943
11891
|
if (!el) {
|
11944
11892
|
return;
|
11945
11893
|
}
|
11946
11894
|
const elScrollTop = el.scrollTop;
|
11947
|
-
const { scrollTop, count, groupItemCount, startIndex, endIndex } =
|
11895
|
+
const { scrollTop, count, groupItemCount, startIndex, endIndex } = pagination;
|
11948
11896
|
const { offsetHeight } = el;
|
11949
11897
|
let targetStartIndex = 0;
|
11950
11898
|
let targetEndIndex = 0;
|
@@ -11966,8 +11914,8 @@ function computedVirtualIndex(lineHeight, callback, pagination2, el, event) {
|
|
11966
11914
|
}
|
11967
11915
|
}
|
11968
11916
|
function visibleRender(e, wrapper, binding) {
|
11969
|
-
const { lineHeight = 30, handleScrollCallback, pagination
|
11970
|
-
const { startIndex, endIndex, groupItemCount, count, scrollTop } =
|
11917
|
+
const { lineHeight = 30, handleScrollCallback, pagination = {} } = binding.value;
|
11918
|
+
const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination;
|
11971
11919
|
computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e);
|
11972
11920
|
}
|
11973
11921
|
const throttledRender = (delay = 60) => lodash.exports.throttle((e, wrapper, binding) => visibleRender(e, wrapper, binding), delay);
|
@@ -12038,7 +11986,7 @@ var Component$6 = defineComponent({
|
|
12038
11986
|
};
|
12039
11987
|
}
|
12040
11988
|
const refRoot = ref(null);
|
12041
|
-
const
|
11989
|
+
const pagination = reactive({
|
12042
11990
|
startIndex: 0,
|
12043
11991
|
endIndex: 0,
|
12044
11992
|
scrollTop: 1,
|
@@ -12047,11 +11995,11 @@ var Component$6 = defineComponent({
|
|
12047
11995
|
groupItemCount: props.groupItemCount
|
12048
11996
|
});
|
12049
11997
|
const handleScrollCallback = (event, startIndex, endIndex, scrollTop, translateY) => {
|
12050
|
-
|
12051
|
-
|
12052
|
-
|
12053
|
-
|
12054
|
-
ctx.emit("content-scroll", [event,
|
11998
|
+
pagination.startIndex = startIndex;
|
11999
|
+
pagination.endIndex = endIndex;
|
12000
|
+
pagination.scrollTop = scrollTop;
|
12001
|
+
pagination.translateY = translateY;
|
12002
|
+
ctx.emit("content-scroll", [event, pagination]);
|
12055
12003
|
};
|
12056
12004
|
onMounted(() => {
|
12057
12005
|
nextTick(() => {
|
@@ -12076,11 +12024,11 @@ var Component$6 = defineComponent({
|
|
12076
12024
|
const innerHeight = ref(0);
|
12077
12025
|
const handleListChanged = (list) => {
|
12078
12026
|
listLength.value = Math.ceil((list || []).length / props.groupItemCount);
|
12079
|
-
|
12080
|
-
|
12081
|
-
|
12082
|
-
|
12083
|
-
|
12027
|
+
pagination.count = listLength.value;
|
12028
|
+
pagination.startIndex = 0;
|
12029
|
+
pagination.endIndex = 0;
|
12030
|
+
pagination.translateY = 0;
|
12031
|
+
pagination.scrollTop = 0;
|
12084
12032
|
const isAuto = typeof props.abosuteHeight === "string" && props.abosuteHeight === "auto";
|
12085
12033
|
if (isAuto) {
|
12086
12034
|
if (typeof props.lineHeight === "function") {
|
@@ -12101,15 +12049,15 @@ var Component$6 = defineComponent({
|
|
12101
12049
|
const afterListDataReset = () => {
|
12102
12050
|
var _a;
|
12103
12051
|
const el = (_a = refRoot.value) == null ? void 0 : _a.parentNode;
|
12104
|
-
computedVirtualIndex(props.lineHeight, handleScrollCallback,
|
12052
|
+
computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination, el, null);
|
12105
12053
|
};
|
12106
12054
|
const localList = computed(() => (props.list || []).map((item, index) => __spreadProps(__spreadValues({}, item), {
|
12107
12055
|
$index: index
|
12108
12056
|
})));
|
12109
|
-
const calcList = computed(() => localList.value.slice(
|
12057
|
+
const calcList = computed(() => localList.value.slice(pagination.startIndex * props.groupItemCount, (pagination.endIndex + props.preloadItemCount) * props.groupItemCount));
|
12110
12058
|
const innerContentStyle = computed(() => props.scrollPosition === "content" ? {
|
12111
|
-
top: `${
|
12112
|
-
transform: `translateY(-${
|
12059
|
+
top: `${pagination.scrollTop + props.scrollOffsetTop}px`,
|
12060
|
+
transform: `translateY(-${pagination.translateY}px)`
|
12113
12061
|
} : {});
|
12114
12062
|
const wrapperStyle = computed(() => __spreadValues({
|
12115
12063
|
height: typeof props.height === "number" ? `${props.height}px` : props.height,
|
@@ -12129,7 +12077,7 @@ var Component$6 = defineComponent({
|
|
12129
12077
|
const dirModifier = {
|
12130
12078
|
lineHeight: props.lineHeight,
|
12131
12079
|
handleScrollCallback,
|
12132
|
-
pagination
|
12080
|
+
pagination,
|
12133
12081
|
throttleDelay: props.throttleDelay
|
12134
12082
|
};
|
12135
12083
|
return () => {
|
@@ -12334,20 +12282,20 @@ var userPagination = (props) => {
|
|
12334
12282
|
const indexData = computed(() => props.data.map((item, index) => __spreadProps(__spreadValues({}, item), {
|
12335
12283
|
__$table_row_index: index + 1
|
12336
12284
|
})));
|
12337
|
-
let
|
12285
|
+
let pagination = reactive({
|
12338
12286
|
count: 0,
|
12339
12287
|
limit: 10,
|
12340
12288
|
current: 1
|
12341
12289
|
});
|
12342
|
-
|
12290
|
+
pagination = resolvePaginationOption(props.pagination, pagination);
|
12343
12291
|
const resetStartEndIndex = () => {
|
12344
12292
|
if (!props.pagination || props.remotePagination) {
|
12345
12293
|
startIndex.value = 0;
|
12346
12294
|
endIndex.value = props.data.length;
|
12347
12295
|
return;
|
12348
12296
|
}
|
12349
|
-
startIndex.value = (
|
12350
|
-
endIndex.value =
|
12297
|
+
startIndex.value = (pagination.current - 1) * pagination.limit;
|
12298
|
+
endIndex.value = pagination.current * pagination.limit;
|
12351
12299
|
};
|
12352
12300
|
resetStartEndIndex();
|
12353
12301
|
const pageData = reactive([]);
|
@@ -12368,7 +12316,7 @@ var userPagination = (props) => {
|
|
12368
12316
|
sort(sortFn);
|
12369
12317
|
};
|
12370
12318
|
const watchEffectFn = (filterFn, sortFn) => {
|
12371
|
-
|
12319
|
+
pagination = resolvePaginationOption(props.pagination, pagination);
|
12372
12320
|
resetStartEndIndex();
|
12373
12321
|
resolvePageData(filterFn, sortFn);
|
12374
12322
|
};
|
@@ -12376,7 +12324,7 @@ var userPagination = (props) => {
|
|
12376
12324
|
if (!props.pagination) {
|
12377
12325
|
return null;
|
12378
12326
|
}
|
12379
|
-
return props.remotePagination ?
|
12327
|
+
return props.remotePagination ? pagination : __spreadProps(__spreadValues({}, pagination), {
|
12380
12328
|
count: props.data.length
|
12381
12329
|
});
|
12382
12330
|
});
|
@@ -13334,8 +13282,8 @@ var Component$4 = defineComponent({
|
|
13334
13282
|
resolvePageData(columnFilterFn, columnSortFn);
|
13335
13283
|
});
|
13336
13284
|
const handleScrollChanged = (args) => {
|
13337
|
-
const
|
13338
|
-
reactiveProp.scrollTranslateY =
|
13285
|
+
const pagination = args[1];
|
13286
|
+
reactiveProp.scrollTranslateY = pagination.translateY;
|
13339
13287
|
};
|
13340
13288
|
onMounted(() => {
|
13341
13289
|
observerIns = observerResize(root.value, () => {
|
@@ -13711,7 +13659,7 @@ var TagInput = defineComponent({
|
|
13711
13659
|
selectedTagList: [],
|
13712
13660
|
selectedTagListCache: []
|
13713
13661
|
});
|
13714
|
-
const tagList = computed(() => listState.selectedTagList.map((
|
13662
|
+
const tagList = computed(() => listState.selectedTagList.map((tag) => tag[props.saveKey]));
|
13715
13663
|
const formatList = useFlatList(props);
|
13716
13664
|
const renderList = computed(() => {
|
13717
13665
|
if (props.useGroup) {
|
@@ -13742,14 +13690,14 @@ var TagInput = defineComponent({
|
|
13742
13690
|
listState.selectedTagList = [];
|
13743
13691
|
listState.localList = [...formatList];
|
13744
13692
|
if (modelValue.length) {
|
13745
|
-
modelValue.forEach((
|
13746
|
-
const value = listState.localList.find((val) =>
|
13693
|
+
modelValue.forEach((tag) => {
|
13694
|
+
const value = listState.localList.find((val) => tag === val[saveKey]);
|
13747
13695
|
if (value !== void 0) {
|
13748
13696
|
listState.selectedTagList.push(value);
|
13749
|
-
} else if (allowCreate && !tagList.value.includes(
|
13697
|
+
} else if (allowCreate && !tagList.value.includes(tag)) {
|
13750
13698
|
listState.selectedTagList.push({
|
13751
|
-
[saveKey]:
|
13752
|
-
[displayKey]:
|
13699
|
+
[saveKey]: tag,
|
13700
|
+
[displayKey]: tag
|
13753
13701
|
});
|
13754
13702
|
}
|
13755
13703
|
});
|
@@ -14055,7 +14003,7 @@ var TagInput = defineComponent({
|
|
14055
14003
|
const nodes = getSelectedTagNodes();
|
14056
14004
|
const index = getTagInputItemSite();
|
14057
14005
|
const localInitData = listState.localList.map((data2) => data2[saveKey]);
|
14058
|
-
tags = tags.filter((
|
14006
|
+
tags = tags.filter((tag) => (tag == null ? void 0 : tag.trim()) && !tagList.value.includes(tag) && localInitData.includes(tag));
|
14059
14007
|
if (maxData !== -1) {
|
14060
14008
|
const selectedLength = listState.selectedTagList.length;
|
14061
14009
|
if (selectedLength < maxData) {
|
@@ -14067,7 +14015,7 @@ var TagInput = defineComponent({
|
|
14067
14015
|
tags = [];
|
14068
14016
|
}
|
14069
14017
|
}
|
14070
|
-
const localTags = listState.localList.filter((
|
14018
|
+
const localTags = listState.localList.filter((tag) => tags.includes(tag[saveKey]));
|
14071
14019
|
if (tags.length) {
|
14072
14020
|
listState.selectedTagList.splice(index, 0, ...localTags);
|
14073
14021
|
swapElementPositions(tagInputItemRef.value, nodes[index]);
|
@@ -14105,14 +14053,14 @@ var TagInput = defineComponent({
|
|
14105
14053
|
}
|
14106
14054
|
return true;
|
14107
14055
|
};
|
14108
|
-
const existTag = (value) => listState.localList.find((
|
14056
|
+
const existTag = (value) => listState.localList.find((tag) => tag[saveKey] === value);
|
14109
14057
|
if (type === "custom") {
|
14110
14058
|
if (separator) {
|
14111
14059
|
let tags = item.split(separator);
|
14112
|
-
tags = tags.filter((
|
14113
|
-
const localTags = tags.map((
|
14114
|
-
[saveKey]:
|
14115
|
-
[displayKey]:
|
14060
|
+
tags = tags.filter((tag) => (tag == null ? void 0 : tag.trim()) && !tagList.value.includes(tag) && validateTag(tag));
|
14061
|
+
const localTags = tags.map((tag) => existTag(tag) || {
|
14062
|
+
[saveKey]: tag,
|
14063
|
+
[displayKey]: tag
|
14116
14064
|
});
|
14117
14065
|
if (tags.length) {
|
14118
14066
|
listState.selectedTagList.splice(targetIndex, 0, ...localTags);
|
@@ -15172,7 +15120,7 @@ var Component$3 = defineComponent({
|
|
15172
15120
|
const openedKeys = ref([]);
|
15173
15121
|
const menuStore = ref({});
|
15174
15122
|
const mode = computed(() => props.mode);
|
15175
|
-
const
|
15123
|
+
const collapse = ref(props.collapse);
|
15176
15124
|
const oldOpenKeys = ref([]);
|
15177
15125
|
watch(() => props.OpenedKeys, (keys = openedKeys.value) => {
|
15178
15126
|
openedKeys.value = keys;
|
@@ -15185,11 +15133,11 @@ var Component$3 = defineComponent({
|
|
15185
15133
|
}
|
15186
15134
|
});
|
15187
15135
|
watch(() => props.collapse, () => {
|
15188
|
-
|
15136
|
+
collapse.value = props.collapse;
|
15189
15137
|
const oldKeys = [...oldOpenKeys.value];
|
15190
15138
|
const openKeys = [...openedKeys.value];
|
15191
|
-
openedKeys.value =
|
15192
|
-
oldOpenKeys.value =
|
15139
|
+
openedKeys.value = collapse.value ? [] : oldKeys;
|
15140
|
+
oldOpenKeys.value = collapse.value ? openKeys : [];
|
15193
15141
|
}, {
|
15194
15142
|
immediate: true
|
15195
15143
|
});
|
@@ -15226,7 +15174,7 @@ var Component$3 = defineComponent({
|
|
15226
15174
|
unregisterMenuInfo,
|
15227
15175
|
mode: mode.value,
|
15228
15176
|
openedKeys,
|
15229
|
-
collapse
|
15177
|
+
collapse,
|
15230
15178
|
handleOpenChange,
|
15231
15179
|
handleActiveChange
|
15232
15180
|
});
|
@@ -15235,7 +15183,7 @@ var Component$3 = defineComponent({
|
|
15235
15183
|
return createVNode("div", {
|
15236
15184
|
"class": {
|
15237
15185
|
"bk-menu": true,
|
15238
|
-
"is-collapse":
|
15186
|
+
"is-collapse": collapse.value
|
15239
15187
|
}
|
15240
15188
|
}, [(_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)]);
|
15241
15189
|
};
|
@@ -15340,7 +15288,7 @@ var Submenu = defineComponent({
|
|
15340
15288
|
unregisterMenuInfo,
|
15341
15289
|
openedKeys,
|
15342
15290
|
handleOpenChange,
|
15343
|
-
collapse
|
15291
|
+
collapse,
|
15344
15292
|
activeKey,
|
15345
15293
|
menuStore
|
15346
15294
|
} = useMenuInject();
|
@@ -15354,7 +15302,7 @@ var Submenu = defineComponent({
|
|
15354
15302
|
const specialCollapse = computed(() => {
|
15355
15303
|
var _a2, _b2;
|
15356
15304
|
const activeParentKey = (_b2 = (_a2 = menuStore.value) == null ? void 0 : _a2[activeKey.value]) == null ? void 0 : _b2.parentKey;
|
15357
|
-
return
|
15305
|
+
return collapse.value && activeParentKey === key && isShow;
|
15358
15306
|
});
|
15359
15307
|
useMenuPathProvider(key);
|
15360
15308
|
registerMenuInfo(key, {
|
@@ -17351,15 +17299,15 @@ function isProtectedDayOfYearToken(token2) {
|
|
17351
17299
|
function isProtectedWeekYearToken(token2) {
|
17352
17300
|
return protectedWeekYearTokens.indexOf(token2) !== -1;
|
17353
17301
|
}
|
17354
|
-
function throwProtectedError(token2, format2,
|
17302
|
+
function throwProtectedError(token2, format2, input) {
|
17355
17303
|
if (token2 === "YYYY") {
|
17356
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(
|
17304
|
+
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
17305
|
} else if (token2 === "YY") {
|
17358
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(
|
17306
|
+
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
17307
|
} 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(
|
17308
|
+
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
17309
|
} 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(
|
17310
|
+
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
17311
|
}
|
17364
17312
|
}
|
17365
17313
|
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
@@ -17434,8 +17382,8 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
17434
17382
|
}).join("");
|
17435
17383
|
return result;
|
17436
17384
|
}
|
17437
|
-
function cleanEscapedString(
|
17438
|
-
return
|
17385
|
+
function cleanEscapedString(input) {
|
17386
|
+
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
17439
17387
|
}
|
17440
17388
|
const fecha = {};
|
17441
17389
|
const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
@@ -18180,7 +18128,7 @@ var DatePanel = defineComponent({
|
|
18180
18128
|
handlePickSuccess();
|
18181
18129
|
}
|
18182
18130
|
};
|
18183
|
-
const
|
18131
|
+
const reset = () => {
|
18184
18132
|
state.currentView = props.selectionMode;
|
18185
18133
|
state.pickerTable = getTableType(state.currentView);
|
18186
18134
|
};
|
@@ -18236,7 +18184,7 @@ var DatePanel = defineComponent({
|
|
18236
18184
|
handleShortcutClick,
|
18237
18185
|
changeYear,
|
18238
18186
|
changeMonth,
|
18239
|
-
reset
|
18187
|
+
reset,
|
18240
18188
|
isTime,
|
18241
18189
|
onToggleVisibility
|
18242
18190
|
});
|
@@ -18402,7 +18350,7 @@ var DateRangePanel = defineComponent({
|
|
18402
18350
|
}
|
18403
18351
|
return a2.getTime() - b2.getTime();
|
18404
18352
|
};
|
18405
|
-
const
|
18353
|
+
const reset = () => {
|
18406
18354
|
state.currentView = props.selectionMode;
|
18407
18355
|
state.leftPickerTable = `${state.currentView}-table`;
|
18408
18356
|
state.rightPickerTable = `${state.currentView}-table`;
|
@@ -18569,7 +18517,7 @@ var DateRangePanel = defineComponent({
|
|
18569
18517
|
rightShowLabelSecond,
|
18570
18518
|
preSelecting,
|
18571
18519
|
panelPickerHandlers,
|
18572
|
-
reset
|
18520
|
+
reset,
|
18573
18521
|
onToggleVisibility,
|
18574
18522
|
handleRangePick,
|
18575
18523
|
handleChangeRange
|
@@ -19099,7 +19047,7 @@ var Component$2 = defineComponent({
|
|
19099
19047
|
state.visible = true;
|
19100
19048
|
}
|
19101
19049
|
};
|
19102
|
-
const
|
19050
|
+
const reset = () => {
|
19103
19051
|
var _a;
|
19104
19052
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.reset();
|
19105
19053
|
};
|
@@ -19116,7 +19064,7 @@ var Component$2 = defineComponent({
|
|
19116
19064
|
state.isFocused = false;
|
19117
19065
|
onSelectionModeChange(props.type);
|
19118
19066
|
state.internalValue = state.internalValue.slice();
|
19119
|
-
|
19067
|
+
reset();
|
19120
19068
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.onToggleVisibility(false);
|
19121
19069
|
};
|
19122
19070
|
const handleKeydown = (e) => {
|
@@ -19161,7 +19109,7 @@ var Component$2 = defineComponent({
|
|
19161
19109
|
state.internalValue = state.internalValue.map(() => null);
|
19162
19110
|
emit("clear");
|
19163
19111
|
emitChange(props.type);
|
19164
|
-
|
19112
|
+
reset();
|
19165
19113
|
state.showClose = false;
|
19166
19114
|
state.shortcut = null;
|
19167
19115
|
setTimeout(() => onSelectionModeChange(props.type), 500);
|
@@ -19178,7 +19126,7 @@ var Component$2 = defineComponent({
|
|
19178
19126
|
emit("pick-success");
|
19179
19127
|
});
|
19180
19128
|
(_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.blur();
|
19181
|
-
|
19129
|
+
reset();
|
19182
19130
|
};
|
19183
19131
|
const onPick = (_dates, visible = false, type, shortcut2) => {
|
19184
19132
|
let dates = _dates;
|
@@ -20612,38 +20560,38 @@ var FormItem = defineComponent({
|
|
20612
20560
|
isError: false,
|
20613
20561
|
errorMessage: ""
|
20614
20562
|
});
|
20615
|
-
const
|
20616
|
-
const isForm = Boolean(
|
20563
|
+
const form = inject(formKey);
|
20564
|
+
const isForm = Boolean(form);
|
20617
20565
|
const labelStyles = computed(() => {
|
20618
20566
|
const styles = {
|
20619
20567
|
width: "",
|
20620
20568
|
paddingRight: "",
|
20621
20569
|
textAlign: ""
|
20622
20570
|
};
|
20623
|
-
const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm &&
|
20571
|
+
const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form.props.labelWidth;
|
20624
20572
|
if (isValid(labelWidth)) {
|
20625
20573
|
styles.width = `${labelWidth}px`;
|
20626
20574
|
styles.paddingRight = labelWidth ? "" : "0px";
|
20627
20575
|
}
|
20628
|
-
const labelPosition = props.labelPosition || isForm &&
|
20576
|
+
const labelPosition = props.labelPosition || isForm && form.props.labelPosition;
|
20629
20577
|
if (labelPosition) {
|
20630
20578
|
styles["text-align"] = labelPosition;
|
20631
20579
|
}
|
20632
20580
|
return styles;
|
20633
20581
|
});
|
20634
20582
|
const validate = () => {
|
20635
|
-
if (!props.property || isForm && !
|
20583
|
+
if (!props.property || isForm && !form.props.model) {
|
20636
20584
|
return Promise.resolve();
|
20637
20585
|
}
|
20638
20586
|
let rules = [];
|
20639
|
-
if (isForm &&
|
20640
|
-
rules =
|
20587
|
+
if (isForm && form.props.rules && hasOwn(form.props.rules, props.property)) {
|
20588
|
+
rules = form.props.rules[props.property];
|
20641
20589
|
}
|
20642
20590
|
if (props.rules) {
|
20643
20591
|
rules = props.rules;
|
20644
20592
|
}
|
20645
20593
|
rules = mergeRules(rules, getRulesFromProps(props));
|
20646
|
-
const value =
|
20594
|
+
const value = form.props.model[props.property];
|
20647
20595
|
const doValidate = (() => {
|
20648
20596
|
let stepIndex = -1;
|
20649
20597
|
return () => {
|
@@ -20678,12 +20626,12 @@ var FormItem = defineComponent({
|
|
20678
20626
|
};
|
20679
20627
|
onMounted(() => {
|
20680
20628
|
if (isForm) {
|
20681
|
-
|
20629
|
+
form.register(currentInstance.proxy);
|
20682
20630
|
}
|
20683
20631
|
});
|
20684
20632
|
onBeforeUnmount(() => {
|
20685
20633
|
if (isForm) {
|
20686
|
-
|
20634
|
+
form.unregister(currentInstance.proxy);
|
20687
20635
|
}
|
20688
20636
|
});
|
20689
20637
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|