lew-ui 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +13 -7
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11791,14 +11791,13 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
11791
11791
|
};
|
|
11792
11792
|
if (props2.okByEnter) {
|
|
11793
11793
|
watch(enter, (v) => {
|
|
11794
|
+
var _a2;
|
|
11794
11795
|
if (v && isFocus.value) {
|
|
11795
|
-
|
|
11796
|
+
(_a2 = lewInputRef.value) == null ? void 0 : _a2.blur();
|
|
11797
|
+
emit2("ok", modelValue2.value);
|
|
11796
11798
|
}
|
|
11797
11799
|
});
|
|
11798
11800
|
}
|
|
11799
|
-
const ok = useDebounceFn(() => {
|
|
11800
|
-
emit2("ok", modelValue2.value);
|
|
11801
|
-
}, 250);
|
|
11802
11801
|
onUnmounted(() => {
|
|
11803
11802
|
if (timer) clearTimeout(timer);
|
|
11804
11803
|
});
|
|
@@ -11882,7 +11881,6 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
11882
11881
|
type: unref(getType),
|
|
11883
11882
|
readonly: _ctx.readonly,
|
|
11884
11883
|
maxlength: _ctx.maxLength,
|
|
11885
|
-
onkeypress: "if(window.event.keyCode==13) this.blur()",
|
|
11886
11884
|
onInput: _cache[3] || (_cache[3] = ($event) => emit2("input", modelValue2.value)),
|
|
11887
11885
|
onChange: _cache[4] || (_cache[4] = ($event) => emit2("change", modelValue2.value)),
|
|
11888
11886
|
onBlur: blur,
|
|
@@ -11988,7 +11986,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
11988
11986
|
};
|
|
11989
11987
|
}
|
|
11990
11988
|
});
|
|
11991
|
-
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-
|
|
11989
|
+
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-3c20080e"]]);
|
|
11992
11990
|
const inputNumberModel = {
|
|
11993
11991
|
modelValue: {
|
|
11994
11992
|
type: Number,
|
|
@@ -12620,6 +12618,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12620
12618
|
}),
|
|
12621
12619
|
emits: /* @__PURE__ */ mergeModels(["close", "change"], ["update:modelValue"]),
|
|
12622
12620
|
setup(__props2, { emit: __emit2 }) {
|
|
12621
|
+
var _a;
|
|
12622
|
+
const app2 = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app;
|
|
12623
|
+
if (app2 && !app2.directive("tooltip")) {
|
|
12624
|
+
app2.use(LewMessage$1);
|
|
12625
|
+
}
|
|
12623
12626
|
const emit2 = __emit2;
|
|
12624
12627
|
const props2 = __props2;
|
|
12625
12628
|
const modelValue2 = useModel(__props2, "modelValue");
|
|
@@ -12654,6 +12657,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12654
12657
|
} else {
|
|
12655
12658
|
if (!(modelValue2.value || []).includes(inputValue.value)) {
|
|
12656
12659
|
addTag();
|
|
12660
|
+
} else {
|
|
12661
|
+
LewMessage$1.warning("不允许重复标签");
|
|
12657
12662
|
}
|
|
12658
12663
|
}
|
|
12659
12664
|
if (isEnter) {
|
|
@@ -12741,6 +12746,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12741
12746
|
size: _ctx.size,
|
|
12742
12747
|
readonly: !unref(isFocus),
|
|
12743
12748
|
placeholder: (modelValue2.value || []).length > 0 ? "" : _ctx.placeholder,
|
|
12749
|
+
"ok-by-enter": "",
|
|
12744
12750
|
onBlur: blurFn
|
|
12745
12751
|
}, null, 8, ["auto-width", "modelValue", "size", "readonly", "placeholder"])) : createCommentVNode("", true)
|
|
12746
12752
|
]),
|
|
@@ -12767,7 +12773,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12767
12773
|
};
|
|
12768
12774
|
}
|
|
12769
12775
|
});
|
|
12770
|
-
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
12776
|
+
const LewInputTag = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-88c45751"]]);
|
|
12771
12777
|
const checkboxModel = {
|
|
12772
12778
|
modelValue: {
|
|
12773
12779
|
type: Boolean,
|