lew-ui 2.7.1 → 2.7.3
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/components/cascader/src/LewCascader.vue.d.ts +21 -0
- package/dist/components/cascader/src/props.d.ts +10 -0
- package/dist/components/select/src/LewSelect.vue.d.ts +36 -0
- package/dist/components/select/src/props.d.ts +16 -0
- package/dist/components/select/src/util.d.ts +1 -1
- package/dist/components/select-multiple/src/LewSelectMultiple.vue.d.ts +35 -1
- package/dist/components/select-multiple/src/props.d.ts +15 -0
- package/dist/components/slider/src/LewSlider.vue.d.ts +4 -4
- package/dist/components/slider-range/src/LewSliderRange.vue.d.ts +8 -4
- package/dist/components/text-trim/src/text-trim.d.ts +1 -1
- package/dist/components/tree/src/LewTree.vue.d.ts +5 -5
- package/dist/components/tree/src/props.d.ts +1 -1
- package/dist/components/tree/src/transformTree.d.ts +3 -3
- package/dist/components/tree-select/src/LewTreeSelect.vue.d.ts +31 -8
- package/dist/components/tree-select/src/props.d.ts +13 -2
- package/dist/index.mjs +990 -425
- package/dist/index.umd.js +4 -4
- package/dist/locals/de.d.ts +3 -0
- package/dist/locals/en.d.ts +3 -0
- package/dist/locals/es.d.ts +3 -0
- package/dist/locals/fr.d.ts +3 -0
- package/dist/locals/it.d.ts +3 -0
- package/dist/locals/ja.d.ts +3 -0
- package/dist/locals/ko.d.ts +3 -0
- package/dist/locals/pt.d.ts +3 -0
- package/dist/locals/zh.d.ts +3 -0
- package/dist/methods/notification/src/index.d.ts +5 -5
- package/dist/style.css +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3145,7 +3145,7 @@ const _export_sfc = (sfc, props2) => {
|
|
|
3145
3145
|
}
|
|
3146
3146
|
return target;
|
|
3147
3147
|
};
|
|
3148
|
-
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-
|
|
3148
|
+
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-85f40c38"]]);
|
|
3149
3149
|
const iconColorType = {
|
|
3150
3150
|
normal: "gray",
|
|
3151
3151
|
warning: "orange",
|
|
@@ -3663,7 +3663,7 @@ const _hoisted_3$m = {
|
|
|
3663
3663
|
key: 2,
|
|
3664
3664
|
class: "lew-image-box"
|
|
3665
3665
|
};
|
|
3666
|
-
const _hoisted_4$
|
|
3666
|
+
const _hoisted_4$g = ["src", "lazy", "alt"];
|
|
3667
3667
|
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
3668
3668
|
__name: "LewImage",
|
|
3669
3669
|
props: imageProps,
|
|
@@ -3733,7 +3733,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3733
3733
|
"object-position": _ctx.objectPosition
|
|
3734
3734
|
}),
|
|
3735
3735
|
alt: _ctx.alt
|
|
3736
|
-
}, null, 12, _hoisted_4$
|
|
3736
|
+
}, null, 12, _hoisted_4$g)
|
|
3737
3737
|
]))
|
|
3738
3738
|
]),
|
|
3739
3739
|
_: 3
|
|
@@ -3741,7 +3741,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3741
3741
|
};
|
|
3742
3742
|
}
|
|
3743
3743
|
});
|
|
3744
|
-
const LewImage = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-
|
|
3744
|
+
const LewImage = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-52dda328"]]);
|
|
3745
3745
|
const avatarProps = {
|
|
3746
3746
|
size: {
|
|
3747
3747
|
type: [Number, String],
|
|
@@ -3796,7 +3796,9 @@ const avatarProps = {
|
|
|
3796
3796
|
validator(value) {
|
|
3797
3797
|
const validStatus = ["online", "processing", "away", "offline", "busy"];
|
|
3798
3798
|
if (!validStatus.includes(value)) {
|
|
3799
|
-
console.warn(
|
|
3799
|
+
console.warn(
|
|
3800
|
+
`[LewAvatar] status 必须是 ${validStatus.join(", ")} 之一`
|
|
3801
|
+
);
|
|
3800
3802
|
return false;
|
|
3801
3803
|
}
|
|
3802
3804
|
return true;
|
|
@@ -4048,7 +4050,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
4048
4050
|
};
|
|
4049
4051
|
}
|
|
4050
4052
|
});
|
|
4051
|
-
const LewAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-
|
|
4053
|
+
const LewAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-f6487eb1"]]);
|
|
4052
4054
|
const validColors = [
|
|
4053
4055
|
"blue",
|
|
4054
4056
|
"gray",
|
|
@@ -4306,7 +4308,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
4306
4308
|
};
|
|
4307
4309
|
}
|
|
4308
4310
|
});
|
|
4309
|
-
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-
|
|
4311
|
+
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-574decae"]]);
|
|
4310
4312
|
const tagProps = {
|
|
4311
4313
|
text: {
|
|
4312
4314
|
type: String,
|
|
@@ -4513,7 +4515,9 @@ const badgeProps = {
|
|
|
4513
4515
|
validator: (value) => {
|
|
4514
4516
|
const numberValue = Number(value);
|
|
4515
4517
|
if (isNaN(numberValue)) {
|
|
4516
|
-
console.warn(
|
|
4518
|
+
console.warn(
|
|
4519
|
+
"[LewBadge] max 属性必须是有效的数字或可转换为数字的字符串。"
|
|
4520
|
+
);
|
|
4517
4521
|
return false;
|
|
4518
4522
|
}
|
|
4519
4523
|
return true;
|
|
@@ -4703,7 +4707,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
4703
4707
|
};
|
|
4704
4708
|
}
|
|
4705
4709
|
});
|
|
4706
|
-
const LewTitle = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-
|
|
4710
|
+
const LewTitle = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-56ff9c47"]]);
|
|
4707
4711
|
var top = "top";
|
|
4708
4712
|
var bottom = "bottom";
|
|
4709
4713
|
var right = "right";
|
|
@@ -7671,7 +7675,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
7671
7675
|
};
|
|
7672
7676
|
}
|
|
7673
7677
|
});
|
|
7674
|
-
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-
|
|
7678
|
+
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-62e0e78e"]]);
|
|
7675
7679
|
const flexProps = {
|
|
7676
7680
|
direction: {
|
|
7677
7681
|
type: String,
|
|
@@ -7808,7 +7812,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
7808
7812
|
};
|
|
7809
7813
|
}
|
|
7810
7814
|
});
|
|
7811
|
-
const LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-
|
|
7815
|
+
const LewFlex = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-e8d69891"]]);
|
|
7812
7816
|
const markProps = {
|
|
7813
7817
|
color: {
|
|
7814
7818
|
type: String,
|
|
@@ -7907,7 +7911,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
7907
7911
|
};
|
|
7908
7912
|
}
|
|
7909
7913
|
});
|
|
7910
|
-
const LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-
|
|
7914
|
+
const LewMark = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-6dbd9d5b"]]);
|
|
7911
7915
|
const expandProps = {
|
|
7912
7916
|
collapseHeight: {
|
|
7913
7917
|
type: [Number, String],
|
|
@@ -7963,7 +7967,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
7963
7967
|
};
|
|
7964
7968
|
}
|
|
7965
7969
|
});
|
|
7966
|
-
const LewExpand = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-
|
|
7970
|
+
const LewExpand = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-e9532ad3"]]);
|
|
7967
7971
|
const backTopProps = {
|
|
7968
7972
|
right: {
|
|
7969
7973
|
type: Number,
|
|
@@ -8085,7 +8089,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
8085
8089
|
};
|
|
8086
8090
|
}
|
|
8087
8091
|
});
|
|
8088
|
-
const LewBackTop = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-
|
|
8092
|
+
const LewBackTop = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-a62df678"]]);
|
|
8089
8093
|
const stepsModel = {
|
|
8090
8094
|
modelValue: {
|
|
8091
8095
|
type: [String, Number],
|
|
@@ -8148,7 +8152,7 @@ const _hoisted_3$j = {
|
|
|
8148
8152
|
key: 4,
|
|
8149
8153
|
class: "index"
|
|
8150
8154
|
};
|
|
8151
|
-
const _hoisted_4$
|
|
8155
|
+
const _hoisted_4$f = { class: "lew-steps-item-info" };
|
|
8152
8156
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
8153
8157
|
__name: "LewSteps",
|
|
8154
8158
|
props: /* @__PURE__ */ mergeModels(stepsProps, {
|
|
@@ -8197,7 +8201,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
8197
8201
|
type: "check"
|
|
8198
8202
|
})) : (openBlock(), createElementBlock("span", _hoisted_3$j, toDisplayString$1(index2 + 1), 1))
|
|
8199
8203
|
]),
|
|
8200
|
-
createElementVNode("div", _hoisted_4$
|
|
8204
|
+
createElementVNode("div", _hoisted_4$f, [
|
|
8201
8205
|
createElementVNode("div", {
|
|
8202
8206
|
style: normalizeStyle({ maxWidth: unref(any2px)(_ctx.minWidth) }),
|
|
8203
8207
|
class: "lew-steps-item-title"
|
|
@@ -8316,7 +8320,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
8316
8320
|
};
|
|
8317
8321
|
}
|
|
8318
8322
|
});
|
|
8319
|
-
const LewMenu = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-
|
|
8323
|
+
const LewMenu = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-355c66b6"]]);
|
|
8320
8324
|
const menuTreeModel = {
|
|
8321
8325
|
modelValue: {
|
|
8322
8326
|
type: String,
|
|
@@ -8411,9 +8415,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
8411
8415
|
emits: ["change"],
|
|
8412
8416
|
setup(__props2, { emit: __emit2 }) {
|
|
8413
8417
|
const props2 = __props2;
|
|
8414
|
-
const { modelValue: modelValue2, expandKeys, modelValueKeyPath, collapsed } = inject(
|
|
8415
|
-
"lew-menu-tree"
|
|
8416
|
-
);
|
|
8418
|
+
const { modelValue: modelValue2, expandKeys, modelValueKeyPath, collapsed } = inject("lew-menu-tree");
|
|
8417
8419
|
const emit2 = __emit2;
|
|
8418
8420
|
const change2 = () => {
|
|
8419
8421
|
if (props2.disabled) return;
|
|
@@ -8512,7 +8514,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
8512
8514
|
};
|
|
8513
8515
|
}
|
|
8514
8516
|
});
|
|
8515
|
-
const LewMenuTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-
|
|
8517
|
+
const LewMenuTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-7940c831"]]);
|
|
8516
8518
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
8517
8519
|
__name: "LewMenuTree",
|
|
8518
8520
|
props: /* @__PURE__ */ mergeModels(menuTreeProps, {
|
|
@@ -8641,7 +8643,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
8641
8643
|
};
|
|
8642
8644
|
}
|
|
8643
8645
|
});
|
|
8644
|
-
const LewMenuTree = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-
|
|
8646
|
+
const LewMenuTree = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-c0cd8015"]]);
|
|
8645
8647
|
const dropdownModel = {
|
|
8646
8648
|
selectedKeys: {
|
|
8647
8649
|
type: Array,
|
|
@@ -8805,7 +8807,7 @@ const _hoisted_3$h = {
|
|
|
8805
8807
|
key: 0,
|
|
8806
8808
|
class: "lew-breadcrumb-parting"
|
|
8807
8809
|
};
|
|
8808
|
-
const _hoisted_4$
|
|
8810
|
+
const _hoisted_4$e = {
|
|
8809
8811
|
key: 0,
|
|
8810
8812
|
viewBox: "0 0 48 48",
|
|
8811
8813
|
fill: "none",
|
|
@@ -8815,7 +8817,7 @@ const _hoisted_4$d = {
|
|
|
8815
8817
|
"stroke-linecap": "butt",
|
|
8816
8818
|
"stroke-linejoin": "miter"
|
|
8817
8819
|
};
|
|
8818
|
-
const _hoisted_5$
|
|
8820
|
+
const _hoisted_5$b = {
|
|
8819
8821
|
key: 1,
|
|
8820
8822
|
viewBox: "0 0 48 48",
|
|
8821
8823
|
fill: "none",
|
|
@@ -8843,10 +8845,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8843
8845
|
onClick: ($event) => emit2("change", item)
|
|
8844
8846
|
}, toDisplayString$1(item.label), 11, _hoisted_2$o),
|
|
8845
8847
|
index2 != _ctx.options.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_3$h, [
|
|
8846
|
-
_ctx.separator === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$
|
|
8848
|
+
_ctx.separator === "sprit" ? (openBlock(), createElementBlock("svg", _hoisted_4$e, _cache[0] || (_cache[0] = [
|
|
8847
8849
|
createElementVNode("path", { d: "M29.506 6.502 18.493 41.498" }, null, -1)
|
|
8848
8850
|
]))) : createCommentVNode("", true),
|
|
8849
|
-
_ctx.separator === "shoulder" ? (openBlock(), createElementBlock("svg", _hoisted_5$
|
|
8851
|
+
_ctx.separator === "shoulder" ? (openBlock(), createElementBlock("svg", _hoisted_5$b, _cache[1] || (_cache[1] = [
|
|
8850
8852
|
createElementVNode("path", { d: "m16 39.513 15.556-15.557L16 8.4" }, null, -1)
|
|
8851
8853
|
]))) : createCommentVNode("", true)
|
|
8852
8854
|
])) : createCommentVNode("", true)
|
|
@@ -8856,7 +8858,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
8856
8858
|
};
|
|
8857
8859
|
}
|
|
8858
8860
|
});
|
|
8859
|
-
const LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-
|
|
8861
|
+
const LewBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-d257ed13"]]);
|
|
8860
8862
|
const actionBoxProps = {
|
|
8861
8863
|
options: {
|
|
8862
8864
|
type: Array,
|
|
@@ -8978,7 +8980,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
8978
8980
|
};
|
|
8979
8981
|
}
|
|
8980
8982
|
});
|
|
8981
|
-
const LewActionBox = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-
|
|
8983
|
+
const LewActionBox = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-9421f3be"]]);
|
|
8982
8984
|
const _hoisted_1$C = ["width", "height"];
|
|
8983
8985
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
8984
8986
|
__name: "RequiredIcon",
|
|
@@ -9344,7 +9346,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
9344
9346
|
};
|
|
9345
9347
|
}
|
|
9346
9348
|
});
|
|
9347
|
-
const LewGetLabelWidth = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-
|
|
9349
|
+
const LewGetLabelWidth = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-3144b6b8"]]);
|
|
9348
9350
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
9349
9351
|
function getDefaultExportFromCjs(x2) {
|
|
9350
9352
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -11640,7 +11642,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
11640
11642
|
slider: LewSlider,
|
|
11641
11643
|
"slider-range": LewSliderRange,
|
|
11642
11644
|
"color-picker": LewColorPicker,
|
|
11643
|
-
rate: LewRate
|
|
11645
|
+
rate: LewRate,
|
|
11646
|
+
"tree-select": LewTreeSelect
|
|
11644
11647
|
};
|
|
11645
11648
|
const app = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
11646
11649
|
if (app && !app.directive("tooltip")) {
|
|
@@ -11814,7 +11817,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
11814
11817
|
};
|
|
11815
11818
|
}
|
|
11816
11819
|
});
|
|
11817
|
-
const LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
11820
|
+
const LewFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-b8ae5897"]]);
|
|
11818
11821
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
11819
11822
|
__name: "LewForm",
|
|
11820
11823
|
props: formProps,
|
|
@@ -11957,7 +11960,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
11957
11960
|
};
|
|
11958
11961
|
}
|
|
11959
11962
|
});
|
|
11960
|
-
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-
|
|
11963
|
+
const LewForm = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-83c15482"]]);
|
|
11961
11964
|
const inputModel = {
|
|
11962
11965
|
modelValue: {
|
|
11963
11966
|
type: [String, Number],
|
|
@@ -12150,11 +12153,11 @@ const _hoisted_3$f = {
|
|
|
12150
12153
|
key: 1,
|
|
12151
12154
|
class: "lew-input-prefixes-icon"
|
|
12152
12155
|
};
|
|
12153
|
-
const _hoisted_4$
|
|
12156
|
+
const _hoisted_4$d = {
|
|
12154
12157
|
key: 2,
|
|
12155
12158
|
class: "lew-input-prefixes-select"
|
|
12156
12159
|
};
|
|
12157
|
-
const _hoisted_5$
|
|
12160
|
+
const _hoisted_5$a = ["disabled", "placeholder", "type", "readonly", "maxlength"];
|
|
12158
12161
|
const _hoisted_6$5 = {
|
|
12159
12162
|
key: 0,
|
|
12160
12163
|
class: "lew-input-auto-width"
|
|
@@ -12354,7 +12357,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12354
12357
|
type: prefixValue.value
|
|
12355
12358
|
}, null, 8, ["size", "type"])
|
|
12356
12359
|
])) : createCommentVNode("", true),
|
|
12357
|
-
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
12360
|
+
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$d, [
|
|
12358
12361
|
createVNode(unref(_sfc_main$R), {
|
|
12359
12362
|
placement: "bottom",
|
|
12360
12363
|
trigger: "click",
|
|
@@ -12424,7 +12427,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12424
12427
|
onChange: _cache[4] || (_cache[4] = ($event) => emit2("change", modelValue2.value)),
|
|
12425
12428
|
onBlur: blur,
|
|
12426
12429
|
onFocus: focus
|
|
12427
|
-
}, null, 44, _hoisted_5$
|
|
12430
|
+
}, null, 44, _hoisted_5$a), [
|
|
12428
12431
|
[vModelDynamic, modelValue2.value]
|
|
12429
12432
|
]),
|
|
12430
12433
|
_ctx.autoWidth ? (openBlock(), createElementBlock("label", _hoisted_6$5, toDisplayString$1(modelValue2.value), 1)) : createCommentVNode("", true),
|
|
@@ -12525,7 +12528,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12525
12528
|
};
|
|
12526
12529
|
}
|
|
12527
12530
|
});
|
|
12528
|
-
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-
|
|
12531
|
+
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-dc757e18"]]);
|
|
12529
12532
|
const inputNumberModel = {
|
|
12530
12533
|
modelValue: {
|
|
12531
12534
|
type: Number,
|
|
@@ -12823,7 +12826,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12823
12826
|
};
|
|
12824
12827
|
}
|
|
12825
12828
|
});
|
|
12826
|
-
const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-
|
|
12829
|
+
const LewInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-4fd1355c"]]);
|
|
12827
12830
|
const textareaModel = {
|
|
12828
12831
|
modelValue: {
|
|
12829
12832
|
type: String,
|
|
@@ -13104,7 +13107,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
13104
13107
|
};
|
|
13105
13108
|
}
|
|
13106
13109
|
});
|
|
13107
|
-
const LewTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-
|
|
13110
|
+
const LewTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-df04699a"]]);
|
|
13108
13111
|
const inputTagModel = {
|
|
13109
13112
|
modelValue: {
|
|
13110
13113
|
type: Array,
|
|
@@ -13416,7 +13419,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
13416
13419
|
};
|
|
13417
13420
|
}
|
|
13418
13421
|
});
|
|
13419
|
-
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-
|
|
13422
|
+
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-cf97835c"]]);
|
|
13420
13423
|
const checkboxModel = {
|
|
13421
13424
|
modelValue: {
|
|
13422
13425
|
type: Boolean,
|
|
@@ -13633,7 +13636,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
13633
13636
|
};
|
|
13634
13637
|
}
|
|
13635
13638
|
});
|
|
13636
|
-
const LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-
|
|
13639
|
+
const LewCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-44f7022b"]]);
|
|
13637
13640
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
13638
13641
|
__name: "LewCheckboxGroup",
|
|
13639
13642
|
props: /* @__PURE__ */ mergeModels(checkboxGroupProps, {
|
|
@@ -13724,7 +13727,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
13724
13727
|
};
|
|
13725
13728
|
}
|
|
13726
13729
|
});
|
|
13727
|
-
const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
13730
|
+
const LewCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-ba25af1a"]]);
|
|
13728
13731
|
const radioProps = {
|
|
13729
13732
|
checked: {
|
|
13730
13733
|
type: Boolean,
|
|
@@ -13903,7 +13906,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
13903
13906
|
};
|
|
13904
13907
|
}
|
|
13905
13908
|
});
|
|
13906
|
-
const LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-
|
|
13909
|
+
const LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-b5c2bb78"]]);
|
|
13907
13910
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
13908
13911
|
__name: "LewRadioGroup",
|
|
13909
13912
|
props: /* @__PURE__ */ mergeModels(radioGroupProps, {
|
|
@@ -13957,7 +13960,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
13957
13960
|
};
|
|
13958
13961
|
}
|
|
13959
13962
|
});
|
|
13960
|
-
const LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-
|
|
13963
|
+
const LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7f30bd6f"]]);
|
|
13961
13964
|
const tabsModel = {
|
|
13962
13965
|
modelValue: {
|
|
13963
13966
|
type: [String, Number],
|
|
@@ -14240,7 +14243,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
14240
14243
|
};
|
|
14241
14244
|
}
|
|
14242
14245
|
});
|
|
14243
|
-
const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
14246
|
+
const LewTabs = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-b3062cb0"]]);
|
|
14244
14247
|
function vue3h(ele, props2, children) {
|
|
14245
14248
|
const { attrs, on, ...rest } = props2;
|
|
14246
14249
|
let event = {};
|
|
@@ -14599,8 +14602,23 @@ function useVirtList(userProps, emitFunction) {
|
|
|
14599
14602
|
updateRange(start2);
|
|
14600
14603
|
}
|
|
14601
14604
|
}
|
|
14605
|
+
function judgePosition() {
|
|
14606
|
+
var _a, _b;
|
|
14607
|
+
const threshold = Math.max(props2.scrollDistance, 2);
|
|
14608
|
+
if (direction === "forward") {
|
|
14609
|
+
if (reactiveData.offset - threshold <= 0) {
|
|
14610
|
+
(_a = emitFunction == null ? void 0 : emitFunction.toTop) == null ? void 0 : _a.call(emitFunction, props2.list[0]);
|
|
14611
|
+
}
|
|
14612
|
+
} else if (direction === "backward") {
|
|
14613
|
+
const scrollSize = Math.round(reactiveData.offset + slotSize.clientSize);
|
|
14614
|
+
const distanceToBottom = Math.round(getTotalSize() - scrollSize);
|
|
14615
|
+
if (distanceToBottom <= threshold) {
|
|
14616
|
+
(_b = emitFunction == null ? void 0 : emitFunction.toBottom) == null ? void 0 : _b.call(emitFunction, props2.list[props2.list.length - 1]);
|
|
14617
|
+
}
|
|
14618
|
+
}
|
|
14619
|
+
}
|
|
14602
14620
|
function onScroll(evt) {
|
|
14603
|
-
var _a
|
|
14621
|
+
var _a;
|
|
14604
14622
|
(_a = emitFunction == null ? void 0 : emitFunction.scroll) == null ? void 0 : _a.call(emitFunction, evt);
|
|
14605
14623
|
const offset2 = getOffset();
|
|
14606
14624
|
if (offset2 === reactiveData.offset)
|
|
@@ -14608,12 +14626,7 @@ function useVirtList(userProps, emitFunction) {
|
|
|
14608
14626
|
direction = offset2 < reactiveData.offset ? "forward" : "backward";
|
|
14609
14627
|
reactiveData.offset = offset2;
|
|
14610
14628
|
calcRange();
|
|
14611
|
-
|
|
14612
|
-
(_b = emitFunction == null ? void 0 : emitFunction.toTop) == null ? void 0 : _b.call(emitFunction, props2.list[0]);
|
|
14613
|
-
}
|
|
14614
|
-
if (direction === "backward" && Math.round(reactiveData.offset + props2.scrollDistance) >= Math.round(reactiveData.listTotalSize + getSlotSize() - slotSize.clientSize)) {
|
|
14615
|
-
(_c = emitFunction == null ? void 0 : emitFunction.toBottom) == null ? void 0 : _c.call(emitFunction, props2.list[props2.list.length - 1]);
|
|
14616
|
-
}
|
|
14629
|
+
judgePosition();
|
|
14617
14630
|
}
|
|
14618
14631
|
function calcViews() {
|
|
14619
14632
|
const newViews = Math.ceil(slotSize.clientSize / (props2.minSize + props2.itemGap)) + 1;
|
|
@@ -15226,6 +15239,17 @@ const selectProps = {
|
|
|
15226
15239
|
default: void 0,
|
|
15227
15240
|
description: "自定义搜索方法,接收搜索参数并返回过滤后的选项列表"
|
|
15228
15241
|
},
|
|
15242
|
+
initOptionsMethod: {
|
|
15243
|
+
type: Function,
|
|
15244
|
+
default: void 0,
|
|
15245
|
+
description: "初始化选项的方法,用于异步加载选项"
|
|
15246
|
+
},
|
|
15247
|
+
initOptionsMethodId: {
|
|
15248
|
+
type: String,
|
|
15249
|
+
default: "",
|
|
15250
|
+
hidden: true,
|
|
15251
|
+
description: "初始化选项方法函数的标识"
|
|
15252
|
+
},
|
|
15229
15253
|
searchMethodId: {
|
|
15230
15254
|
type: String,
|
|
15231
15255
|
default: "",
|
|
@@ -15256,6 +15280,11 @@ const selectProps = {
|
|
|
15256
15280
|
type: Boolean,
|
|
15257
15281
|
default: true,
|
|
15258
15282
|
description: "是否在选中项旁显示勾选图标"
|
|
15283
|
+
},
|
|
15284
|
+
enableSearchCache: {
|
|
15285
|
+
type: Boolean,
|
|
15286
|
+
default: true,
|
|
15287
|
+
description: "是否启用搜索缓存功能,开启后可避免重复搜索相同关键词"
|
|
15259
15288
|
}
|
|
15260
15289
|
};
|
|
15261
15290
|
const flattenOptions = (options) => {
|
|
@@ -15285,9 +15314,11 @@ const flattenOptions = (options) => {
|
|
|
15285
15314
|
};
|
|
15286
15315
|
const defaultSearchMethod = (params) => {
|
|
15287
15316
|
const { options, keyword } = params;
|
|
15288
|
-
|
|
15317
|
+
if (!keyword) {
|
|
15318
|
+
return options;
|
|
15319
|
+
}
|
|
15289
15320
|
const result = options.filter((e) => {
|
|
15290
|
-
return e.label.indexOf(keyword) >= 0 && !e.isGroup;
|
|
15321
|
+
return e.label.toLowerCase().indexOf(keyword.toLowerCase()) >= 0 && !e.isGroup;
|
|
15291
15322
|
});
|
|
15292
15323
|
const group = [];
|
|
15293
15324
|
result.forEach((e) => {
|
|
@@ -15309,13 +15340,17 @@ const defaultSearchMethod = (params) => {
|
|
|
15309
15340
|
});
|
|
15310
15341
|
return flattenOptions(group);
|
|
15311
15342
|
};
|
|
15312
|
-
const _hoisted_1$u =
|
|
15313
|
-
|
|
15314
|
-
|
|
15343
|
+
const _hoisted_1$u = {
|
|
15344
|
+
key: 0,
|
|
15345
|
+
class: "lew-icon-loading-box"
|
|
15346
|
+
};
|
|
15347
|
+
const _hoisted_2$i = ["readonly", "placeholder"];
|
|
15348
|
+
const _hoisted_3$d = { class: "lew-select-options-box" };
|
|
15349
|
+
const _hoisted_4$c = {
|
|
15315
15350
|
key: 0,
|
|
15316
15351
|
class: "lew-result-count"
|
|
15317
15352
|
};
|
|
15318
|
-
const
|
|
15353
|
+
const _hoisted_5$9 = ["onClick"];
|
|
15319
15354
|
const SELECT_WIDTH_TOLERANCE = 26;
|
|
15320
15355
|
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
15321
15356
|
__name: "LewSelect",
|
|
@@ -15341,13 +15376,42 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15341
15376
|
return defaultSearchMethod;
|
|
15342
15377
|
}
|
|
15343
15378
|
});
|
|
15379
|
+
let _initOptionsMethod = computed(() => {
|
|
15380
|
+
if (isFunction$1(props2.initOptionsMethod)) {
|
|
15381
|
+
return props2.initOptionsMethod;
|
|
15382
|
+
} else if (props2.initOptionsMethodId) {
|
|
15383
|
+
return formMethods[props2.initOptionsMethodId];
|
|
15384
|
+
}
|
|
15385
|
+
return false;
|
|
15386
|
+
});
|
|
15387
|
+
const init = async () => {
|
|
15388
|
+
if (_initOptionsMethod.value) {
|
|
15389
|
+
try {
|
|
15390
|
+
const newOptions = await _initOptionsMethod.value();
|
|
15391
|
+
state.sourceOptions = newOptions;
|
|
15392
|
+
state.options = flattenOptions(newOptions);
|
|
15393
|
+
findKeyword();
|
|
15394
|
+
} catch (error) {
|
|
15395
|
+
console.error("[LewSelect] initOptionsMethod failed", error);
|
|
15396
|
+
}
|
|
15397
|
+
}
|
|
15398
|
+
if (props2.enableSearchCache) {
|
|
15399
|
+
state.searchCache.set("", state.options);
|
|
15400
|
+
}
|
|
15401
|
+
state.initLoading = false;
|
|
15402
|
+
};
|
|
15344
15403
|
watch(
|
|
15345
15404
|
() => props2.options,
|
|
15346
|
-
() => {
|
|
15405
|
+
(newOptions) => {
|
|
15347
15406
|
var _a;
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15407
|
+
if (!_initOptionsMethod.value) {
|
|
15408
|
+
state.sourceOptions = newOptions;
|
|
15409
|
+
state.options = flattenOptions(newOptions);
|
|
15410
|
+
state.keyword = ((_a = newOptions.find((e) => e.value === selectValue.value)) == null ? void 0 : _a.label) || "";
|
|
15411
|
+
if (props2.enableSearchCache) {
|
|
15412
|
+
state.searchCache.clear();
|
|
15413
|
+
}
|
|
15414
|
+
}
|
|
15351
15415
|
},
|
|
15352
15416
|
{
|
|
15353
15417
|
deep: true
|
|
@@ -15357,13 +15421,17 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15357
15421
|
const state = reactive({
|
|
15358
15422
|
visible: false,
|
|
15359
15423
|
loading: false,
|
|
15424
|
+
initLoading: true,
|
|
15425
|
+
sourceOptions: props2.options,
|
|
15360
15426
|
options: flattenOptions(props2.options),
|
|
15361
15427
|
hideBySelect: false,
|
|
15362
15428
|
// 记录是否通过选择隐藏
|
|
15363
15429
|
keyword: props2.defaultValue || selectValue.value,
|
|
15364
15430
|
keywordBackup: props2.defaultValue,
|
|
15365
|
-
autoWidth: 0
|
|
15431
|
+
autoWidth: 0,
|
|
15366
15432
|
// 新增自动宽度
|
|
15433
|
+
searchCache: /* @__PURE__ */ new Map()
|
|
15434
|
+
// 新增搜索结果缓存
|
|
15367
15435
|
});
|
|
15368
15436
|
watch(
|
|
15369
15437
|
() => props2.defaultValue,
|
|
@@ -15381,6 +15449,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15381
15449
|
if (props2.autoWidth) {
|
|
15382
15450
|
calculateAutoWidth();
|
|
15383
15451
|
}
|
|
15452
|
+
init();
|
|
15384
15453
|
});
|
|
15385
15454
|
const calculateAutoWidth = () => {
|
|
15386
15455
|
if (!props2.autoWidth) return;
|
|
@@ -15427,13 +15496,21 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15427
15496
|
const keyword = e.target.value;
|
|
15428
15497
|
if (props2.searchable) {
|
|
15429
15498
|
let result = [];
|
|
15430
|
-
if (
|
|
15431
|
-
result =
|
|
15499
|
+
if (props2.enableSearchCache && state.searchCache.has(keyword)) {
|
|
15500
|
+
result = state.searchCache.get(keyword);
|
|
15432
15501
|
} else {
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
}
|
|
15502
|
+
const optionsToSearch = flattenOptions(state.sourceOptions);
|
|
15503
|
+
if (!keyword && optionsToSearch.length > 0) {
|
|
15504
|
+
result = optionsToSearch;
|
|
15505
|
+
} else {
|
|
15506
|
+
result = await _searchMethod.value({
|
|
15507
|
+
options: optionsToSearch,
|
|
15508
|
+
keyword
|
|
15509
|
+
});
|
|
15510
|
+
}
|
|
15511
|
+
if (props2.enableSearchCache) {
|
|
15512
|
+
state.searchCache.set(keyword, result);
|
|
15513
|
+
}
|
|
15437
15514
|
}
|
|
15438
15515
|
state.options = result;
|
|
15439
15516
|
}
|
|
@@ -15486,7 +15563,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15486
15563
|
disabled,
|
|
15487
15564
|
readonly: readonly2,
|
|
15488
15565
|
searchable,
|
|
15489
|
-
focus
|
|
15566
|
+
focus,
|
|
15567
|
+
"init-loading": state.initLoading
|
|
15490
15568
|
});
|
|
15491
15569
|
});
|
|
15492
15570
|
const getBodyClassName = computed(() => {
|
|
@@ -15515,7 +15593,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15515
15593
|
height = height >= 280 ? 280 : height;
|
|
15516
15594
|
return height;
|
|
15517
15595
|
});
|
|
15518
|
-
const showHandle = () => {
|
|
15596
|
+
const showHandle = async () => {
|
|
15519
15597
|
state.visible = true;
|
|
15520
15598
|
state.keywordBackup = cloneDeep(state.keyword);
|
|
15521
15599
|
if (props2.searchable) {
|
|
@@ -15527,21 +15605,24 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15527
15605
|
}
|
|
15528
15606
|
state.hideBySelect = false;
|
|
15529
15607
|
if (props2.searchable) {
|
|
15530
|
-
search({ target: { value: "" } });
|
|
15608
|
+
await search({ target: { value: "" } });
|
|
15531
15609
|
}
|
|
15532
15610
|
const index2 = state.options.findIndex(
|
|
15533
15611
|
(e) => e.value === selectValue.value
|
|
15534
15612
|
);
|
|
15535
|
-
|
|
15536
|
-
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15541
|
-
|
|
15613
|
+
poll({
|
|
15614
|
+
callback: () => {
|
|
15615
|
+
const i = index2 > -1 ? index2 : 0;
|
|
15616
|
+
if (i > 0 && i !== Infinity) {
|
|
15617
|
+
virtListRef.value.scrollToIndex(i);
|
|
15618
|
+
} else {
|
|
15619
|
+
virtListRef.value.reset();
|
|
15542
15620
|
}
|
|
15543
|
-
}
|
|
15544
|
-
|
|
15621
|
+
},
|
|
15622
|
+
vail: () => {
|
|
15623
|
+
return !!virtListRef.value;
|
|
15624
|
+
}
|
|
15625
|
+
});
|
|
15545
15626
|
};
|
|
15546
15627
|
const hideHandle = () => {
|
|
15547
15628
|
state.visible = false;
|
|
@@ -15563,21 +15644,20 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15563
15644
|
}
|
|
15564
15645
|
}
|
|
15565
15646
|
);
|
|
15566
|
-
watch(
|
|
15567
|
-
() => props2.options,
|
|
15568
|
-
() => {
|
|
15569
|
-
state.options = flattenOptions(props2.options);
|
|
15570
|
-
},
|
|
15571
|
-
{
|
|
15572
|
-
deep: true
|
|
15573
|
-
}
|
|
15574
|
-
);
|
|
15575
15647
|
const getResultText = computed(() => {
|
|
15576
15648
|
return state.options.length > 0 ? locale.t("select.resultCount", {
|
|
15577
15649
|
num: numFormat(state.options.filter((e) => !e.isGroup).length)
|
|
15578
15650
|
}) : "";
|
|
15579
15651
|
});
|
|
15580
|
-
__expose2({
|
|
15652
|
+
__expose2({
|
|
15653
|
+
show,
|
|
15654
|
+
hide: hide2,
|
|
15655
|
+
clearSearchCache: () => {
|
|
15656
|
+
if (props2.enableSearchCache) {
|
|
15657
|
+
state.searchCache.clear();
|
|
15658
|
+
}
|
|
15659
|
+
}
|
|
15660
|
+
});
|
|
15581
15661
|
return (_ctx, _cache) => {
|
|
15582
15662
|
return openBlock(), createBlock(unref(_sfc_main$6), {
|
|
15583
15663
|
ref_key: "lewPopoverRef",
|
|
@@ -15586,7 +15666,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15586
15666
|
class: "lew-select-view",
|
|
15587
15667
|
style: normalizeStyle({ width: _ctx.autoWidth ? "auto" : unref(any2px)(_ctx.width) }),
|
|
15588
15668
|
trigger: _ctx.trigger,
|
|
15589
|
-
disabled: _ctx.disabled || _ctx.readonly,
|
|
15669
|
+
disabled: _ctx.disabled || _ctx.readonly || unref(state).initLoading,
|
|
15590
15670
|
placement: "bottom-start",
|
|
15591
15671
|
loading: unref(state).loading,
|
|
15592
15672
|
onShow: showHandle,
|
|
@@ -15599,11 +15679,18 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15599
15679
|
class: normalizeClass(["lew-select", unref(getSelectClassName)]),
|
|
15600
15680
|
style: normalizeStyle({ width: unref(any2px)(unref(computedWidth)) })
|
|
15601
15681
|
}, [
|
|
15602
|
-
|
|
15682
|
+
unref(state).initLoading ? (openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
15683
|
+
createVNode(Icon, {
|
|
15684
|
+
size: unref(getIconSize),
|
|
15685
|
+
loading: unref(state).initLoading,
|
|
15686
|
+
type: "loading"
|
|
15687
|
+
}, null, 8, ["size", "loading"])
|
|
15688
|
+
])) : (openBlock(), createBlock(Icon, {
|
|
15689
|
+
key: 1,
|
|
15603
15690
|
size: unref(getIconSize),
|
|
15604
15691
|
type: "chevron-down",
|
|
15605
15692
|
class: normalizeClass(["lew-icon-select", { "lew-icon-select-hide": _ctx.clearable && unref(state).keyword }])
|
|
15606
|
-
}, null, 8, ["size", "class"]),
|
|
15693
|
+
}, null, 8, ["size", "class"])),
|
|
15607
15694
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
15608
15695
|
default: withCtx(() => [
|
|
15609
15696
|
_ctx.clearable && unref(state).keyword && !_ctx.readonly ? (openBlock(), createBlock(Icon, {
|
|
@@ -15628,7 +15715,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15628
15715
|
placeholder: unref(state).keywordBackup || _ctx.placeholder ? _ctx.placeholder : unref(locale).t("select.placeholder"),
|
|
15629
15716
|
onInput: _cache[1] || (_cache[1] = //@ts-ignore
|
|
15630
15717
|
(...args) => unref(searchDebounce) && unref(searchDebounce)(...args))
|
|
15631
|
-
}, null, 44,
|
|
15718
|
+
}, null, 44, _hoisted_2$i), [
|
|
15632
15719
|
[vModelText, unref(state).keyword]
|
|
15633
15720
|
])
|
|
15634
15721
|
], 6)
|
|
@@ -15639,7 +15726,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15639
15726
|
style: normalizeStyle({ width: `calc(${unref(any2px)(_ctx.popoverWidth)} - 14px)` })
|
|
15640
15727
|
}, [
|
|
15641
15728
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
15642
|
-
createElementVNode("div",
|
|
15729
|
+
createElementVNode("div", _hoisted_3$d, [
|
|
15643
15730
|
unref(state).options && unref(state).options.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
15644
15731
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
15645
15732
|
key: 1,
|
|
@@ -15655,7 +15742,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15655
15742
|
_: 1
|
|
15656
15743
|
}))
|
|
15657
15744
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
15658
|
-
_ctx.searchable ? (openBlock(), createElementBlock("div",
|
|
15745
|
+
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_4$c, toDisplayString$1(unref(getResultText)), 1)) : createCommentVNode("", true),
|
|
15659
15746
|
createVNode(unref(VirtList), {
|
|
15660
15747
|
ref_key: "virtListRef",
|
|
15661
15748
|
ref: virtListRef,
|
|
@@ -15697,7 +15784,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15697
15784
|
type: "check"
|
|
15698
15785
|
})) : createCommentVNode("", true)
|
|
15699
15786
|
], 2))
|
|
15700
|
-
], 12,
|
|
15787
|
+
], 12, _hoisted_5$9)
|
|
15701
15788
|
]),
|
|
15702
15789
|
_: 3
|
|
15703
15790
|
}, 8, ["list", "minSize", "style"])
|
|
@@ -15711,7 +15798,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15711
15798
|
};
|
|
15712
15799
|
}
|
|
15713
15800
|
});
|
|
15714
|
-
const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-
|
|
15801
|
+
const LewSelect = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-475f28ec"]]);
|
|
15715
15802
|
const selectMultipleModel = {
|
|
15716
15803
|
modelValue: {
|
|
15717
15804
|
type: Array,
|
|
@@ -15784,6 +15871,17 @@ const selectMultipleProps = {
|
|
|
15784
15871
|
default: void 0,
|
|
15785
15872
|
description: "自定义搜索方法,接收搜索参数并返回过滤后的选项列表"
|
|
15786
15873
|
},
|
|
15874
|
+
initOptionsMethod: {
|
|
15875
|
+
type: Function,
|
|
15876
|
+
default: void 0,
|
|
15877
|
+
description: "初始化选项的方法,用于异步加载选项"
|
|
15878
|
+
},
|
|
15879
|
+
initOptionsMethodId: {
|
|
15880
|
+
type: String,
|
|
15881
|
+
default: "",
|
|
15882
|
+
hidden: true,
|
|
15883
|
+
description: "初始化选项方法函数的标识"
|
|
15884
|
+
},
|
|
15787
15885
|
searchMethodId: {
|
|
15788
15886
|
type: String,
|
|
15789
15887
|
default: "",
|
|
@@ -15800,6 +15898,10 @@ const selectMultipleProps = {
|
|
|
15800
15898
|
default: false,
|
|
15801
15899
|
description: "是否显示清空按钮"
|
|
15802
15900
|
},
|
|
15901
|
+
enableSearchCache: {
|
|
15902
|
+
type: Boolean,
|
|
15903
|
+
default: false
|
|
15904
|
+
},
|
|
15803
15905
|
readonly: {
|
|
15804
15906
|
type: Boolean,
|
|
15805
15907
|
default: false,
|
|
@@ -15822,12 +15924,16 @@ const selectMultipleProps = {
|
|
|
15822
15924
|
}
|
|
15823
15925
|
};
|
|
15824
15926
|
const _hoisted_1$t = {
|
|
15927
|
+
key: 0,
|
|
15928
|
+
class: "lew-icon-loading-box"
|
|
15929
|
+
};
|
|
15930
|
+
const _hoisted_2$h = {
|
|
15825
15931
|
key: 0,
|
|
15826
15932
|
class: "lew-search-input"
|
|
15827
15933
|
};
|
|
15828
|
-
const
|
|
15829
|
-
const
|
|
15830
|
-
const
|
|
15934
|
+
const _hoisted_3$c = ["placeholder"];
|
|
15935
|
+
const _hoisted_4$b = { class: "lew-select-options-box" };
|
|
15936
|
+
const _hoisted_5$8 = ["onClick"];
|
|
15831
15937
|
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
15832
15938
|
__name: "LewSelectMultiple",
|
|
15833
15939
|
props: /* @__PURE__ */ mergeModels(selectMultipleProps, {
|
|
@@ -15848,8 +15954,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15848
15954
|
selectWidth: 0,
|
|
15849
15955
|
visible: false,
|
|
15850
15956
|
loading: false,
|
|
15957
|
+
initLoading: true,
|
|
15958
|
+
sourceOptions: props2.options,
|
|
15851
15959
|
options: flattenOptions(props2.options),
|
|
15852
|
-
keyword: ""
|
|
15960
|
+
keyword: "",
|
|
15961
|
+
searchCache: /* @__PURE__ */ new Map()
|
|
15853
15962
|
});
|
|
15854
15963
|
const formMethods = inject("formMethods", {});
|
|
15855
15964
|
let _searchMethod = computed(() => {
|
|
@@ -15861,6 +15970,14 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15861
15970
|
return defaultSearchMethod;
|
|
15862
15971
|
}
|
|
15863
15972
|
});
|
|
15973
|
+
let _initOptionsMethod = computed(() => {
|
|
15974
|
+
if (isFunction$1(props2.initOptionsMethod)) {
|
|
15975
|
+
return props2.initOptionsMethod;
|
|
15976
|
+
} else if (props2.initOptionsMethodId) {
|
|
15977
|
+
return formMethods[props2.initOptionsMethodId];
|
|
15978
|
+
}
|
|
15979
|
+
return false;
|
|
15980
|
+
});
|
|
15864
15981
|
const getSelectWidth = () => {
|
|
15865
15982
|
var _a;
|
|
15866
15983
|
state.selectWidth = ((_a = lewSelectRef.value) == null ? void 0 : _a.clientWidth) - 12;
|
|
@@ -15884,13 +16001,21 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15884
16001
|
const keyword = e == null ? void 0 : e.target.value;
|
|
15885
16002
|
if (props2.searchable) {
|
|
15886
16003
|
let result = [];
|
|
15887
|
-
if (
|
|
15888
|
-
result =
|
|
16004
|
+
if (props2.enableSearchCache && state.searchCache.has(keyword)) {
|
|
16005
|
+
result = state.searchCache.get(keyword);
|
|
15889
16006
|
} else {
|
|
15890
|
-
|
|
15891
|
-
|
|
15892
|
-
|
|
15893
|
-
}
|
|
16007
|
+
const optionsToSearch = flattenOptions(state.sourceOptions);
|
|
16008
|
+
if (!keyword && optionsToSearch.length > 0) {
|
|
16009
|
+
result = optionsToSearch;
|
|
16010
|
+
} else {
|
|
16011
|
+
result = await _searchMethod.value({
|
|
16012
|
+
options: optionsToSearch,
|
|
16013
|
+
keyword
|
|
16014
|
+
});
|
|
16015
|
+
}
|
|
16016
|
+
if (props2.enableSearchCache) {
|
|
16017
|
+
state.searchCache.set(keyword, result);
|
|
16018
|
+
}
|
|
15894
16019
|
}
|
|
15895
16020
|
state.options = result;
|
|
15896
16021
|
}
|
|
@@ -15903,6 +16028,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15903
16028
|
lewPopoverRef.value && lewPopoverRef.value.refresh();
|
|
15904
16029
|
}, 100);
|
|
15905
16030
|
emit2("change", selectValue.value);
|
|
16031
|
+
state.visible = false;
|
|
16032
|
+
emit2("blur");
|
|
15906
16033
|
};
|
|
15907
16034
|
const deleteTag = ({ value }) => {
|
|
15908
16035
|
const valueIndex = selectValue.value.findIndex(
|
|
@@ -15977,7 +16104,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15977
16104
|
size,
|
|
15978
16105
|
disabled,
|
|
15979
16106
|
readonly: readonly2,
|
|
15980
|
-
focus
|
|
16107
|
+
focus,
|
|
16108
|
+
"init-loading": state.initLoading
|
|
15981
16109
|
});
|
|
15982
16110
|
});
|
|
15983
16111
|
const getSelectItemClassName = (e) => {
|
|
@@ -16003,22 +16131,21 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16003
16131
|
if (state.options && state.options.length === 0 && props2.searchable) {
|
|
16004
16132
|
search({ target: { value: "" } });
|
|
16005
16133
|
}
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
});
|
|
16134
|
+
const indexes = (selectValue.value || []).map((value) => state.options.findIndex((e) => e.value === value)).filter((index2) => index2 > -1);
|
|
16135
|
+
const minIndex = Math.min(...indexes);
|
|
16136
|
+
console.log(minIndex);
|
|
16137
|
+
poll({
|
|
16138
|
+
callback: () => {
|
|
16139
|
+
if (minIndex > 0 && minIndex !== Infinity) {
|
|
16140
|
+
virtListRef.value.scrollToIndex(minIndex);
|
|
16141
|
+
} else {
|
|
16142
|
+
virtListRef.value.reset();
|
|
16143
|
+
}
|
|
16144
|
+
},
|
|
16145
|
+
vail: () => {
|
|
16146
|
+
return !!virtListRef.value;
|
|
16020
16147
|
}
|
|
16021
|
-
}
|
|
16148
|
+
});
|
|
16022
16149
|
};
|
|
16023
16150
|
const getVirtualHeight = computed(() => {
|
|
16024
16151
|
let height = state.options.length * props2.itemHeight;
|
|
@@ -16032,14 +16159,44 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16032
16159
|
state.visible = false;
|
|
16033
16160
|
emit2("blur");
|
|
16034
16161
|
};
|
|
16162
|
+
const init = async () => {
|
|
16163
|
+
if (_initOptionsMethod.value) {
|
|
16164
|
+
try {
|
|
16165
|
+
const newOptions = await _initOptionsMethod.value();
|
|
16166
|
+
state.sourceOptions = newOptions;
|
|
16167
|
+
state.options = flattenOptions(newOptions);
|
|
16168
|
+
} catch (error) {
|
|
16169
|
+
console.error("[LewSelectMultiple] initOptionsMethod failed", error);
|
|
16170
|
+
}
|
|
16171
|
+
}
|
|
16172
|
+
if (props2.enableSearchCache) {
|
|
16173
|
+
state.searchCache.set("", state.options);
|
|
16174
|
+
}
|
|
16175
|
+
state.initLoading = false;
|
|
16176
|
+
};
|
|
16035
16177
|
onMounted(() => {
|
|
16036
16178
|
getSelectWidth();
|
|
16179
|
+
init();
|
|
16180
|
+
});
|
|
16181
|
+
__expose2({
|
|
16182
|
+
show,
|
|
16183
|
+
hide: hide2,
|
|
16184
|
+
clearSearchCache: () => {
|
|
16185
|
+
if (props2.enableSearchCache) {
|
|
16186
|
+
state.searchCache.clear();
|
|
16187
|
+
}
|
|
16188
|
+
}
|
|
16037
16189
|
});
|
|
16038
|
-
__expose2({ show, hide: hide2 });
|
|
16039
16190
|
watch(
|
|
16040
16191
|
() => props2.options,
|
|
16041
|
-
() => {
|
|
16042
|
-
|
|
16192
|
+
(newOptions) => {
|
|
16193
|
+
if (!_initOptionsMethod.value) {
|
|
16194
|
+
state.sourceOptions = newOptions;
|
|
16195
|
+
state.options = flattenOptions(newOptions);
|
|
16196
|
+
if (props2.enableSearchCache) {
|
|
16197
|
+
state.searchCache.clear();
|
|
16198
|
+
}
|
|
16199
|
+
}
|
|
16043
16200
|
},
|
|
16044
16201
|
{
|
|
16045
16202
|
deep: true
|
|
@@ -16057,7 +16214,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16057
16214
|
popoverBodyClassName: "lew-select-multiple-popover-body",
|
|
16058
16215
|
class: "lew-select-view",
|
|
16059
16216
|
trigger: _ctx.trigger,
|
|
16060
|
-
disabled: _ctx.disabled || _ctx.readonly,
|
|
16217
|
+
disabled: _ctx.disabled || _ctx.readonly || unref(state).initLoading,
|
|
16061
16218
|
placement: "bottom-start",
|
|
16062
16219
|
style: normalizeStyle({ width: unref(any2px)(_ctx.width) }),
|
|
16063
16220
|
loading: unref(state).loading,
|
|
@@ -16070,13 +16227,20 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16070
16227
|
ref: lewSelectRef,
|
|
16071
16228
|
class: normalizeClass(["lew-select", unref(getSelectClassName)])
|
|
16072
16229
|
}, [
|
|
16073
|
-
|
|
16230
|
+
unref(state).initLoading ? (openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
16231
|
+
createVNode(Icon, {
|
|
16232
|
+
size: unref(getIconSize),
|
|
16233
|
+
loading: unref(state).initLoading,
|
|
16234
|
+
type: "loading"
|
|
16235
|
+
}, null, 8, ["size", "loading"])
|
|
16236
|
+
])) : (openBlock(), createBlock(Icon, {
|
|
16237
|
+
key: 1,
|
|
16074
16238
|
size: unref(getIconSize),
|
|
16075
16239
|
type: "chevron-down",
|
|
16076
16240
|
class: normalizeClass(["lew-icon-select", {
|
|
16077
16241
|
"lew-icon-select-hide": _ctx.clearable && unref(getSelectedRows) && unref(getSelectedRows).length > 0
|
|
16078
16242
|
}])
|
|
16079
|
-
}, null, 8, ["size", "class"]),
|
|
16243
|
+
}, null, 8, ["size", "class"])),
|
|
16080
16244
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
16081
16245
|
default: withCtx(() => [
|
|
16082
16246
|
_ctx.clearable && unref(getSelectedRows) && unref(getSelectedRows).length > 0 && !_ctx.readonly ? (openBlock(), createBlock(Icon, {
|
|
@@ -16091,7 +16255,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16091
16255
|
]),
|
|
16092
16256
|
_: 1
|
|
16093
16257
|
}),
|
|
16094
|
-
unref(getSelectedRows) && unref(getSelectedRows).length > 0 ? (openBlock(), createElementBlock(Fragment, { key:
|
|
16258
|
+
unref(getSelectedRows) && unref(getSelectedRows).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
16095
16259
|
_ctx.valueLayout === "tag" ? (openBlock(), createBlock(unref(LewFlex), {
|
|
16096
16260
|
key: 0,
|
|
16097
16261
|
style: { padding: "4px" },
|
|
@@ -16189,7 +16353,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16189
16353
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
16190
16354
|
}, [
|
|
16191
16355
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
16192
|
-
_ctx.searchable ? (openBlock(), createElementBlock("div",
|
|
16356
|
+
_ctx.searchable ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
|
|
16193
16357
|
withDirectives(createElementVNode("input", {
|
|
16194
16358
|
ref_key: "searchInputRef",
|
|
16195
16359
|
ref: searchInputRef,
|
|
@@ -16197,11 +16361,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16197
16361
|
placeholder: unref(locale).t("selectMultiple.searchPlaceholder"),
|
|
16198
16362
|
onInput: _cache[1] || (_cache[1] = //@ts-ignore
|
|
16199
16363
|
(...args) => unref(searchDebounce) && unref(searchDebounce)(...args))
|
|
16200
|
-
}, null, 40,
|
|
16364
|
+
}, null, 40, _hoisted_3$c), [
|
|
16201
16365
|
[vModelText, unref(state).keyword]
|
|
16202
16366
|
])
|
|
16203
16367
|
])) : createCommentVNode("", true),
|
|
16204
|
-
createElementVNode("div",
|
|
16368
|
+
createElementVNode("div", _hoisted_4$b, [
|
|
16205
16369
|
unref(state).options && unref(state).options.length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
16206
16370
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
16207
16371
|
key: 1,
|
|
@@ -16259,7 +16423,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16259
16423
|
class: normalizeClass(["lew-select-label", { "is-group": templateProps.isGroup }])
|
|
16260
16424
|
}, null, 8, ["text", "class"])
|
|
16261
16425
|
], 2))
|
|
16262
|
-
], 12,
|
|
16426
|
+
], 12, _hoisted_5$8)
|
|
16263
16427
|
]),
|
|
16264
16428
|
_: 3
|
|
16265
16429
|
}, 8, ["list", "minSize", "style"])
|
|
@@ -16273,7 +16437,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
16273
16437
|
};
|
|
16274
16438
|
}
|
|
16275
16439
|
});
|
|
16276
|
-
const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
16440
|
+
const LewSelectMultiple = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-8c2da5a7"]]);
|
|
16277
16441
|
const getMonthDate = (year, month) => {
|
|
16278
16442
|
const ret = [];
|
|
16279
16443
|
if (!year || !month) {
|
|
@@ -16332,7 +16496,9 @@ const datePickerProps = {
|
|
|
16332
16496
|
description: "选择器尺寸",
|
|
16333
16497
|
validator(value) {
|
|
16334
16498
|
if (!validSizes.includes(value)) {
|
|
16335
|
-
console.warn(
|
|
16499
|
+
console.warn(
|
|
16500
|
+
'[LewDatePicker] size 必须是 "small"、"medium" 或 "large"'
|
|
16501
|
+
);
|
|
16336
16502
|
return false;
|
|
16337
16503
|
}
|
|
16338
16504
|
return true;
|
|
@@ -16668,8 +16834,8 @@ const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
|
16668
16834
|
const _hoisted_1$s = { class: "lew-date" };
|
|
16669
16835
|
const _hoisted_2$g = { class: "lew-date-control-left" };
|
|
16670
16836
|
const _hoisted_3$b = { class: "cur-date" };
|
|
16671
|
-
const _hoisted_4$
|
|
16672
|
-
const _hoisted_5$
|
|
16837
|
+
const _hoisted_4$a = { class: "lew-date-control-right" };
|
|
16838
|
+
const _hoisted_5$7 = { class: "lew-date-box" };
|
|
16673
16839
|
const _hoisted_6$4 = { class: "lew-date-num" };
|
|
16674
16840
|
const _hoisted_7$2 = ["onClick"];
|
|
16675
16841
|
const _hoisted_8$2 = { class: "lew-date-label" };
|
|
@@ -16797,7 +16963,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
16797
16963
|
})
|
|
16798
16964
|
]),
|
|
16799
16965
|
createElementVNode("div", _hoisted_3$b, toDisplayString$1(unref(dayjs)(`${unref(dateState).year}-${unref(dateState).month}`).format("YYYY-MM")), 1),
|
|
16800
|
-
createElementVNode("div", _hoisted_4$
|
|
16966
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
16801
16967
|
createVNode(unref(LewButton), {
|
|
16802
16968
|
type: "light",
|
|
16803
16969
|
color: "gray",
|
|
@@ -16826,7 +16992,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
16826
16992
|
]),
|
|
16827
16993
|
_: 1
|
|
16828
16994
|
}),
|
|
16829
|
-
createElementVNode("div", _hoisted_5$
|
|
16995
|
+
createElementVNode("div", _hoisted_5$7, [
|
|
16830
16996
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(headDate), (item, index2) => {
|
|
16831
16997
|
return openBlock(), createElementBlock("div", {
|
|
16832
16998
|
key: `h${index2}`,
|
|
@@ -16852,7 +17018,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
16852
17018
|
};
|
|
16853
17019
|
}
|
|
16854
17020
|
});
|
|
16855
|
-
const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-
|
|
17021
|
+
const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-07eb0e26"]]);
|
|
16856
17022
|
const _hoisted_1$r = { class: "lew-date-picker-view" };
|
|
16857
17023
|
const _hoisted_2$f = ["onClick"];
|
|
16858
17024
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
@@ -17043,7 +17209,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17043
17209
|
};
|
|
17044
17210
|
}
|
|
17045
17211
|
});
|
|
17046
|
-
const LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
17212
|
+
const LewDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-1dafb70c"]]);
|
|
17047
17213
|
const dateRangePickerModel = {
|
|
17048
17214
|
modelValue: {
|
|
17049
17215
|
type: Object,
|
|
@@ -17160,8 +17326,8 @@ const dateRangeProps = {
|
|
|
17160
17326
|
const _hoisted_1$q = { class: "lew-date-range" };
|
|
17161
17327
|
const _hoisted_2$e = { class: "lew-date" };
|
|
17162
17328
|
const _hoisted_3$a = { class: "lew-date-control-left" };
|
|
17163
|
-
const _hoisted_4$
|
|
17164
|
-
const _hoisted_5$
|
|
17329
|
+
const _hoisted_4$9 = { class: "cur-date" };
|
|
17330
|
+
const _hoisted_5$6 = { class: "lew-date-control-right" };
|
|
17165
17331
|
const _hoisted_6$3 = { class: "lew-date-box" };
|
|
17166
17332
|
const _hoisted_7$1 = { class: "lew-date-num" };
|
|
17167
17333
|
const _hoisted_8$1 = ["onClick", "onMouseenter"];
|
|
@@ -17477,8 +17643,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
17477
17643
|
_: 1
|
|
17478
17644
|
})
|
|
17479
17645
|
]),
|
|
17480
|
-
createElementVNode("div", _hoisted_4$
|
|
17481
|
-
createElementVNode("div", _hoisted_5$
|
|
17646
|
+
createElementVNode("div", _hoisted_4$9, toDisplayString$1(unref(dayjs)(`${unref(dateState).year1}-${unref(dateState).month1}`).format("YYYY-MM")), 1),
|
|
17647
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
17482
17648
|
createVNode(unref(LewButton), {
|
|
17483
17649
|
type: "light",
|
|
17484
17650
|
color: "gray",
|
|
@@ -17630,7 +17796,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
17630
17796
|
};
|
|
17631
17797
|
}
|
|
17632
17798
|
});
|
|
17633
|
-
const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
17799
|
+
const LewDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-35adc4bf"]]);
|
|
17634
17800
|
const _hoisted_1$p = { class: "lew-date-range-picker-view" };
|
|
17635
17801
|
const _hoisted_2$d = {
|
|
17636
17802
|
key: 0,
|
|
@@ -17640,8 +17806,8 @@ const _hoisted_3$9 = {
|
|
|
17640
17806
|
key: 1,
|
|
17641
17807
|
class: "lew-date-range-picker-dateValue lew-date-range-picker-start"
|
|
17642
17808
|
};
|
|
17643
|
-
const _hoisted_4$
|
|
17644
|
-
const _hoisted_5$
|
|
17809
|
+
const _hoisted_4$8 = { class: "lew-date-range-picker-mid" };
|
|
17810
|
+
const _hoisted_5$5 = {
|
|
17645
17811
|
key: 2,
|
|
17646
17812
|
class: "lew-date-range-picker-placeholder"
|
|
17647
17813
|
};
|
|
@@ -17751,13 +17917,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17751
17917
|
}, {
|
|
17752
17918
|
default: withCtx(() => [
|
|
17753
17919
|
!modelValue2.value || !modelValue2.value[unref(startKey)] ? (openBlock(), createElementBlock("div", _hoisted_2$d, toDisplayString$1(_ctx.placeholderStart ? _ctx.placeholderStart : unref(locale).t("dateRangePicker.placeholderStart")), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$9, toDisplayString$1(modelValue2.value[unref(startKey)]), 1)),
|
|
17754
|
-
createElementVNode("div", _hoisted_4$
|
|
17920
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
17755
17921
|
createVNode(Icon, {
|
|
17756
17922
|
size: 14,
|
|
17757
17923
|
type: "minus"
|
|
17758
17924
|
})
|
|
17759
17925
|
]),
|
|
17760
|
-
!modelValue2.value || !modelValue2.value[unref(endKey)] ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
17926
|
+
!modelValue2.value || !modelValue2.value[unref(endKey)] ? (openBlock(), createElementBlock("div", _hoisted_5$5, toDisplayString$1(_ctx.placeholderEnd ? _ctx.placeholderEnd : unref(locale).t("dateRangePicker.placeholderEnd")), 1)) : (openBlock(), createElementBlock("div", _hoisted_6$2, toDisplayString$1(modelValue2.value[unref(endKey)]), 1)),
|
|
17761
17927
|
createVNode(Icon, {
|
|
17762
17928
|
class: normalizeClass(["lew-date-range-picker-icon-calendar", {
|
|
17763
17929
|
"lew-date-range-picker-icon-calendar-hide": unref(checkClear)
|
|
@@ -17800,7 +17966,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
17800
17966
|
};
|
|
17801
17967
|
}
|
|
17802
17968
|
});
|
|
17803
|
-
const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-
|
|
17969
|
+
const LewDateRangePicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-2eec277f"]]);
|
|
17804
17970
|
const cascaderModel = {
|
|
17805
17971
|
modelValue: {
|
|
17806
17972
|
type: [String, Number],
|
|
@@ -17882,18 +18048,32 @@ const cascaderProps = {
|
|
|
17882
18048
|
hidden: true,
|
|
17883
18049
|
description: "动态加载子节点数据函数的标识"
|
|
17884
18050
|
},
|
|
18051
|
+
initOptionsMethod: {
|
|
18052
|
+
type: Function,
|
|
18053
|
+
description: "初始化选项数据的函数"
|
|
18054
|
+
},
|
|
18055
|
+
initOptionsMethodId: {
|
|
18056
|
+
type: String,
|
|
18057
|
+
default: "",
|
|
18058
|
+
hidden: true,
|
|
18059
|
+
description: "初始化选项数据函数的标识"
|
|
18060
|
+
},
|
|
17885
18061
|
readonly: {
|
|
17886
18062
|
type: Boolean,
|
|
17887
18063
|
default: false,
|
|
17888
18064
|
description: "是否只读"
|
|
17889
18065
|
}
|
|
17890
18066
|
};
|
|
17891
|
-
const _hoisted_1$o = {
|
|
17892
|
-
|
|
18067
|
+
const _hoisted_1$o = {
|
|
18068
|
+
key: 0,
|
|
18069
|
+
class: "lew-icon-loading-box"
|
|
18070
|
+
};
|
|
18071
|
+
const _hoisted_2$c = { key: 1 };
|
|
18072
|
+
const _hoisted_3$8 = {
|
|
17893
18073
|
class: "lew-cascader-item-padding",
|
|
17894
18074
|
style: { height: "38px" }
|
|
17895
18075
|
};
|
|
17896
|
-
const
|
|
18076
|
+
const _hoisted_4$7 = ["onClick"];
|
|
17897
18077
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
17898
18078
|
__name: "LewCascader",
|
|
17899
18079
|
props: /* @__PURE__ */ mergeModels(cascaderProps, {
|
|
@@ -17940,6 +18120,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17940
18120
|
const state = reactive({
|
|
17941
18121
|
visible: false,
|
|
17942
18122
|
loading: false,
|
|
18123
|
+
initLoading: true,
|
|
17943
18124
|
okLoading: false,
|
|
17944
18125
|
optionsGroup: [],
|
|
17945
18126
|
// 分组
|
|
@@ -17961,6 +18142,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
17961
18142
|
}
|
|
17962
18143
|
return false;
|
|
17963
18144
|
});
|
|
18145
|
+
let _initOptionsMethod = computed(() => {
|
|
18146
|
+
if (isFunction$1(props2.initOptionsMethod)) {
|
|
18147
|
+
return props2.initOptionsMethod;
|
|
18148
|
+
} else if (props2.initOptionsMethodId) {
|
|
18149
|
+
return formMethods[props2.initOptionsMethodId];
|
|
18150
|
+
}
|
|
18151
|
+
return false;
|
|
18152
|
+
});
|
|
17964
18153
|
const loadedData = reactive({});
|
|
17965
18154
|
const findObjectByValue = (treeList, value) => {
|
|
17966
18155
|
for (let i = 0; i < treeList.length; i++) {
|
|
@@ -18014,7 +18203,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18014
18203
|
}
|
|
18015
18204
|
const init = async () => {
|
|
18016
18205
|
let _tree = [];
|
|
18017
|
-
if (
|
|
18206
|
+
if (_initOptionsMethod.value) {
|
|
18207
|
+
try {
|
|
18208
|
+
const newOptions = await _initOptionsMethod.value();
|
|
18209
|
+
_tree = newOptions || [];
|
|
18210
|
+
} catch (error) {
|
|
18211
|
+
console.error("[LewCascader] initOptionsMethod failed", error);
|
|
18212
|
+
_tree = [];
|
|
18213
|
+
}
|
|
18214
|
+
} else if (_loadMethod.value && !state.loading) {
|
|
18018
18215
|
state.loading = true;
|
|
18019
18216
|
_tree = await _loadMethod.value() || [];
|
|
18020
18217
|
state.loading = false;
|
|
@@ -18030,8 +18227,28 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18030
18227
|
const __tree = formatTree2(_tree);
|
|
18031
18228
|
state.optionsGroup = [__tree];
|
|
18032
18229
|
state.optionsTree = __tree;
|
|
18230
|
+
state.initLoading = false;
|
|
18033
18231
|
};
|
|
18034
18232
|
init();
|
|
18233
|
+
watch(
|
|
18234
|
+
() => props2.options,
|
|
18235
|
+
(newOptions) => {
|
|
18236
|
+
if (!_initOptionsMethod.value) {
|
|
18237
|
+
const _tree = newOptions && newOptions.map((e) => {
|
|
18238
|
+
return {
|
|
18239
|
+
...e,
|
|
18240
|
+
isLeaf: !e.children || e.children && e.children.length === 0
|
|
18241
|
+
};
|
|
18242
|
+
}) || [];
|
|
18243
|
+
const __tree = formatTree2(_tree);
|
|
18244
|
+
state.optionsGroup = [__tree];
|
|
18245
|
+
state.optionsTree = __tree;
|
|
18246
|
+
}
|
|
18247
|
+
},
|
|
18248
|
+
{
|
|
18249
|
+
deep: true
|
|
18250
|
+
}
|
|
18251
|
+
);
|
|
18035
18252
|
const virtListRefs = ref([]);
|
|
18036
18253
|
const selectItem = async (item, level) => {
|
|
18037
18254
|
if (!item.isLeaf && item.labelPaths !== state.activeLabels) {
|
|
@@ -18134,7 +18351,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18134
18351
|
clearable,
|
|
18135
18352
|
disabled,
|
|
18136
18353
|
readonly: readonly2,
|
|
18137
|
-
focus
|
|
18354
|
+
focus,
|
|
18355
|
+
"init-loading": state.initLoading
|
|
18138
18356
|
});
|
|
18139
18357
|
});
|
|
18140
18358
|
const getBodyClassName = computed(() => {
|
|
@@ -18157,7 +18375,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18157
18375
|
emit2("blur");
|
|
18158
18376
|
};
|
|
18159
18377
|
const getCascaderWidth = computed(() => {
|
|
18160
|
-
const _hasChildOptions = state.optionsGroup.filter(
|
|
18378
|
+
const _hasChildOptions = state.optionsGroup.filter(
|
|
18379
|
+
(e) => e && e.length > 0
|
|
18380
|
+
).length;
|
|
18161
18381
|
if (_hasChildOptions > 1) {
|
|
18162
18382
|
return _hasChildOptions * 200;
|
|
18163
18383
|
}
|
|
@@ -18192,7 +18412,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18192
18412
|
ref: lewPopoverRef,
|
|
18193
18413
|
class: "lew-cascader-view",
|
|
18194
18414
|
trigger: _ctx.trigger,
|
|
18195
|
-
disabled: _ctx.disabled || _ctx.readonly,
|
|
18415
|
+
disabled: _ctx.disabled || _ctx.readonly || unref(state).initLoading,
|
|
18196
18416
|
placement: "bottom-start",
|
|
18197
18417
|
loading: unref(state).loading,
|
|
18198
18418
|
style: normalizeStyle({ width: unref(any2px)(_ctx.width) }),
|
|
@@ -18206,7 +18426,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18206
18426
|
class: normalizeClass(["lew-cascader", unref(getCascaderClassName)]),
|
|
18207
18427
|
style: normalizeStyle(unref(getCascaderStyle))
|
|
18208
18428
|
}, [
|
|
18209
|
-
|
|
18429
|
+
unref(state).initLoading ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
18430
|
+
createVNode(Icon, {
|
|
18431
|
+
size: unref(getIconSize),
|
|
18432
|
+
loading: unref(state).initLoading,
|
|
18433
|
+
type: "loading"
|
|
18434
|
+
}, null, 8, ["size", "loading"])
|
|
18435
|
+
])) : (openBlock(), createBlock(Transition, {
|
|
18436
|
+
key: 1,
|
|
18437
|
+
name: "lew-form-icon-ani"
|
|
18438
|
+
}, {
|
|
18210
18439
|
default: withCtx(() => [
|
|
18211
18440
|
!(_ctx.clearable && unref(getLabel) && unref(getLabel).length > 0) ? (openBlock(), createBlock(Icon, {
|
|
18212
18441
|
key: 0,
|
|
@@ -18216,7 +18445,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18216
18445
|
}, null, 8, ["size"])) : createCommentVNode("", true)
|
|
18217
18446
|
]),
|
|
18218
18447
|
_: 1
|
|
18219
|
-
}),
|
|
18448
|
+
})),
|
|
18220
18449
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
18221
18450
|
default: withCtx(() => [
|
|
18222
18451
|
_ctx.clearable && unref(getLabel) && unref(getLabel).length > 0 && !_ctx.readonly ? (openBlock(), createBlock(Icon, {
|
|
@@ -18238,7 +18467,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18238
18467
|
_ctx.showAllLevels ? (openBlock(), createBlock(unref(LewTextTrim), {
|
|
18239
18468
|
key: 0,
|
|
18240
18469
|
text: unref(getLabel).join(" / ")
|
|
18241
|
-
}, null, 8, ["text"])) : unref(getLabel) ? (openBlock(), createElementBlock("span",
|
|
18470
|
+
}, null, 8, ["text"])) : unref(getLabel) ? (openBlock(), createElementBlock("span", _hoisted_2$c, toDisplayString$1(unref(getLabel)[unref(getLabel).length - 1]), 1)) : createCommentVNode("", true)
|
|
18242
18471
|
], 4), [
|
|
18243
18472
|
[vShow, unref(getLabel) && unref(getLabel).length > 0]
|
|
18244
18473
|
]),
|
|
@@ -18290,13 +18519,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18290
18519
|
}
|
|
18291
18520
|
}, {
|
|
18292
18521
|
default: withCtx(({ itemData: templateProps }) => [
|
|
18293
|
-
createElementVNode("div",
|
|
18522
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
18294
18523
|
createElementVNode("div", {
|
|
18295
18524
|
class: normalizeClass(["lew-cascader-item", {
|
|
18296
18525
|
"lew-cascader-item-disabled": templateProps.disabled,
|
|
18297
|
-
"lew-cascader-item-hover": unref(state).activeLabels.includes(
|
|
18298
|
-
templateProps.label
|
|
18299
|
-
),
|
|
18526
|
+
"lew-cascader-item-hover": unref(state).activeLabels.includes(templateProps.label),
|
|
18300
18527
|
"lew-cascader-item-active": _ctx.free ? unref(state).activeLabels.includes(
|
|
18301
18528
|
templateProps.label
|
|
18302
18529
|
) && unref(state).tobeLabels.includes(templateProps.label) : unref(state).activeLabels.includes(templateProps.label),
|
|
@@ -18331,7 +18558,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18331
18558
|
class: "lew-cascader-icon",
|
|
18332
18559
|
type: "chevron-right"
|
|
18333
18560
|
})) : createCommentVNode("", true)
|
|
18334
|
-
], 10,
|
|
18561
|
+
], 10, _hoisted_4$7)
|
|
18335
18562
|
])
|
|
18336
18563
|
]),
|
|
18337
18564
|
_: 2
|
|
@@ -18380,7 +18607,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18380
18607
|
};
|
|
18381
18608
|
}
|
|
18382
18609
|
});
|
|
18383
|
-
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
18610
|
+
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-f356b90e"]]);
|
|
18384
18611
|
const treeSelectModel = {
|
|
18385
18612
|
modelValue: {
|
|
18386
18613
|
type: [String, Number],
|
|
@@ -18401,6 +18628,11 @@ const treeSelectProps = {
|
|
|
18401
18628
|
return true;
|
|
18402
18629
|
}
|
|
18403
18630
|
},
|
|
18631
|
+
width: {
|
|
18632
|
+
type: [String, Number],
|
|
18633
|
+
default: "240px",
|
|
18634
|
+
description: "选择器宽度,支持数字(单位:像素)或带单位的字符串"
|
|
18635
|
+
},
|
|
18404
18636
|
defaultValue: {
|
|
18405
18637
|
type: [String, Number],
|
|
18406
18638
|
default: "",
|
|
@@ -18408,7 +18640,7 @@ const treeSelectProps = {
|
|
|
18408
18640
|
},
|
|
18409
18641
|
placeholder: {
|
|
18410
18642
|
type: String,
|
|
18411
|
-
|
|
18643
|
+
defaultLocale: true,
|
|
18412
18644
|
description: "占位文本"
|
|
18413
18645
|
},
|
|
18414
18646
|
size: {
|
|
@@ -18524,24 +18756,34 @@ const treeSelectProps = {
|
|
|
18524
18756
|
default: "disabled",
|
|
18525
18757
|
description: "节点禁用状态字段名"
|
|
18526
18758
|
},
|
|
18527
|
-
|
|
18759
|
+
initOptionsMethod: {
|
|
18528
18760
|
type: Function,
|
|
18529
18761
|
default: void 0,
|
|
18530
18762
|
description: "初始化树数据的方法"
|
|
18531
18763
|
},
|
|
18764
|
+
initOptionsMethodId: {
|
|
18765
|
+
type: String,
|
|
18766
|
+
default: "",
|
|
18767
|
+
hidden: true,
|
|
18768
|
+
description: "初始化选项方法函数的标识"
|
|
18769
|
+
},
|
|
18532
18770
|
loadMethod: {
|
|
18533
18771
|
type: Function,
|
|
18534
18772
|
default: void 0,
|
|
18535
18773
|
description: "异步加载子节点数据的方法"
|
|
18536
18774
|
}
|
|
18537
18775
|
};
|
|
18538
|
-
const _hoisted_1$n =
|
|
18539
|
-
|
|
18540
|
-
|
|
18776
|
+
const _hoisted_1$n = {
|
|
18777
|
+
key: 0,
|
|
18778
|
+
class: "lew-icon-loading-box"
|
|
18779
|
+
};
|
|
18780
|
+
const _hoisted_2$b = ["readonly", "placeholder"];
|
|
18781
|
+
const _hoisted_3$7 = { class: "lew-select-options-box" };
|
|
18782
|
+
const _hoisted_4$6 = {
|
|
18541
18783
|
key: 0,
|
|
18542
18784
|
class: "result-count"
|
|
18543
18785
|
};
|
|
18544
|
-
const
|
|
18786
|
+
const _hoisted_5$4 = { class: "tree-select-wrapper lew-scrollbar" };
|
|
18545
18787
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
18546
18788
|
__name: "LewTreeSelect",
|
|
18547
18789
|
props: /* @__PURE__ */ mergeModels(treeSelectProps, {
|
|
@@ -18558,13 +18800,19 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18558
18800
|
const props2 = __props2;
|
|
18559
18801
|
const emit2 = __emit2;
|
|
18560
18802
|
const treeSelectValue = useModel(__props2, "modelValue");
|
|
18561
|
-
if (!isString$1(treeSelectValue.value)) {
|
|
18562
|
-
throw new Error("tree-select modelValue must be a string");
|
|
18563
|
-
}
|
|
18564
18803
|
const lewSelectRef = ref();
|
|
18565
18804
|
const inputRef = ref();
|
|
18566
18805
|
const lewPopoverRef = ref();
|
|
18567
18806
|
const lewTreeRef = ref();
|
|
18807
|
+
const formMethods = inject("formMethods", {});
|
|
18808
|
+
let _initOptionsMethod = computed(() => {
|
|
18809
|
+
if (isFunction$1(props2.initOptionsMethod)) {
|
|
18810
|
+
return props2.initOptionsMethod;
|
|
18811
|
+
} else if (props2.initOptionsMethodId) {
|
|
18812
|
+
return formMethods[props2.initOptionsMethodId];
|
|
18813
|
+
}
|
|
18814
|
+
return false;
|
|
18815
|
+
});
|
|
18568
18816
|
const state = reactive({
|
|
18569
18817
|
selectWidth: 0,
|
|
18570
18818
|
// 选择框宽度
|
|
@@ -18632,7 +18880,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18632
18880
|
disabled,
|
|
18633
18881
|
readonly: readonly2,
|
|
18634
18882
|
searchable,
|
|
18635
|
-
focus
|
|
18883
|
+
focus,
|
|
18884
|
+
"init-loading": state.initLoading
|
|
18636
18885
|
});
|
|
18637
18886
|
});
|
|
18638
18887
|
const getBodyClassName = computed(() => {
|
|
@@ -18688,7 +18937,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18688
18937
|
emit2("blur");
|
|
18689
18938
|
};
|
|
18690
18939
|
const getPlaceholder = computed(() => {
|
|
18691
|
-
return state.keywordBackup || props2.placeholder;
|
|
18940
|
+
return state.keywordBackup || props2.placeholder || locale.t("treeSelect.placeholder");
|
|
18692
18941
|
});
|
|
18693
18942
|
__expose2({ show, hide: hide2 });
|
|
18694
18943
|
return (_ctx, _cache) => {
|
|
@@ -18697,10 +18946,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18697
18946
|
ref: lewPopoverRef,
|
|
18698
18947
|
popoverBodyClassName: "lew-select-popover-body",
|
|
18699
18948
|
class: "lew-select-view",
|
|
18949
|
+
style: normalizeStyle({ width: unref(any2px)(_ctx.width) }),
|
|
18700
18950
|
trigger: _ctx.trigger,
|
|
18701
|
-
disabled: _ctx.disabled || _ctx.readonly,
|
|
18951
|
+
disabled: _ctx.disabled || _ctx.readonly || unref(state).initLoading,
|
|
18702
18952
|
placement: "bottom-start",
|
|
18703
|
-
style: { "width": "100%" },
|
|
18704
18953
|
loading: unref(state).searchLoading,
|
|
18705
18954
|
onShow: showHandle,
|
|
18706
18955
|
onHide: hideHandle
|
|
@@ -18711,18 +18960,18 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18711
18960
|
ref: lewSelectRef,
|
|
18712
18961
|
class: normalizeClass(["lew-select", unref(getSelectClassName)])
|
|
18713
18962
|
}, [
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18963
|
+
unref(state).initLoading ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
18964
|
+
createVNode(Icon, {
|
|
18965
|
+
size: unref(getIconSize),
|
|
18966
|
+
loading: unref(state).initLoading,
|
|
18967
|
+
type: "loading"
|
|
18968
|
+
}, null, 8, ["size", "loading"])
|
|
18969
|
+
])) : (openBlock(), createBlock(Icon, {
|
|
18720
18970
|
key: 1,
|
|
18721
|
-
loading: "",
|
|
18722
|
-
type: "loader",
|
|
18723
18971
|
size: unref(getIconSize),
|
|
18724
|
-
|
|
18725
|
-
|
|
18972
|
+
type: "chevron-down",
|
|
18973
|
+
class: normalizeClass(["lew-icon-select", { "lew-icon-select-hide": _ctx.clearable && unref(state).keyword }])
|
|
18974
|
+
}, null, 8, ["size", "class"])),
|
|
18726
18975
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
18727
18976
|
default: withCtx(() => [
|
|
18728
18977
|
_ctx.clearable && unref(state).keyword && !_ctx.readonly ? (openBlock(), createBlock(Icon, {
|
|
@@ -18741,13 +18990,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18741
18990
|
ref_key: "inputRef",
|
|
18742
18991
|
ref: inputRef,
|
|
18743
18992
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(state).keyword = $event),
|
|
18744
|
-
class: "value",
|
|
18993
|
+
class: "lew-value",
|
|
18745
18994
|
style: normalizeStyle(unref(getValueStyle)),
|
|
18746
18995
|
readonly: !_ctx.searchable,
|
|
18747
18996
|
placeholder: unref(getPlaceholder),
|
|
18748
18997
|
onInput: _cache[1] || (_cache[1] = //@ts-ignore
|
|
18749
18998
|
(...args) => unref(searchDebounce) && unref(searchDebounce)(...args))
|
|
18750
|
-
}, null, 44,
|
|
18999
|
+
}, null, 44, _hoisted_2$b), [
|
|
18751
19000
|
[vModelText, unref(state).keyword]
|
|
18752
19001
|
])
|
|
18753
19002
|
], 2)
|
|
@@ -18758,9 +19007,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18758
19007
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
18759
19008
|
}, [
|
|
18760
19009
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
18761
|
-
createElementVNode("div",
|
|
18762
|
-
_ctx.searchable && unref(state).resultText ? (openBlock(), createElementBlock("div",
|
|
18763
|
-
createElementVNode("div",
|
|
19010
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
19011
|
+
_ctx.searchable && unref(state).resultText ? (openBlock(), createElementBlock("div", _hoisted_4$6, toDisplayString$1(unref(state).resultText), 1)) : createCommentVNode("", true),
|
|
19012
|
+
createElementVNode("div", _hoisted_5$4, [
|
|
18764
19013
|
createVNode(unref(LewTree), mergeProps({
|
|
18765
19014
|
ref_key: "lewTreeRef",
|
|
18766
19015
|
ref: lewTreeRef,
|
|
@@ -18775,7 +19024,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18775
19024
|
searchable: _ctx.searchable,
|
|
18776
19025
|
dataSource: _ctx.dataSource,
|
|
18777
19026
|
loadMethod: _ctx.loadMethod,
|
|
18778
|
-
|
|
19027
|
+
initOptionsMethod: unref(_initOptionsMethod),
|
|
18779
19028
|
expandAll: _ctx.expandAll
|
|
18780
19029
|
}, {
|
|
18781
19030
|
"is-select": true,
|
|
@@ -18804,11 +19053,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
18804
19053
|
], 6)
|
|
18805
19054
|
]),
|
|
18806
19055
|
_: 3
|
|
18807
|
-
}, 8, ["trigger", "disabled", "loading"]);
|
|
19056
|
+
}, 8, ["style", "trigger", "disabled", "loading"]);
|
|
18808
19057
|
};
|
|
18809
19058
|
}
|
|
18810
19059
|
});
|
|
18811
|
-
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-
|
|
19060
|
+
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-ea98d4ca"]]);
|
|
18812
19061
|
const _hoisted_1$m = { class: "lew-form-modal lew-scrollbar" };
|
|
18813
19062
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
18814
19063
|
__name: "FormModal",
|
|
@@ -18896,7 +19145,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
18896
19145
|
};
|
|
18897
19146
|
}
|
|
18898
19147
|
});
|
|
18899
|
-
const FormModal = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-
|
|
19148
|
+
const FormModal = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-3a20847f"]]);
|
|
18900
19149
|
const inputTableModel = {
|
|
18901
19150
|
modelValue: {
|
|
18902
19151
|
type: Array,
|
|
@@ -19301,7 +19550,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
19301
19550
|
};
|
|
19302
19551
|
}
|
|
19303
19552
|
});
|
|
19304
|
-
const LewInputTable = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
19553
|
+
const LewInputTable = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-93abad4b"]]);
|
|
19305
19554
|
const switchModel = {
|
|
19306
19555
|
modelValue: {
|
|
19307
19556
|
type: Boolean,
|
|
@@ -19472,7 +19721,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
19472
19721
|
};
|
|
19473
19722
|
}
|
|
19474
19723
|
});
|
|
19475
|
-
const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
19724
|
+
const LewSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-708d7f46"]]);
|
|
19476
19725
|
const sliderModel = {
|
|
19477
19726
|
modelValue: {
|
|
19478
19727
|
type: [Number, void 0],
|
|
@@ -19574,111 +19823,189 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19574
19823
|
setup(__props2, { emit: __emit2 }) {
|
|
19575
19824
|
const props2 = __props2;
|
|
19576
19825
|
const emit2 = __emit2;
|
|
19826
|
+
const safeNumber = (value, defaultValue = 0) => {
|
|
19827
|
+
if (value === null || value === void 0 || value === "") {
|
|
19828
|
+
return defaultValue;
|
|
19829
|
+
}
|
|
19830
|
+
const num = Number(value);
|
|
19831
|
+
return isNaN(num) ? defaultValue : num;
|
|
19832
|
+
};
|
|
19833
|
+
const safeArray = (value, defaultValue = []) => {
|
|
19834
|
+
return Array.isArray(value) ? value : defaultValue;
|
|
19835
|
+
};
|
|
19836
|
+
const safeFunction = (value, defaultValue) => {
|
|
19837
|
+
return typeof value === "function" ? value : defaultValue;
|
|
19838
|
+
};
|
|
19577
19839
|
const modelValue2 = useModel(__props2, "modelValue", {
|
|
19578
19840
|
get(val) {
|
|
19579
|
-
|
|
19580
|
-
|
|
19841
|
+
const defaultValue = getMin.value;
|
|
19842
|
+
const safeVal = safeNumber(val, defaultValue);
|
|
19843
|
+
return Math.max(getMin.value, Math.min(getMax.value, safeVal));
|
|
19844
|
+
},
|
|
19845
|
+
set(val) {
|
|
19846
|
+
const safeVal = safeNumber(val, getMin.value);
|
|
19847
|
+
return Math.max(getMin.value, Math.min(getMax.value, safeVal));
|
|
19581
19848
|
}
|
|
19582
19849
|
});
|
|
19583
19850
|
const dotRef = ref(null);
|
|
19584
19851
|
const trackRef = ref(null);
|
|
19585
19852
|
const dotX = ref(0);
|
|
19853
|
+
const throttledUpdateModelValue = throttle((newValue) => {
|
|
19854
|
+
const clampedValue = Math.max(getMin.value, Math.min(getMax.value, newValue));
|
|
19855
|
+
modelValue2.value = clampedValue;
|
|
19856
|
+
emit2("change", clampedValue);
|
|
19857
|
+
}, 16);
|
|
19586
19858
|
const getTrackMax = computed(() => {
|
|
19587
|
-
const
|
|
19588
|
-
if (options
|
|
19589
|
-
|
|
19859
|
+
const options = safeArray(props2.options);
|
|
19860
|
+
if (options.length > 0) {
|
|
19861
|
+
const values = options.map((option) => safeNumber(option.value));
|
|
19862
|
+
return Math.max(...values);
|
|
19590
19863
|
}
|
|
19591
|
-
return
|
|
19864
|
+
return safeNumber(props2.max, 100);
|
|
19592
19865
|
});
|
|
19593
19866
|
const getTrackMin = computed(() => {
|
|
19594
|
-
const
|
|
19595
|
-
if (options
|
|
19596
|
-
|
|
19867
|
+
const options = safeArray(props2.options);
|
|
19868
|
+
if (options.length > 0) {
|
|
19869
|
+
const values = options.map((option) => safeNumber(option.value));
|
|
19870
|
+
return Math.min(...values);
|
|
19597
19871
|
}
|
|
19598
|
-
return
|
|
19872
|
+
return safeNumber(props2.min, 0);
|
|
19599
19873
|
});
|
|
19600
19874
|
const getMax = computed(() => {
|
|
19601
|
-
|
|
19875
|
+
const max2 = safeNumber(props2.max, getTrackMax.value);
|
|
19876
|
+
return Math.max(max2, getTrackMin.value + safeNumber(props2.step, 1));
|
|
19602
19877
|
});
|
|
19603
19878
|
const getMin = computed(() => {
|
|
19604
|
-
return
|
|
19879
|
+
return safeNumber(props2.min, getTrackMin.value);
|
|
19605
19880
|
});
|
|
19606
19881
|
const getMarkPosition = (value) => {
|
|
19607
|
-
const
|
|
19608
|
-
const
|
|
19882
|
+
const trackMax = getTrackMax.value;
|
|
19883
|
+
const trackMin = getTrackMin.value;
|
|
19884
|
+
const range = trackMax - trackMin;
|
|
19885
|
+
if (range <= 0) return 0;
|
|
19886
|
+
const safeValue = safeNumber(value, trackMin);
|
|
19887
|
+
const percentage = (safeValue - trackMin) / range * 100;
|
|
19609
19888
|
return Math.max(0, Math.min(100, percentage));
|
|
19610
19889
|
};
|
|
19611
19890
|
const calculateValue = (position) => {
|
|
19612
|
-
if (!trackRef.value) return
|
|
19891
|
+
if (!trackRef.value) return getMin.value;
|
|
19613
19892
|
const trackWidth = trackRef.value.clientWidth;
|
|
19614
|
-
|
|
19893
|
+
if (trackWidth <= 0) return getMin.value;
|
|
19894
|
+
const percentage = Math.max(0, Math.min(1, position / trackWidth));
|
|
19615
19895
|
dotX.value = position;
|
|
19616
|
-
const
|
|
19617
|
-
const
|
|
19896
|
+
const trackMax = getTrackMax.value;
|
|
19897
|
+
const trackMin = getTrackMin.value;
|
|
19898
|
+
const range = trackMax - trackMin;
|
|
19899
|
+
const value = percentage * range + trackMin;
|
|
19900
|
+
const step = safeNumber(props2.step, 1);
|
|
19901
|
+
if (step <= 0) return value;
|
|
19618
19902
|
const decimalPlaces = (step.toString().split(".")[1] || "").length;
|
|
19619
|
-
return Number(value.toFixed(decimalPlaces))
|
|
19903
|
+
return Number(value.toFixed(decimalPlaces));
|
|
19620
19904
|
};
|
|
19621
19905
|
const setDot = (e) => {
|
|
19622
|
-
if (props2.readonly || props2.disabled || !trackRef.value || !dotRef.value)
|
|
19906
|
+
if (props2.readonly || props2.disabled || !trackRef.value || !dotRef.value) {
|
|
19623
19907
|
return;
|
|
19624
|
-
|
|
19625
|
-
|
|
19626
|
-
|
|
19627
|
-
|
|
19628
|
-
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19908
|
+
}
|
|
19909
|
+
try {
|
|
19910
|
+
const trackRect = trackRef.value.getBoundingClientRect();
|
|
19911
|
+
const clickX = Math.max(
|
|
19912
|
+
0,
|
|
19913
|
+
Math.min(e.clientX - trackRect.left, trackRect.width)
|
|
19914
|
+
);
|
|
19915
|
+
const step = safeNumber(props2.step, 1);
|
|
19916
|
+
if (step <= 0) return;
|
|
19917
|
+
const trackMax = getTrackMax.value;
|
|
19918
|
+
const trackMin = getTrackMin.value;
|
|
19919
|
+
const range = trackMax - trackMin;
|
|
19920
|
+
if (range <= 0) return;
|
|
19921
|
+
const stepSize = trackRect.width / (range / step);
|
|
19922
|
+
const nearestStep = Math.round(clickX / stepSize) * stepSize;
|
|
19923
|
+
const newValue = calculateValue(nearestStep);
|
|
19924
|
+
const clampedValue = Math.max(
|
|
19925
|
+
getMin.value,
|
|
19926
|
+
Math.min(getMax.value, newValue)
|
|
19927
|
+
);
|
|
19928
|
+
if (clampedValue >= getMin.value && clampedValue <= getMax.value) {
|
|
19929
|
+
throttledUpdateModelValue(clampedValue);
|
|
19930
|
+
setDotByValue(clampedValue);
|
|
19931
|
+
}
|
|
19932
|
+
} catch (error) {
|
|
19933
|
+
console.warn("[LewSlider] setDot error:", error);
|
|
19636
19934
|
}
|
|
19637
19935
|
};
|
|
19638
19936
|
const calculateNearestStep = (value) => {
|
|
19639
|
-
const
|
|
19640
|
-
const
|
|
19641
|
-
|
|
19642
|
-
);
|
|
19643
|
-
|
|
19937
|
+
const trackMax = getTrackMax.value;
|
|
19938
|
+
const trackMin = getTrackMin.value;
|
|
19939
|
+
const range = trackMax - trackMin;
|
|
19940
|
+
const step = safeNumber(props2.step, 1);
|
|
19941
|
+
if (range <= 0 || step <= 0) return 0;
|
|
19942
|
+
const steps = Math.round((value - trackMin) / step);
|
|
19943
|
+
return steps * step / range * 100;
|
|
19644
19944
|
};
|
|
19645
19945
|
const setDotByClick = (value) => {
|
|
19646
19946
|
if (props2.readonly || props2.disabled) return;
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19947
|
+
const safeValue = safeNumber(value, getMin.value);
|
|
19948
|
+
const clampedValue = Math.max(
|
|
19949
|
+
getMin.value,
|
|
19950
|
+
Math.min(getMax.value, safeValue)
|
|
19951
|
+
);
|
|
19952
|
+
if (clampedValue >= getMin.value && clampedValue <= getMax.value) {
|
|
19953
|
+
throttledUpdateModelValue(clampedValue);
|
|
19954
|
+
setDotByValue(clampedValue);
|
|
19651
19955
|
}
|
|
19652
19956
|
};
|
|
19653
19957
|
const setDotByValue = (value) => {
|
|
19654
19958
|
if (!dotRef.value) return;
|
|
19655
|
-
|
|
19656
|
-
|
|
19959
|
+
try {
|
|
19960
|
+
const safeValue = safeNumber(value, getMin.value);
|
|
19961
|
+
const clampedValue = Math.max(
|
|
19962
|
+
getMin.value,
|
|
19963
|
+
Math.min(getMax.value, safeValue)
|
|
19964
|
+
);
|
|
19965
|
+
const nearestStep = calculateNearestStep(clampedValue);
|
|
19966
|
+
const clampedStep = Math.max(0, Math.min(100, nearestStep));
|
|
19967
|
+
dotRef.value.style.left = `${clampedStep}%`;
|
|
19968
|
+
} catch (error) {
|
|
19969
|
+
console.warn("[LewSlider] setDotByValue error:", error);
|
|
19970
|
+
}
|
|
19657
19971
|
};
|
|
19658
19972
|
let _dragmove = () => {
|
|
19659
19973
|
};
|
|
19660
19974
|
const init = () => {
|
|
19661
|
-
|
|
19662
|
-
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19975
|
+
try {
|
|
19976
|
+
const el = dotRef.value;
|
|
19977
|
+
const parentEl = trackRef.value;
|
|
19978
|
+
const step = safeNumber(props2.step, 1);
|
|
19979
|
+
if (el && parentEl && !props2.readonly && !props2.disabled) {
|
|
19980
|
+
_dragmove = dragmove({
|
|
19981
|
+
el,
|
|
19982
|
+
parentEl,
|
|
19983
|
+
direction: "horizontal",
|
|
19984
|
+
step: () => step,
|
|
19985
|
+
max: () => getMax.value,
|
|
19986
|
+
min: () => getMin.value,
|
|
19987
|
+
trackMax: () => getTrackMax.value,
|
|
19988
|
+
trackMin: () => getTrackMin.value,
|
|
19989
|
+
callback: (e) => {
|
|
19990
|
+
try {
|
|
19991
|
+
const newValue = calculateValue(e.x);
|
|
19992
|
+
const clampedValue = Math.max(
|
|
19993
|
+
getMin.value,
|
|
19994
|
+
Math.min(getMax.value, newValue)
|
|
19995
|
+
);
|
|
19996
|
+
throttledUpdateModelValue(clampedValue);
|
|
19997
|
+
setDotByValue(clampedValue);
|
|
19998
|
+
} catch (error) {
|
|
19999
|
+
console.warn("[LewSlider] drag callback error:", error);
|
|
20000
|
+
}
|
|
20001
|
+
}
|
|
20002
|
+
});
|
|
20003
|
+
}
|
|
20004
|
+
const currentValue = modelValue2.value || getMin.value;
|
|
20005
|
+
setDotByValue(currentValue);
|
|
20006
|
+
} catch (error) {
|
|
20007
|
+
console.warn("[LewSlider] init error:", error);
|
|
19680
20008
|
}
|
|
19681
|
-
setDotByValue(modelValue2.value);
|
|
19682
20009
|
};
|
|
19683
20010
|
watch(
|
|
19684
20011
|
[
|
|
@@ -19686,25 +20013,42 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19686
20013
|
() => props2.min,
|
|
19687
20014
|
() => props2.step,
|
|
19688
20015
|
() => props2.readonly,
|
|
19689
|
-
() => props2.disabled
|
|
20016
|
+
() => props2.disabled,
|
|
20017
|
+
() => props2.options
|
|
19690
20018
|
],
|
|
19691
20019
|
() => {
|
|
19692
|
-
|
|
19693
|
-
|
|
20020
|
+
nextTick(() => {
|
|
20021
|
+
init();
|
|
20022
|
+
});
|
|
20023
|
+
},
|
|
20024
|
+
{ deep: true }
|
|
19694
20025
|
);
|
|
19695
20026
|
onMounted(() => {
|
|
19696
|
-
|
|
20027
|
+
nextTick(() => {
|
|
20028
|
+
init();
|
|
20029
|
+
});
|
|
19697
20030
|
});
|
|
19698
20031
|
onUnmounted(() => {
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
|
|
20032
|
+
try {
|
|
20033
|
+
_dragmove();
|
|
20034
|
+
throttledUpdateModelValue.cancel();
|
|
20035
|
+
} catch (error) {
|
|
20036
|
+
console.warn("[LewSlider] cleanup error:", error);
|
|
20037
|
+
}
|
|
19703
20038
|
});
|
|
20039
|
+
watch(
|
|
20040
|
+
modelValue2,
|
|
20041
|
+
(newValue) => {
|
|
20042
|
+
const safeValue = safeNumber(newValue, getMin.value);
|
|
20043
|
+
setDotByValue(safeValue);
|
|
20044
|
+
},
|
|
20045
|
+
{ immediate: true }
|
|
20046
|
+
);
|
|
19704
20047
|
const getStyle = computed(() => {
|
|
19705
20048
|
const { size } = props2;
|
|
20049
|
+
const safeSize = size || "medium";
|
|
19706
20050
|
let objStyle = {};
|
|
19707
|
-
switch (
|
|
20051
|
+
switch (safeSize) {
|
|
19708
20052
|
case "small":
|
|
19709
20053
|
objStyle = {
|
|
19710
20054
|
"--lew-slider-track-dot-size": "12px",
|
|
@@ -19733,15 +20077,126 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19733
20077
|
objStyle = {
|
|
19734
20078
|
"--lew-slider-track-dot-size": "16px",
|
|
19735
20079
|
"--lew-slider-track-line-height": "4px",
|
|
19736
|
-
"--lew-slider-track-step-mark-size": "10px"
|
|
20080
|
+
"--lew-slider-track-step-mark-size": "10px",
|
|
20081
|
+
"--lew-slider-track-step-label-size": "14px"
|
|
19737
20082
|
};
|
|
19738
20083
|
break;
|
|
19739
20084
|
}
|
|
19740
20085
|
return {
|
|
19741
20086
|
...objStyle,
|
|
19742
|
-
"--lew-slider-height": `var(--lew-form-item-height-${
|
|
20087
|
+
"--lew-slider-height": `var(--lew-form-item-height-${safeSize})`
|
|
20088
|
+
};
|
|
20089
|
+
});
|
|
20090
|
+
const safeFormatTooltip = (value) => {
|
|
20091
|
+
try {
|
|
20092
|
+
const formatFn = safeFunction(
|
|
20093
|
+
props2.formatTooltip,
|
|
20094
|
+
(val) => val.toString()
|
|
20095
|
+
);
|
|
20096
|
+
return formatFn(value);
|
|
20097
|
+
} catch (error) {
|
|
20098
|
+
console.warn("[LewSlider] formatTooltip error:", error);
|
|
20099
|
+
return value.toString();
|
|
20100
|
+
}
|
|
20101
|
+
};
|
|
20102
|
+
const isValidOption = (option) => {
|
|
20103
|
+
return option && typeof option === "object" && "label" in option && "value" in option && typeof option.label === "string" && !isNaN(safeNumber(option.value));
|
|
20104
|
+
};
|
|
20105
|
+
const validOptions = computed(() => {
|
|
20106
|
+
const options = safeArray(props2.options);
|
|
20107
|
+
return options.filter(isValidOption);
|
|
20108
|
+
});
|
|
20109
|
+
const disabledAreaStyles = computed(() => {
|
|
20110
|
+
const leftWidth = getMarkPosition(getMin.value);
|
|
20111
|
+
const rightWidth = 100 - getMarkPosition(getMax.value);
|
|
20112
|
+
return {
|
|
20113
|
+
left: {
|
|
20114
|
+
width: `${leftWidth}%`
|
|
20115
|
+
},
|
|
20116
|
+
right: {
|
|
20117
|
+
width: `${rightWidth}%`
|
|
20118
|
+
}
|
|
20119
|
+
};
|
|
20120
|
+
});
|
|
20121
|
+
const trackRangeStyles = computed(() => {
|
|
20122
|
+
const trackMax = getTrackMax.value;
|
|
20123
|
+
const trackMin = getTrackMin.value;
|
|
20124
|
+
const range = trackMax - trackMin;
|
|
20125
|
+
if (range <= 0) {
|
|
20126
|
+
return {
|
|
20127
|
+
width: "0%",
|
|
20128
|
+
left: "0%"
|
|
20129
|
+
};
|
|
20130
|
+
}
|
|
20131
|
+
const width = Math.max(
|
|
20132
|
+
0,
|
|
20133
|
+
Math.min(100, (getMax.value - getMin.value) / range * 100)
|
|
20134
|
+
);
|
|
20135
|
+
const left2 = getMarkPosition(getMin.value);
|
|
20136
|
+
return {
|
|
20137
|
+
width: `${width}%`,
|
|
20138
|
+
left: `${left2}%`
|
|
20139
|
+
};
|
|
20140
|
+
});
|
|
20141
|
+
const selectedTrackStyles = computed(() => {
|
|
20142
|
+
const currentValue = modelValue2.value || getMin.value;
|
|
20143
|
+
const width = getMarkPosition(currentValue);
|
|
20144
|
+
return {
|
|
20145
|
+
width: `${width}%`
|
|
20146
|
+
};
|
|
20147
|
+
});
|
|
20148
|
+
const dotStyles = computed(() => {
|
|
20149
|
+
const currentValue = modelValue2.value;
|
|
20150
|
+
const opacity = currentValue !== void 0 && currentValue !== null ? "1" : "0";
|
|
20151
|
+
return {
|
|
20152
|
+
opacity
|
|
20153
|
+
};
|
|
20154
|
+
});
|
|
20155
|
+
const tooltipConfig = computed(() => {
|
|
20156
|
+
const currentValue = safeNumber(modelValue2.value);
|
|
20157
|
+
return {
|
|
20158
|
+
content: safeFormatTooltip(currentValue),
|
|
20159
|
+
placement: "top",
|
|
20160
|
+
trigger: "mouseenter",
|
|
20161
|
+
delay: [0, 1e3],
|
|
20162
|
+
key: dotX.value
|
|
19743
20163
|
};
|
|
19744
20164
|
});
|
|
20165
|
+
const optionMarkStyles = computed(() => {
|
|
20166
|
+
return validOptions.value.map((item) => {
|
|
20167
|
+
const value = safeNumber(item.value);
|
|
20168
|
+
const currentValue = safeNumber(modelValue2.value);
|
|
20169
|
+
const isSelected = value <= currentValue;
|
|
20170
|
+
return {
|
|
20171
|
+
key: `mark-${item.value}`,
|
|
20172
|
+
style: {
|
|
20173
|
+
left: `${getMarkPosition(item.value)}%`
|
|
20174
|
+
},
|
|
20175
|
+
class: {
|
|
20176
|
+
"lew-slider-track-step-mark-selected": isSelected
|
|
20177
|
+
}
|
|
20178
|
+
};
|
|
20179
|
+
});
|
|
20180
|
+
});
|
|
20181
|
+
const optionLabelStyles = computed(() => {
|
|
20182
|
+
return validOptions.value.map((item) => {
|
|
20183
|
+
const value = safeNumber(item.value);
|
|
20184
|
+
const isDisabled = value < getMin.value || value > getMax.value;
|
|
20185
|
+
const displayText = item.label || value.toString();
|
|
20186
|
+
return {
|
|
20187
|
+
key: `label-${item.value}`,
|
|
20188
|
+
style: {
|
|
20189
|
+
left: `${getMarkPosition(item.value)}%`,
|
|
20190
|
+
top: `calc(var(--lew-slider-height) - 20px)`
|
|
20191
|
+
},
|
|
20192
|
+
textClass: {
|
|
20193
|
+
"lew-slider-track-step-label-text-disabled": isDisabled
|
|
20194
|
+
},
|
|
20195
|
+
displayText,
|
|
20196
|
+
value
|
|
20197
|
+
};
|
|
20198
|
+
});
|
|
20199
|
+
});
|
|
19745
20200
|
return (_ctx, _cache) => {
|
|
19746
20201
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
19747
20202
|
return openBlock(), createElementBlock("div", {
|
|
@@ -19758,17 +20213,13 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19758
20213
|
class: "lew-slider-track"
|
|
19759
20214
|
}, [
|
|
19760
20215
|
createElementVNode("div", {
|
|
19761
|
-
style: normalizeStyle(
|
|
19762
|
-
width: `${getMarkPosition(unref(getMin))}%`
|
|
19763
|
-
}),
|
|
20216
|
+
style: normalizeStyle(unref(disabledAreaStyles).left),
|
|
19764
20217
|
class: "lew-slider-track-disabled-area lew-slider-track-disabled-area-left",
|
|
19765
20218
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
19766
20219
|
}, ["stop"]))
|
|
19767
20220
|
}, null, 4),
|
|
19768
20221
|
createElementVNode("div", {
|
|
19769
|
-
style: normalizeStyle(
|
|
19770
|
-
width: `${100 - getMarkPosition(unref(getMax))}%`
|
|
19771
|
-
}),
|
|
20222
|
+
style: normalizeStyle(unref(disabledAreaStyles).right),
|
|
19772
20223
|
class: "lew-slider-track-disabled-area lew-slider-track-disabled-area-right",
|
|
19773
20224
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
19774
20225
|
}, ["stop"]))
|
|
@@ -19776,41 +20227,29 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19776
20227
|
createElementVNode("div", _hoisted_1$k, [
|
|
19777
20228
|
createElementVNode("div", {
|
|
19778
20229
|
class: "lew-slider-track-line-range",
|
|
19779
|
-
style: normalizeStyle(
|
|
19780
|
-
width: `${Math.max(0, Math.min(100, (unref(getMax) - unref(getMin)) / (unref(getTrackMax) - unref(getTrackMin)) * 100))}%`,
|
|
19781
|
-
left: `${getMarkPosition(unref(getMin))}%`
|
|
19782
|
-
})
|
|
20230
|
+
style: normalizeStyle(unref(trackRangeStyles))
|
|
19783
20231
|
}, null, 4),
|
|
19784
20232
|
createElementVNode("div", {
|
|
19785
20233
|
class: "lew-slider-track-line-selected",
|
|
19786
|
-
style: normalizeStyle(
|
|
20234
|
+
style: normalizeStyle(unref(selectedTrackStyles))
|
|
19787
20235
|
}, null, 4),
|
|
19788
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
20236
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(optionMarkStyles), (markStyle, index2) => {
|
|
19789
20237
|
return openBlock(), createElementBlock("div", {
|
|
19790
|
-
key:
|
|
19791
|
-
class: normalizeClass(["lew-slider-track-step-mark",
|
|
19792
|
-
|
|
19793
|
-
}]),
|
|
19794
|
-
style: normalizeStyle({
|
|
19795
|
-
left: `${getMarkPosition(item.value)}%`
|
|
19796
|
-
})
|
|
20238
|
+
key: markStyle.key,
|
|
20239
|
+
class: normalizeClass(["lew-slider-track-step-mark", markStyle.class]),
|
|
20240
|
+
style: normalizeStyle(markStyle.style)
|
|
19797
20241
|
}, null, 6);
|
|
19798
20242
|
}), 128)),
|
|
19799
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
20243
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(optionLabelStyles), (labelStyle, index2) => {
|
|
19800
20244
|
return openBlock(), createElementBlock("div", {
|
|
19801
|
-
key:
|
|
20245
|
+
key: labelStyle.key,
|
|
19802
20246
|
class: "lew-slider-track-step-label",
|
|
19803
|
-
style: normalizeStyle(
|
|
19804
|
-
left: `${getMarkPosition(item.value)}%`,
|
|
19805
|
-
top: `calc(var(--lew-slider-height) - 20px)`
|
|
19806
|
-
})
|
|
20247
|
+
style: normalizeStyle(labelStyle.style)
|
|
19807
20248
|
}, [
|
|
19808
20249
|
createElementVNode("div", {
|
|
19809
|
-
onClick: withModifiers(($event) => setDotByClick(
|
|
19810
|
-
class: normalizeClass(["lew-slider-track-step-label-text",
|
|
19811
|
-
|
|
19812
|
-
}])
|
|
19813
|
-
}, toDisplayString$1(item.label), 11, _hoisted_2$a)
|
|
20250
|
+
onClick: withModifiers(($event) => setDotByClick(labelStyle.value), ["stop"]),
|
|
20251
|
+
class: normalizeClass(["lew-slider-track-step-label-text", labelStyle.textClass])
|
|
20252
|
+
}, toDisplayString$1(labelStyle.displayText), 11, _hoisted_2$a)
|
|
19814
20253
|
], 4);
|
|
19815
20254
|
}), 128))
|
|
19816
20255
|
]),
|
|
@@ -19819,25 +20258,17 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
19819
20258
|
}, ["stop"])),
|
|
19820
20259
|
ref_key: "dotRef",
|
|
19821
20260
|
ref: dotRef,
|
|
19822
|
-
style: normalizeStyle(
|
|
19823
|
-
opacity: modelValue2.value || modelValue2.value === 0 ? "1" : "0"
|
|
19824
|
-
}),
|
|
20261
|
+
style: normalizeStyle(unref(dotStyles)),
|
|
19825
20262
|
class: "lew-slider-track-dot"
|
|
19826
20263
|
}, null, 4), [
|
|
19827
|
-
[_directive_tooltip,
|
|
19828
|
-
content: _ctx.formatTooltip(modelValue2.value),
|
|
19829
|
-
placement: "top",
|
|
19830
|
-
trigger: "mouseenter",
|
|
19831
|
-
delay: [0, 1e3],
|
|
19832
|
-
key: unref(dotX)
|
|
19833
|
-
}]
|
|
20264
|
+
[_directive_tooltip, unref(tooltipConfig)]
|
|
19834
20265
|
])
|
|
19835
20266
|
], 512)
|
|
19836
20267
|
], 6);
|
|
19837
20268
|
};
|
|
19838
20269
|
}
|
|
19839
20270
|
});
|
|
19840
|
-
const LewSlider = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-
|
|
20271
|
+
const LewSlider = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-1be02cd9"]]);
|
|
19841
20272
|
const sliderRangeModel = {
|
|
19842
20273
|
modelValue: {
|
|
19843
20274
|
type: Array,
|
|
@@ -19934,19 +20365,44 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
19934
20365
|
"modelValue": {},
|
|
19935
20366
|
"modelModifiers": {}
|
|
19936
20367
|
}),
|
|
19937
|
-
emits: ["update:modelValue"],
|
|
19938
|
-
setup(__props2) {
|
|
20368
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
20369
|
+
setup(__props2, { emit: __emit2 }) {
|
|
19939
20370
|
const props2 = __props2;
|
|
20371
|
+
const emit2 = __emit2;
|
|
19940
20372
|
const modelValue2 = useModel(__props2, "modelValue", {
|
|
19941
20373
|
get(val) {
|
|
19942
|
-
if (val)
|
|
20374
|
+
if (Array.isArray(val) && val.length === 2 && val.every((v) => v !== null && v !== void 0)) {
|
|
20375
|
+
return val;
|
|
20376
|
+
}
|
|
19943
20377
|
return [getMin.value, getMax.value];
|
|
19944
20378
|
}
|
|
19945
20379
|
});
|
|
20380
|
+
const _modelValue = ref([0, 0]);
|
|
20381
|
+
const isDragging = ref(false);
|
|
20382
|
+
const safeGetArrayValue = (arr, index2, defaultValue) => {
|
|
20383
|
+
if (!Array.isArray(arr) || arr.length <= index2 || arr[index2] === null || arr[index2] === void 0) {
|
|
20384
|
+
return defaultValue;
|
|
20385
|
+
}
|
|
20386
|
+
return arr[index2];
|
|
20387
|
+
};
|
|
20388
|
+
const getInternalValueAt = (index2, defaultValue) => {
|
|
20389
|
+
return safeGetArrayValue(_modelValue.value, index2, defaultValue);
|
|
20390
|
+
};
|
|
19946
20391
|
const dotRef1 = ref(null);
|
|
19947
20392
|
const dotRef2 = ref(null);
|
|
19948
20393
|
const trackRef = ref(null);
|
|
19949
20394
|
const dotX = ref(0);
|
|
20395
|
+
const throttledUpdateModelValue = throttle(
|
|
20396
|
+
(leftValue, rightValue) => {
|
|
20397
|
+
if (!modelValue2.value) {
|
|
20398
|
+
modelValue2.value = [0, 0];
|
|
20399
|
+
}
|
|
20400
|
+
const sortedValues = [leftValue, rightValue].sort((a, b) => a - b);
|
|
20401
|
+
modelValue2.value = sortedValues;
|
|
20402
|
+
emit2("change", modelValue2.value);
|
|
20403
|
+
},
|
|
20404
|
+
16
|
|
20405
|
+
);
|
|
19950
20406
|
const getTrackMax = computed(() => {
|
|
19951
20407
|
const { options, max: max2 } = props2;
|
|
19952
20408
|
if (options && options.length > 0) {
|
|
@@ -19999,6 +20455,14 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
19999
20455
|
dotRef2.value.style.left = `${nearestStepPercentage}%`;
|
|
20000
20456
|
}
|
|
20001
20457
|
};
|
|
20458
|
+
const updateDotsByModelValue = (values) => {
|
|
20459
|
+
if (!Array.isArray(values) || values.length !== 2 || values.some((v) => v === null || v === void 0)) {
|
|
20460
|
+
return;
|
|
20461
|
+
}
|
|
20462
|
+
const [leftValue, rightValue] = values;
|
|
20463
|
+
setDotByValue(leftValue, true);
|
|
20464
|
+
setDotByValue(rightValue, false);
|
|
20465
|
+
};
|
|
20002
20466
|
let _dragmove = () => {
|
|
20003
20467
|
};
|
|
20004
20468
|
const init = () => {
|
|
@@ -20012,17 +20476,19 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20012
20476
|
parentEl,
|
|
20013
20477
|
direction: "horizontal",
|
|
20014
20478
|
step: () => Number(step),
|
|
20015
|
-
max: () =>
|
|
20016
|
-
getMax.value,
|
|
20017
|
-
modelValue2.value ? modelValue2.value[1] : getMax.value
|
|
20018
|
-
),
|
|
20019
|
-
// 动态最大值
|
|
20479
|
+
max: () => getMax.value,
|
|
20020
20480
|
min: () => getMin.value,
|
|
20021
20481
|
trackMax: () => getTrackMax.value,
|
|
20022
20482
|
trackMin: () => getTrackMin.value,
|
|
20023
20483
|
callback: (e) => {
|
|
20024
|
-
|
|
20025
|
-
|
|
20484
|
+
const newValue = [
|
|
20485
|
+
getInternalValueAt(0, getMin.value),
|
|
20486
|
+
getInternalValueAt(1, getMax.value)
|
|
20487
|
+
];
|
|
20488
|
+
newValue[0] = calculateValue(e.x);
|
|
20489
|
+
_modelValue.value = [newValue[0], newValue[1]];
|
|
20490
|
+
throttledUpdateModelValue(newValue[0], newValue[1]);
|
|
20491
|
+
updateDotsByModelValue([newValue[0], newValue[1]]);
|
|
20026
20492
|
}
|
|
20027
20493
|
});
|
|
20028
20494
|
_dragmove = dragmove({
|
|
@@ -20031,21 +20497,22 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20031
20497
|
direction: "horizontal",
|
|
20032
20498
|
step: () => Number(step),
|
|
20033
20499
|
max: () => getMax.value,
|
|
20034
|
-
min: () =>
|
|
20035
|
-
getMin.value,
|
|
20036
|
-
modelValue2.value ? modelValue2.value[0] : getMin.value
|
|
20037
|
-
),
|
|
20038
|
-
// 动态最小值
|
|
20500
|
+
min: () => getMin.value,
|
|
20039
20501
|
trackMax: () => getTrackMax.value,
|
|
20040
20502
|
trackMin: () => getTrackMin.value,
|
|
20041
20503
|
callback: (e) => {
|
|
20042
|
-
|
|
20043
|
-
|
|
20504
|
+
const newValue = [
|
|
20505
|
+
getInternalValueAt(0, getMin.value),
|
|
20506
|
+
getInternalValueAt(1, getMax.value)
|
|
20507
|
+
];
|
|
20508
|
+
newValue[1] = calculateValue(e.x);
|
|
20509
|
+
_modelValue.value = [newValue[0], newValue[1]];
|
|
20510
|
+
throttledUpdateModelValue(newValue[0], newValue[1]);
|
|
20511
|
+
updateDotsByModelValue([newValue[0], newValue[1]]);
|
|
20044
20512
|
}
|
|
20045
20513
|
});
|
|
20046
20514
|
}
|
|
20047
|
-
|
|
20048
|
-
setDotByValue(modelValue2.value ? modelValue2.value[1] : 0, false);
|
|
20515
|
+
updateDotsByModelValue(_modelValue.value || [getMin.value, getMax.value]);
|
|
20049
20516
|
};
|
|
20050
20517
|
watch(
|
|
20051
20518
|
[
|
|
@@ -20059,22 +20526,35 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20059
20526
|
init();
|
|
20060
20527
|
}
|
|
20061
20528
|
);
|
|
20062
|
-
onMounted(() => {
|
|
20063
|
-
init();
|
|
20064
|
-
});
|
|
20065
|
-
onUnmounted(() => {
|
|
20066
|
-
_dragmove();
|
|
20067
|
-
});
|
|
20068
20529
|
watch(
|
|
20069
20530
|
modelValue2,
|
|
20070
20531
|
(newValue) => {
|
|
20071
|
-
|
|
20072
|
-
|
|
20532
|
+
if (isDragging.value) {
|
|
20533
|
+
return;
|
|
20534
|
+
}
|
|
20535
|
+
if (Array.isArray(newValue) && newValue.length === 2 && newValue.every((v) => v !== null && v !== void 0)) {
|
|
20536
|
+
_modelValue.value = [...newValue];
|
|
20537
|
+
updateDotsByModelValue(_modelValue.value);
|
|
20538
|
+
}
|
|
20073
20539
|
},
|
|
20074
20540
|
{
|
|
20075
|
-
deep: true
|
|
20541
|
+
deep: true,
|
|
20542
|
+
immediate: true
|
|
20076
20543
|
}
|
|
20077
20544
|
);
|
|
20545
|
+
onMounted(() => {
|
|
20546
|
+
const currentModelValue = modelValue2.value;
|
|
20547
|
+
if (Array.isArray(currentModelValue) && currentModelValue.length === 2 && currentModelValue.every((v) => v !== null && v !== void 0)) {
|
|
20548
|
+
_modelValue.value = [...currentModelValue];
|
|
20549
|
+
} else {
|
|
20550
|
+
_modelValue.value = [getMin.value, getMax.value];
|
|
20551
|
+
}
|
|
20552
|
+
init();
|
|
20553
|
+
});
|
|
20554
|
+
onUnmounted(() => {
|
|
20555
|
+
_dragmove();
|
|
20556
|
+
throttledUpdateModelValue.cancel();
|
|
20557
|
+
});
|
|
20078
20558
|
const getStyle = computed(() => {
|
|
20079
20559
|
const { size } = props2;
|
|
20080
20560
|
let objStyle = {};
|
|
@@ -20116,8 +20596,79 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20116
20596
|
"--lew-slider-height": `var(--lew-form-item-height-${size})`
|
|
20117
20597
|
};
|
|
20118
20598
|
});
|
|
20599
|
+
const selectedAreaStyle = computed(() => {
|
|
20600
|
+
const leftValue = getInternalValueAt(0, getMin.value);
|
|
20601
|
+
const rightValue = getInternalValueAt(1, getMax.value);
|
|
20602
|
+
const minValue = Math.min(leftValue, rightValue);
|
|
20603
|
+
const width = Math.max(
|
|
20604
|
+
0,
|
|
20605
|
+
Math.min(
|
|
20606
|
+
100,
|
|
20607
|
+
Math.abs(rightValue - leftValue) / (getTrackMax.value - getTrackMin.value) * 100
|
|
20608
|
+
)
|
|
20609
|
+
);
|
|
20610
|
+
const left2 = getMarkPosition(minValue);
|
|
20611
|
+
return {
|
|
20612
|
+
width: `${width}%`,
|
|
20613
|
+
left: `${left2}%`
|
|
20614
|
+
};
|
|
20615
|
+
});
|
|
20616
|
+
const rangeAreaStyle = computed(() => {
|
|
20617
|
+
const width = Math.max(
|
|
20618
|
+
0,
|
|
20619
|
+
Math.min(
|
|
20620
|
+
100,
|
|
20621
|
+
(getMax.value - getMin.value) / (getTrackMax.value - getTrackMin.value) * 100
|
|
20622
|
+
)
|
|
20623
|
+
);
|
|
20624
|
+
return {
|
|
20625
|
+
width: `${width}%`,
|
|
20626
|
+
left: `${getMarkPosition(getMin.value)}%`
|
|
20627
|
+
};
|
|
20628
|
+
});
|
|
20629
|
+
const isStepMarkSelected = (value) => {
|
|
20630
|
+
const leftValue = getInternalValueAt(0, getMin.value);
|
|
20631
|
+
const rightValue = getInternalValueAt(1, getMax.value);
|
|
20632
|
+
const minValue = Math.min(leftValue, rightValue);
|
|
20633
|
+
const maxValue = Math.max(leftValue, rightValue);
|
|
20634
|
+
return Number(value) >= minValue && Number(value) <= maxValue;
|
|
20635
|
+
};
|
|
20636
|
+
const isStepLabelDisabled = (value) => {
|
|
20637
|
+
return Number(value) < Number(getMin.value) || Number(value) > Number(getMax.value);
|
|
20638
|
+
};
|
|
20639
|
+
const createTooltipConfig = (value) => ({
|
|
20640
|
+
content: props2.formatTooltip(value),
|
|
20641
|
+
placement: "top",
|
|
20642
|
+
trigger: "mouseenter",
|
|
20643
|
+
delay: [0, 1e3],
|
|
20644
|
+
key: dotX.value
|
|
20645
|
+
});
|
|
20646
|
+
const leftDotTooltip = computed(
|
|
20647
|
+
() => createTooltipConfig(getInternalValueAt(0, getMin.value))
|
|
20648
|
+
);
|
|
20649
|
+
const rightDotTooltip = computed(
|
|
20650
|
+
() => createTooltipConfig(getInternalValueAt(1, getMax.value))
|
|
20651
|
+
);
|
|
20652
|
+
const leftDisabledAreaStyle = computed(() => ({
|
|
20653
|
+
width: `${getMarkPosition(getMin.value)}%`
|
|
20654
|
+
}));
|
|
20655
|
+
const rightDisabledAreaStyle = computed(() => ({
|
|
20656
|
+
width: `${100 - getMarkPosition(getMax.value)}%`
|
|
20657
|
+
}));
|
|
20658
|
+
const createStepLabelStyle = (value) => ({
|
|
20659
|
+
left: `${getMarkPosition(value)}%`,
|
|
20660
|
+
top: `calc(var(--lew-slider-height) - 20px)`
|
|
20661
|
+
});
|
|
20662
|
+
const createStepMarkStyle = (value) => ({
|
|
20663
|
+
left: `${getMarkPosition(value)}%`
|
|
20664
|
+
});
|
|
20665
|
+
const leftDotStyle = computed(() => ({
|
|
20666
|
+
opacity: getInternalValueAt(0, getMin.value) !== void 0 ? "1" : "0"
|
|
20667
|
+
}));
|
|
20668
|
+
const rightDotStyle = computed(() => ({
|
|
20669
|
+
opacity: getInternalValueAt(1, getMax.value) !== void 0 ? "1" : "0"
|
|
20670
|
+
}));
|
|
20119
20671
|
return (_ctx, _cache) => {
|
|
20120
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
20121
20672
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
20122
20673
|
return openBlock(), createElementBlock("div", {
|
|
20123
20674
|
class: normalizeClass(["lew-slider", {
|
|
@@ -20132,17 +20683,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20132
20683
|
class: "lew-slider-track"
|
|
20133
20684
|
}, [
|
|
20134
20685
|
createElementVNode("div", {
|
|
20135
|
-
style: normalizeStyle(
|
|
20136
|
-
width: `${getMarkPosition(unref(getMin))}%`
|
|
20137
|
-
}),
|
|
20686
|
+
style: normalizeStyle(unref(leftDisabledAreaStyle)),
|
|
20138
20687
|
class: "lew-slider-track-disabled-area lew-slider-track-disabled-area-left",
|
|
20139
20688
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
20140
20689
|
}, ["stop"]))
|
|
20141
20690
|
}, null, 4),
|
|
20142
20691
|
createElementVNode("div", {
|
|
20143
|
-
style: normalizeStyle(
|
|
20144
|
-
width: `${100 - getMarkPosition(unref(getMax))}%`
|
|
20145
|
-
}),
|
|
20692
|
+
style: normalizeStyle(unref(rightDisabledAreaStyle)),
|
|
20146
20693
|
class: "lew-slider-track-disabled-area lew-slider-track-disabled-area-right",
|
|
20147
20694
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
20148
20695
|
}, ["stop"]))
|
|
@@ -20150,42 +20697,34 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20150
20697
|
createElementVNode("div", _hoisted_1$j, [
|
|
20151
20698
|
createElementVNode("div", {
|
|
20152
20699
|
class: "lew-slider-track-line-range",
|
|
20153
|
-
style: normalizeStyle(
|
|
20154
|
-
width: `${Math.max(0, Math.min(100, (unref(getMax) - unref(getMin)) / (unref(getTrackMax) - unref(getTrackMin)) * 100))}%`,
|
|
20155
|
-
left: `${getMarkPosition(unref(getMin))}%`
|
|
20156
|
-
})
|
|
20700
|
+
style: normalizeStyle(unref(rangeAreaStyle))
|
|
20157
20701
|
}, null, 4),
|
|
20158
20702
|
createElementVNode("div", {
|
|
20159
20703
|
class: "lew-slider-track-line-selected",
|
|
20160
|
-
style: normalizeStyle(
|
|
20161
|
-
width: `${Math.max(0, Math.min(100, ((((_a = modelValue2.value) == null ? void 0 : _a[1]) ?? 0) - (((_b = modelValue2.value) == null ? void 0 : _b[0]) ?? 0)) / (unref(getTrackMax) - unref(getTrackMin)) * 100))}%`,
|
|
20162
|
-
left: `${getMarkPosition(((_c = modelValue2.value) == null ? void 0 : _c[0]) ?? 0)}%`
|
|
20163
|
-
})
|
|
20704
|
+
style: normalizeStyle(unref(selectedAreaStyle))
|
|
20164
20705
|
}, null, 4),
|
|
20165
20706
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
20166
|
-
var _a2, _b2;
|
|
20167
20707
|
return openBlock(), createElementBlock("div", {
|
|
20168
20708
|
key: index2,
|
|
20169
20709
|
class: normalizeClass(["lew-slider-track-step-mark", {
|
|
20170
|
-
"lew-slider-track-step-mark-selected":
|
|
20710
|
+
"lew-slider-track-step-mark-selected": isStepMarkSelected(
|
|
20711
|
+
item.value
|
|
20712
|
+
)
|
|
20171
20713
|
}]),
|
|
20172
|
-
style: normalizeStyle(
|
|
20173
|
-
left: `${getMarkPosition(item.value)}%`
|
|
20174
|
-
})
|
|
20714
|
+
style: normalizeStyle(createStepMarkStyle(item.value))
|
|
20175
20715
|
}, null, 6);
|
|
20176
20716
|
}), 128)),
|
|
20177
20717
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index2) => {
|
|
20178
20718
|
return openBlock(), createElementBlock("div", {
|
|
20179
20719
|
key: index2,
|
|
20180
20720
|
class: "lew-slider-track-step-label",
|
|
20181
|
-
style: normalizeStyle(
|
|
20182
|
-
left: `${getMarkPosition(item.value)}%`,
|
|
20183
|
-
top: `calc(var(--lew-slider-height) - 20px)`
|
|
20184
|
-
})
|
|
20721
|
+
style: normalizeStyle(createStepLabelStyle(item.value))
|
|
20185
20722
|
}, [
|
|
20186
20723
|
createElementVNode("div", {
|
|
20187
20724
|
class: normalizeClass(["lew-slider-track-step-label-text", {
|
|
20188
|
-
"lew-slider-track-step-label-text-disabled":
|
|
20725
|
+
"lew-slider-track-step-label-text-disabled": isStepLabelDisabled(
|
|
20726
|
+
item.value
|
|
20727
|
+
)
|
|
20189
20728
|
}])
|
|
20190
20729
|
}, toDisplayString$1(item.label), 3)
|
|
20191
20730
|
], 4);
|
|
@@ -20194,41 +20733,29 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20194
20733
|
withDirectives(createElementVNode("div", {
|
|
20195
20734
|
ref_key: "dotRef1",
|
|
20196
20735
|
ref: dotRef1,
|
|
20197
|
-
style: normalizeStyle(
|
|
20198
|
-
|
|
20199
|
-
|
|
20200
|
-
|
|
20201
|
-
}, null,
|
|
20202
|
-
[_directive_tooltip,
|
|
20203
|
-
content: _ctx.formatTooltip(((_e = modelValue2.value) == null ? void 0 : _e[0]) ?? 0),
|
|
20204
|
-
placement: "top",
|
|
20205
|
-
trigger: "mouseenter",
|
|
20206
|
-
delay: [0, 1e3],
|
|
20207
|
-
key: unref(dotX)
|
|
20208
|
-
}]
|
|
20736
|
+
style: normalizeStyle(unref(leftDotStyle)),
|
|
20737
|
+
class: "lew-slider-track-dot",
|
|
20738
|
+
onMousedown: _cache[2] || (_cache[2] = ($event) => isDragging.value = true),
|
|
20739
|
+
onMouseup: _cache[3] || (_cache[3] = ($event) => isDragging.value = false)
|
|
20740
|
+
}, null, 36), [
|
|
20741
|
+
[_directive_tooltip, unref(leftDotTooltip)]
|
|
20209
20742
|
]),
|
|
20210
20743
|
withDirectives(createElementVNode("div", {
|
|
20211
20744
|
ref_key: "dotRef2",
|
|
20212
20745
|
ref: dotRef2,
|
|
20213
|
-
style: normalizeStyle(
|
|
20214
|
-
|
|
20215
|
-
|
|
20746
|
+
style: normalizeStyle(unref(rightDotStyle)),
|
|
20747
|
+
onMousedown: _cache[4] || (_cache[4] = ($event) => isDragging.value = true),
|
|
20748
|
+
onMouseup: _cache[5] || (_cache[5] = ($event) => isDragging.value = false),
|
|
20216
20749
|
class: "lew-slider-track-dot"
|
|
20217
|
-
}, null,
|
|
20218
|
-
[_directive_tooltip,
|
|
20219
|
-
content: _ctx.formatTooltip(((_g = modelValue2.value) == null ? void 0 : _g[1]) ?? 0),
|
|
20220
|
-
placement: "top",
|
|
20221
|
-
trigger: "mouseenter",
|
|
20222
|
-
delay: [0, 1e3],
|
|
20223
|
-
key: unref(dotX)
|
|
20224
|
-
}]
|
|
20750
|
+
}, null, 36), [
|
|
20751
|
+
[_directive_tooltip, unref(rightDotTooltip)]
|
|
20225
20752
|
])
|
|
20226
20753
|
], 512)
|
|
20227
20754
|
], 6);
|
|
20228
20755
|
};
|
|
20229
20756
|
}
|
|
20230
20757
|
});
|
|
20231
|
-
const LewSliderRange = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
20758
|
+
const LewSliderRange = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-dfafe548"]]);
|
|
20232
20759
|
const colorPickerModel = {
|
|
20233
20760
|
modelValue: {
|
|
20234
20761
|
type: String,
|
|
@@ -20385,7 +20912,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
20385
20912
|
};
|
|
20386
20913
|
}
|
|
20387
20914
|
});
|
|
20388
|
-
const LewColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
20915
|
+
const LewColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-44ec36e9"]]);
|
|
20389
20916
|
const uploadProps = {
|
|
20390
20917
|
accept: {
|
|
20391
20918
|
type: String,
|
|
@@ -20794,7 +21321,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
20794
21321
|
};
|
|
20795
21322
|
}
|
|
20796
21323
|
});
|
|
20797
|
-
const LewUploadByList = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-
|
|
21324
|
+
const LewUploadByList = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-9d36c05a"]]);
|
|
20798
21325
|
const _hoisted_1$g = ["src"];
|
|
20799
21326
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
20800
21327
|
__name: "LewUploadByCard",
|
|
@@ -20998,7 +21525,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
20998
21525
|
};
|
|
20999
21526
|
}
|
|
21000
21527
|
});
|
|
21001
|
-
const LewUploadByCard = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
21528
|
+
const LewUploadByCard = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-6bff2d9d"]]);
|
|
21002
21529
|
const _hoisted_1$f = ["multiple", "accept"];
|
|
21003
21530
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
21004
21531
|
__name: "LewUpload",
|
|
@@ -21099,7 +21626,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
21099
21626
|
};
|
|
21100
21627
|
const deleteFile = (key) => {
|
|
21101
21628
|
let fileList = cloneDeep(modelValue2.value) || [];
|
|
21102
|
-
const index2 = (fileList || []).findIndex(
|
|
21629
|
+
const index2 = (fileList || []).findIndex(
|
|
21630
|
+
(e) => e.key === key
|
|
21631
|
+
);
|
|
21103
21632
|
if (index2 >= 0) {
|
|
21104
21633
|
const { status } = fileList[index2];
|
|
21105
21634
|
if (["wrong_type", "wrong_size", "pending"].includes(status || "")) {
|
|
@@ -21203,7 +21732,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
21203
21732
|
const setFileItem = (item) => {
|
|
21204
21733
|
const { key, percent } = item;
|
|
21205
21734
|
let fileList = cloneDeep(modelValue2.value) || [];
|
|
21206
|
-
const index2 = (fileList || []).findIndex(
|
|
21735
|
+
const index2 = (fileList || []).findIndex(
|
|
21736
|
+
(e) => e.key === key
|
|
21737
|
+
);
|
|
21207
21738
|
let _percent = percent || 0;
|
|
21208
21739
|
if (index2 >= 0) {
|
|
21209
21740
|
if (percent) {
|
|
@@ -21349,7 +21880,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
21349
21880
|
};
|
|
21350
21881
|
}
|
|
21351
21882
|
});
|
|
21352
|
-
const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
21883
|
+
const LewUpload = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c1a95330"]]);
|
|
21353
21884
|
const rateModel = {
|
|
21354
21885
|
modelValue: {
|
|
21355
21886
|
type: Number,
|
|
@@ -21522,7 +22053,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
21522
22053
|
};
|
|
21523
22054
|
}
|
|
21524
22055
|
});
|
|
21525
|
-
const LewRate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-
|
|
22056
|
+
const LewRate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-faed33e8"]]);
|
|
21526
22057
|
const tableModel = {
|
|
21527
22058
|
selectedKeys: {
|
|
21528
22059
|
type: [Array, String, Number, void 0],
|
|
@@ -21687,7 +22218,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21687
22218
|
};
|
|
21688
22219
|
}
|
|
21689
22220
|
});
|
|
21690
|
-
const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-
|
|
22221
|
+
const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-fffa0573"]]);
|
|
21691
22222
|
const _hoisted_1$d = { class: "lew-table-header" };
|
|
21692
22223
|
const _hoisted_2$8 = { class: "lew-table-tr" };
|
|
21693
22224
|
const _hoisted_3$6 = { class: "lew-table-main" };
|
|
@@ -23157,7 +23688,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
23157
23688
|
};
|
|
23158
23689
|
}
|
|
23159
23690
|
});
|
|
23160
|
-
const LewPagination = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-
|
|
23691
|
+
const LewPagination = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-fbd17bd8"]]);
|
|
23161
23692
|
const treeModel = {
|
|
23162
23693
|
modelValue: {
|
|
23163
23694
|
type: [Array, String],
|
|
@@ -23233,7 +23764,7 @@ const treeProps = {
|
|
|
23233
23764
|
default: "disabled",
|
|
23234
23765
|
description: "指定作为禁用状态的字段名"
|
|
23235
23766
|
},
|
|
23236
|
-
|
|
23767
|
+
initOptionsMethod: {
|
|
23237
23768
|
type: Function,
|
|
23238
23769
|
default: void 0,
|
|
23239
23770
|
description: "初始化树形数据的方法"
|
|
@@ -23371,7 +23902,7 @@ const formatTree = ({
|
|
|
23371
23902
|
});
|
|
23372
23903
|
};
|
|
23373
23904
|
const transformTree = async ({
|
|
23374
|
-
|
|
23905
|
+
initOptionsMethod = null,
|
|
23375
23906
|
dataSource = [],
|
|
23376
23907
|
keyField = "key",
|
|
23377
23908
|
labelField = "label",
|
|
@@ -23381,9 +23912,9 @@ const transformTree = async ({
|
|
|
23381
23912
|
let tree = [];
|
|
23382
23913
|
const status = "success";
|
|
23383
23914
|
try {
|
|
23384
|
-
if (
|
|
23915
|
+
if (initOptionsMethod) {
|
|
23385
23916
|
try {
|
|
23386
|
-
const _tree = await
|
|
23917
|
+
const _tree = await initOptionsMethod();
|
|
23387
23918
|
if (isArray$1(_tree)) {
|
|
23388
23919
|
tree = formatTree({
|
|
23389
23920
|
dataSource: _tree,
|
|
@@ -23398,7 +23929,7 @@ const transformTree = async ({
|
|
|
23398
23929
|
status: "error",
|
|
23399
23930
|
result: [],
|
|
23400
23931
|
error: new Error(
|
|
23401
|
-
"The
|
|
23932
|
+
"The initOptionsMethod function should return a Promise that resolves to an array"
|
|
23402
23933
|
)
|
|
23403
23934
|
};
|
|
23404
23935
|
}
|
|
@@ -23680,7 +24211,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
23680
24211
|
};
|
|
23681
24212
|
}
|
|
23682
24213
|
});
|
|
23683
|
-
const LewTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
24214
|
+
const LewTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-b22953bc"]]);
|
|
23684
24215
|
const _hoisted_1$a = {
|
|
23685
24216
|
key: 0,
|
|
23686
24217
|
class: "lew-result-count"
|
|
@@ -23751,9 +24282,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
23751
24282
|
}
|
|
23752
24283
|
emit2("loadStart");
|
|
23753
24284
|
lastSearchKeyword.value = searchKeyword;
|
|
23754
|
-
const { dataSource,
|
|
24285
|
+
const { dataSource, initOptionsMethod, keyField, labelField, free } = props2;
|
|
23755
24286
|
const { status, result, error } = await transformTree({
|
|
23756
|
-
|
|
24287
|
+
initOptionsMethod,
|
|
23757
24288
|
dataSource,
|
|
23758
24289
|
keyField,
|
|
23759
24290
|
labelField,
|
|
@@ -23872,7 +24403,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
23872
24403
|
};
|
|
23873
24404
|
}
|
|
23874
24405
|
});
|
|
23875
|
-
const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
24406
|
+
const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-f88ac431"]]);
|
|
23876
24407
|
const collapseModel = {
|
|
23877
24408
|
modelValue: {
|
|
23878
24409
|
type: [Array, String],
|
|
@@ -23972,7 +24503,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
23972
24503
|
};
|
|
23973
24504
|
}
|
|
23974
24505
|
});
|
|
23975
|
-
const LewCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
24506
|
+
const LewCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-9867d201"]]);
|
|
23976
24507
|
const _sfc_main$d = {
|
|
23977
24508
|
props: {
|
|
23978
24509
|
name: {
|
|
@@ -24257,7 +24788,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
24257
24788
|
};
|
|
24258
24789
|
}
|
|
24259
24790
|
});
|
|
24260
|
-
const LewCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
24791
|
+
const LewCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-fe198753"]]);
|
|
24261
24792
|
const descProps = {
|
|
24262
24793
|
options: {
|
|
24263
24794
|
type: Array,
|
|
@@ -24627,7 +25158,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
24627
25158
|
};
|
|
24628
25159
|
}
|
|
24629
25160
|
});
|
|
24630
|
-
const LewDescItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
25161
|
+
const LewDescItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-1688a396"]]);
|
|
24631
25162
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
24632
25163
|
__name: "LewDesc",
|
|
24633
25164
|
props: descProps,
|
|
@@ -24699,7 +25230,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
24699
25230
|
};
|
|
24700
25231
|
}
|
|
24701
25232
|
});
|
|
24702
|
-
const LewDesc = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
25233
|
+
const LewDesc = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-445b697c"]]);
|
|
24703
25234
|
const alertProps = {
|
|
24704
25235
|
type: {
|
|
24705
25236
|
type: String,
|
|
@@ -24801,7 +25332,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24801
25332
|
};
|
|
24802
25333
|
}
|
|
24803
25334
|
});
|
|
24804
|
-
const LewAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
25335
|
+
const LewAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-4240d35a"]]);
|
|
24805
25336
|
const modalModel = {
|
|
24806
25337
|
visible: {
|
|
24807
25338
|
type: Boolean,
|
|
@@ -25102,7 +25633,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
25102
25633
|
};
|
|
25103
25634
|
}
|
|
25104
25635
|
});
|
|
25105
|
-
const LewModal = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
25636
|
+
const LewModal = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-6106910e"]]);
|
|
25106
25637
|
const popokButtonProps = {
|
|
25107
25638
|
type: {
|
|
25108
25639
|
type: String,
|
|
@@ -25310,7 +25841,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
25310
25841
|
};
|
|
25311
25842
|
}
|
|
25312
25843
|
});
|
|
25313
|
-
const LewPopok = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
25844
|
+
const LewPopok = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-947e3813"]]);
|
|
25314
25845
|
const popoverProps = {
|
|
25315
25846
|
trigger: {
|
|
25316
25847
|
type: String,
|
|
@@ -26531,7 +27062,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
26531
27062
|
};
|
|
26532
27063
|
}
|
|
26533
27064
|
});
|
|
26534
|
-
const _LewContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
27065
|
+
const _LewContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-6c0969b0"]]);
|
|
26535
27066
|
const initLewHoverMenu = () => {
|
|
26536
27067
|
window.LewHoverMenu = {
|
|
26537
27068
|
menu: {},
|
|
@@ -27012,7 +27543,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27012
27543
|
};
|
|
27013
27544
|
}
|
|
27014
27545
|
});
|
|
27015
|
-
const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
27546
|
+
const _LewDialog = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-07a9c38c"]]);
|
|
27016
27547
|
const { x, y } = useMouse();
|
|
27017
27548
|
const createDialog = (type) => (options) => dialog(type, options);
|
|
27018
27549
|
const dialogTypes = {
|
|
@@ -27131,7 +27662,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27131
27662
|
};
|
|
27132
27663
|
}
|
|
27133
27664
|
});
|
|
27134
|
-
const NotificationItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
27665
|
+
const NotificationItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b711c3cf"]]);
|
|
27135
27666
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27136
27667
|
__name: "NotificationContainer",
|
|
27137
27668
|
setup(__props2, { expose: __expose2 }) {
|
|
@@ -27241,7 +27772,14 @@ const createNotification = (type) => {
|
|
|
27241
27772
|
width = 320
|
|
27242
27773
|
}) => {
|
|
27243
27774
|
const container = createContainer();
|
|
27244
|
-
const id = container == null ? void 0 : container.add(
|
|
27775
|
+
const id = container == null ? void 0 : container.add(
|
|
27776
|
+
type,
|
|
27777
|
+
title,
|
|
27778
|
+
content,
|
|
27779
|
+
duration,
|
|
27780
|
+
showProgress,
|
|
27781
|
+
width
|
|
27782
|
+
);
|
|
27245
27783
|
return {
|
|
27246
27784
|
close: () => {
|
|
27247
27785
|
container == null ? void 0 : container.handleClose(id);
|
|
@@ -32625,6 +33163,9 @@ const en = {
|
|
|
32625
33163
|
noResult: "No results",
|
|
32626
33164
|
searchPlaceholder: "Enter search keywords"
|
|
32627
33165
|
},
|
|
33166
|
+
treeSelect: {
|
|
33167
|
+
placeholder: "Please select"
|
|
33168
|
+
},
|
|
32628
33169
|
textarea: {
|
|
32629
33170
|
placeholder: "Please input"
|
|
32630
33171
|
},
|
|
@@ -32727,6 +33268,9 @@ const zh = {
|
|
|
32727
33268
|
noResult: "暂无结果",
|
|
32728
33269
|
searchPlaceholder: "输入搜索关键词"
|
|
32729
33270
|
},
|
|
33271
|
+
treeSelect: {
|
|
33272
|
+
placeholder: "请选择"
|
|
33273
|
+
},
|
|
32730
33274
|
textarea: {
|
|
32731
33275
|
placeholder: "请输入"
|
|
32732
33276
|
},
|
|
@@ -32829,6 +33373,9 @@ const ja = {
|
|
|
32829
33373
|
noResult: "結果なし",
|
|
32830
33374
|
searchPlaceholder: "検索キーワードを入力"
|
|
32831
33375
|
},
|
|
33376
|
+
treeSelect: {
|
|
33377
|
+
placeholder: "選択してください"
|
|
33378
|
+
},
|
|
32832
33379
|
textarea: {
|
|
32833
33380
|
placeholder: "入力してください"
|
|
32834
33381
|
},
|
|
@@ -32931,6 +33478,9 @@ const ko = {
|
|
|
32931
33478
|
noResult: "결과 없음",
|
|
32932
33479
|
searchPlaceholder: "검색 키워드 입력"
|
|
32933
33480
|
},
|
|
33481
|
+
treeSelect: {
|
|
33482
|
+
placeholder: "선택해주세요"
|
|
33483
|
+
},
|
|
32934
33484
|
textarea: {
|
|
32935
33485
|
placeholder: "입력해주세요"
|
|
32936
33486
|
},
|
|
@@ -33033,6 +33583,9 @@ const fr = {
|
|
|
33033
33583
|
noResult: "Aucun résultat",
|
|
33034
33584
|
searchPlaceholder: "Entrez les mots-clés de recherche"
|
|
33035
33585
|
},
|
|
33586
|
+
treeSelect: {
|
|
33587
|
+
placeholder: "Veuillez sélectionner"
|
|
33588
|
+
},
|
|
33036
33589
|
textarea: {
|
|
33037
33590
|
placeholder: "Veuillez saisir"
|
|
33038
33591
|
},
|
|
@@ -33135,6 +33688,9 @@ const it = {
|
|
|
33135
33688
|
noResult: "Nessun risultato",
|
|
33136
33689
|
searchPlaceholder: "Inserisci parole chiave"
|
|
33137
33690
|
},
|
|
33691
|
+
treeSelect: {
|
|
33692
|
+
placeholder: "Seleziona"
|
|
33693
|
+
},
|
|
33138
33694
|
textarea: {
|
|
33139
33695
|
placeholder: "Inserisci"
|
|
33140
33696
|
},
|
|
@@ -33237,6 +33793,9 @@ const es = {
|
|
|
33237
33793
|
noResult: "Sin resultados",
|
|
33238
33794
|
searchPlaceholder: "Introduzca palabras clave"
|
|
33239
33795
|
},
|
|
33796
|
+
treeSelect: {
|
|
33797
|
+
placeholder: "Por favor, seleccione"
|
|
33798
|
+
},
|
|
33240
33799
|
textarea: {
|
|
33241
33800
|
placeholder: "Por favor, introduzca"
|
|
33242
33801
|
},
|
|
@@ -33339,6 +33898,9 @@ const de = {
|
|
|
33339
33898
|
noResult: "Keine Ergebnisse",
|
|
33340
33899
|
searchPlaceholder: "Suchbegriffe eingeben"
|
|
33341
33900
|
},
|
|
33901
|
+
treeSelect: {
|
|
33902
|
+
placeholder: "Bitte auswählen"
|
|
33903
|
+
},
|
|
33342
33904
|
textarea: {
|
|
33343
33905
|
placeholder: "Bitte eingeben"
|
|
33344
33906
|
},
|
|
@@ -33441,6 +34003,9 @@ const pt = {
|
|
|
33441
34003
|
noResult: "Sem resultados",
|
|
33442
34004
|
searchPlaceholder: "Digite os termos de pesquisa"
|
|
33443
34005
|
},
|
|
34006
|
+
treeSelect: {
|
|
34007
|
+
placeholder: "Por favor, selecione"
|
|
34008
|
+
},
|
|
33444
34009
|
textarea: {
|
|
33445
34010
|
placeholder: "Por favor, digite"
|
|
33446
34011
|
},
|